-
Notifications
You must be signed in to change notification settings - Fork 15
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
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
📸 Snapshot Test4 modified, 34 unchanged
🛸 Powered by Emerge Tools |
4b1b7e7
to
0664023
Compare
This stack of pull requests is managed by Graphite. Learn more about stacking. |
Merged
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).
0664023
to
b66ed44
Compare
rbro112
reviewed
Aug 8, 2024
android/app/src/main/java/com/emergetools/hackernews/features/comments/CommentsScreen.kt
Show resolved
Hide resolved
rbro112
approved these changes
Aug 8, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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).