Skip to content
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

Comment List: Upvoting a comment expands all collapsed comments #1

Closed
dan-lovelace opened this issue Sep 5, 2023 · 1 comment
Closed

Comments

@dan-lovelace
Copy link
Owner

Steps to reproduce

  1. Navigate to https://news.ycombinator.com/
  2. Select the comments link for any story
  3. Collapse a few comments
  4. Upvote any comment
  5. Notice the collapsed comments become expanded

Expected

Collapsed comments will remain collapsed when upvoting a comment.

Attachments

Screen.Recording.2023-09-05.at.3.16.08.PM.mov
@dan-lovelace dan-lovelace changed the title Upvoting a comment expands all collapsed comments Comment List: Upvoting a comment expands all collapsed comments Sep 5, 2023
@dan-lovelace
Copy link
Owner Author

Fixed by adding better support for the toggle interaction. We now keep track of when a comment is collapsed through a new collapsed property. It includes two keys:

  • count?: number - The number of collapsed child comments
  • value: boolean - Whether the comment is collapsed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant