- 
                Notifications
    You must be signed in to change notification settings 
- Fork 363
Setting to collapse top-level replies by default #4821
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
| ✅ Deploy Preview for gallant-galileo-14878c canceled.
 | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good overall! The maintaining collapsed/expanded state on scroll is definitely a nice improvement.
I left a few small comments throughout. My main question is if we want to update so that it's possible to expand/collapse new replies after they have initially loaded in if the user who added the replies clicks on the expand/collapse.
        
          
                client/src/core/client/admin/routes/Configure/sections/General/CollapseRepliesConfig.tsx
              
                Outdated
          
            Show resolved
            Hide resolved
        
      |  | ||
| const collapsed = useMemo(() => { | ||
| // If comment was just created, always show un-collapsed | ||
| if (isNewlyCreated) { | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This check means that until a user reloads the stream, they cannot collapse their new reply. I'm not sure how often someone would want to do that, but the new comment does show an expand/collapse option still, so it could be a bit confusing that it won't collapse.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah interesting. I'm not suuure I care but I'll play around with it for a few minutes. good catch.
Collapse First-Level Replies by Default
Adds a new tenant setting to collapse first-level replies in the comment stream by default, giving moderators control over the initial display density of threaded conversations.
Changes
Server
collapseRepliesboolean setting to tenant configurationAdmin
Client
CollapsableCommentto use local GraphQL store for persistencecollapsedCommentSettings(stores comment IDs toggled opposite to default)Behavior
These changes will impact:
What changes to the GraphQL/Database Schema does this PR introduce?
Does this PR introduce any new environment variables or feature flags?
If any indexes were added, were they added to
INDEXES.md?How do I test this PR?
Were any tests migrated to React Testing Library?
How do we deploy this PR?