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 Hiding + HTML Comments #108

Merged
merged 2 commits into from
Aug 8, 2024
Merged

Comment Hiding + HTML Comments #108

merged 2 commits into from
Aug 8, 2024

Conversation

Rahkeen
Copy link
Collaborator

@Rahkeen Rahkeen commented Aug 8, 2024

This PR adds the ability to hide comment "subtrees".

Because of the way we parse, each comment is an indpendent entity with no parent-child relationship. However, we can use the comment order + indent level to determine if a comment is a child of some arbitrary parent comment. I setup a simple function to find all the children of a comment that would be hidden or displayed based on the selected parent. I also added a lil icon to show show if a comment is displayed or hidden.

Last thing I snuck in here was getting the comment HTML rather than the escaped string, so that we can parse comments as HTML (render links, formatting, etc).

Copy link

emerge-tools bot commented Aug 8, 2024

📸 Snapshot Test

4 modified, 34 unchanged

Name Version Added Removed Modified Unchanged Errored Approval
Hacker News
com.emergetools.hackernews.debug
1.0 (1) 0 0 4 34 0 ✅ Approved

🛸 Powered by Emerge Tools

@Rahkeen Rahkeen force-pushed the rikin.comment-feedback branch from 4b1b7e7 to 0664023 Compare August 8, 2024 20:13
Copy link
Collaborator Author

Rahkeen commented Aug 8, 2024

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @Rahkeen and the rest of your teammates on Graphite Graphite

@Rahkeen Rahkeen mentioned this pull request Aug 8, 2024
@Rahkeen Rahkeen requested a review from rbro112 August 8, 2024 20:14
Rahkeen added 2 commits August 8, 2024 13:17
This PR is our initial pass at setting up comments (top level comments,
not replies yet)

Added a minimal UI for submitting comments
Modified the `CommentsDomain` with new state and actions for updating /
submitting comments
Extracted out Form Data neccesary for submitting comments
Added a post request to the comment endpoint to tie it all together
This PR adds the ability to hide comment "subtrees".

Because of the way we parse, each comment is an indpendent entity with no parent-child relationship. However, we can use the comment order + indent level to determine if a comment is a child of some arbitrary parent comment.
I setup a simple function to find all the children of a comment that would be hidden or displayed based on the selected parent.
I also added a lil icon to show show if a comment is displayed or hidden.

Last thing I snuck in here was getting the comment HTML rather than the escaped string, so that we can parse comments as HTML (render links, formatting, etc).
@Rahkeen Rahkeen force-pushed the rikin.comment-feedback branch from 0664023 to b66ed44 Compare August 8, 2024 20:18
Copy link
Collaborator Author

Rahkeen commented Aug 8, 2024

Merge activity

  • Aug 8, 6:45 PM EDT: @Rahkeen started a stack merge that includes this pull request via Graphite.
  • Aug 8, 6:46 PM EDT: @Rahkeen merged this pull request with Graphite.

@Rahkeen Rahkeen merged commit e07200a into main Aug 8, 2024
6 checks passed
@Rahkeen Rahkeen deleted the rikin.comment-feedback branch August 8, 2024 22:46
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

Successfully merging this pull request may close these issues.

2 participants