File tree Expand file tree Collapse file tree 20 files changed +28
-309
lines changed
Expand file tree Collapse file tree 20 files changed +28
-309
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " @coralproject/talk" ,
3- "version" : " 9.9.1 " ,
3+ "version" : " 9.9.2 " ,
44 "author" : " The Coral Project" ,
55 "homepage" : " https://coralproject.net/" ,
66 "sideEffects" : [
Original file line number Diff line number Diff line change @@ -79,7 +79,6 @@ export function denormalizeStory(story: Fixture<GQLStory>) {
7979 commentCounts : {
8080 ...story . commentCounts ,
8181 totalPublished : commentEdges . length ,
82- totalPublishedAndVisible : commentEdges . length ,
8382 tags : {
8483 ...( story . commentCounts && story . commentCounts . tags ) ,
8584 FEATURED : featuredCommentsCount ,
Original file line number Diff line number Diff line change @@ -645,6 +645,13 @@ const enhanced = withPaginationContainer<
645645 }
646646 mode
647647 }
648+ commentCounts {
649+ totalPublished
650+ tags {
651+ REVIEW
652+ QUESTION
653+ }
654+ }
648655 comments(
649656 first: $count
650657 after: $cursor
Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ const PreviousCountSpyContainer: FunctionComponent<Props> = ({
5151 }
5252
5353 // value is the current comment count as a string to be stored in storage.
54- const value = story . commentCounts . totalPublishedAndVisible . toString ( ) ;
54+ const value = story . commentCounts . totalPublished . toString ( ) ;
5555
5656 /**
5757 * update will take the current published comment count and update it in
@@ -71,7 +71,7 @@ const PreviousCountSpyContainer: FunctionComponent<Props> = ({
7171 } , [
7272 featureFlags ,
7373 localStorage ,
74- story . commentCounts . totalPublishedAndVisible ,
74+ story . commentCounts . totalPublished ,
7575 story . id ,
7676 story . isClosed ,
7777 ] ) ;
@@ -85,7 +85,7 @@ const enhanced = withFragmentContainer<Props>({
8585 id
8686 isClosed
8787 commentCounts {
88- totalPublishedAndVisible
88+ totalPublished
8989 }
9090 }
9191 ` ,
Original file line number Diff line number Diff line change @@ -178,7 +178,7 @@ export const StreamContainer: FunctionComponent<Props> = (props) => {
178178 const warned = ! ! props . viewer ?. status . current . includes ( GQLUSER_STATUS . WARNED ) ;
179179 const modMessaged = ! ! props . viewer ?. status . modMessage . active ;
180180
181- const allCommentsCount = props . story . commentCounts . totalPublishedAndVisible ;
181+ const allCommentsCount = props . story . commentCounts . totalPublished ;
182182 const featuredCommentsCount = props . story . commentCounts . tags . FEATURED ;
183183 const unansweredCommentsCount = props . story . commentCounts . tags . UNANSWERED ;
184184
@@ -631,7 +631,7 @@ const enhanced = withFragmentContainer<Props>({
631631 mode
632632 }
633633 commentCounts {
634- totalPublishedAndVisible
634+ totalPublished
635635 tags {
636636 FEATURED
637637 UNANSWERED
Original file line number Diff line number Diff line change @@ -17,14 +17,11 @@ export default function incrementStoryCommentCounts(
1717 if ( story ) {
1818 const commentCounts = story . getLinkedRecord ( "commentCounts" ) ;
1919 if ( commentCounts ) {
20- // Increment totalPublishedAndVisible .
21- const currentTotalPublishedAndVisible = commentCounts . getValue (
22- "totalPublishedAndVisible "
20+ // Increment totalPublished .
21+ const currentTotalPublished = commentCounts . getValue (
22+ "totalPublished "
2323 ) as number ;
24- commentCounts . setValue (
25- currentTotalPublishedAndVisible + 1 ,
26- "totalPublishedAndVisible"
27- ) ;
24+ commentCounts . setValue ( currentTotalPublished + 1 , "totalPublished" ) ;
2825
2926 // Now increment tag counts.
3027 const commentCountsTags = commentCounts . getLinkedRecord ( "tags" ) ;
Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ const StoryRowContainer: FunctionComponent<Props> = ({
5858 CLASSES . discussions . story . commentsCount
5959 ) }
6060 >
61- { story . commentCounts . totalPublishedAndVisible }
61+ { story . commentCounts . totalPublished }
6262 </ span >
6363 </ Flex >
6464 </ Flex >
@@ -81,7 +81,7 @@ const enhanced = withFragmentContainer<Props>({
8181 publishedAt
8282 }
8383 commentCounts {
84- totalPublishedAndVisible
84+ totalPublished
8585 }
8686 }
8787 ` ,
Original file line number Diff line number Diff line change @@ -408,7 +408,6 @@ export const baseStory = createFixture<GQLStory>({
408408 } ,
409409 commentCounts : {
410410 totalPublished : 0 ,
411- totalPublishedAndVisible : 0 ,
412411 tags : {
413412 FEATURED : 0 ,
414413 UNANSWERED : 0 ,
Original file line number Diff line number Diff line change @@ -299,7 +299,6 @@ export function createStory(
299299 isArchiving : false ,
300300 commentCounts : {
301301 totalPublished : 0 ,
302- totalPublishedAndVisible : 0 ,
303302 tags : {
304303 FEATURED : 0 ,
305304 UNANSWERED : 0 ,
Original file line number Diff line number Diff line change 11{
22 "name" : " common" ,
3- "version" : " 9.9.1 " ,
3+ "version" : " 9.9.2 " ,
44 "description" : " " ,
55 "main" : " dist/index.js" ,
66 "types" : " dist/index.d.ts" ,
You can’t perform that action at this time.
0 commit comments