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

Setting to have comments threads collapsed by default #139

Merged
merged 5 commits into from
Jul 2, 2023

Conversation

tpkee
Copy link
Contributor

@tpkee tpkee commented Jul 1, 2023

Closes #130

Probably there is some (or a lot!) of work to do here. Particularly, I would check out the useEffect used in the CommentTree component. Right now I don't have a better idea, so it may be fine but I would check it out twice

@tpkee tpkee force-pushed the feat/collapsed-by-default-setting branch from 3022c5a to 768c036 Compare July 1, 2023 18:57
@tpkee tpkee changed the title Feat/comments collapsed by default setting options Setting to have comments threads collapsed by default Jul 1, 2023
@aeharding
Copy link
Owner

aeharding commented Jul 1, 2023

Hi Thanks for this.

However, I think we need a different approach.

We should get only one level deep from the API when the mode is to collapse children.

Then, the comment should use its data to determine if there are more comments to load in. It should then display how many more replies they are, like this:

image

When tapped, the comments for that node should be fetched and appended to the tree.

This would also solve problems with only being able to see 8 levels deep.

This might involve a bit of refactor, so if you would like, you can change this to just include the setting and I will merge this to a feature branch.

@tpkee tpkee force-pushed the feat/collapsed-by-default-setting branch from f4f6f8d to 0b32a62 Compare July 1, 2023 19:34
@tpkee
Copy link
Contributor Author

tpkee commented Jul 1, 2023

Hi Thanks for this.

However, I think we need a different approach.

We should get only one level deep from the API when the mode is to collapse children.

Then, the comment should use its data to determine if there are more comments to load in. It should then display how many more replies they are, like this:

image When tapped, the comments for that node should be fetched and appended to the tree.

This would also solve problems with only being able to see 8 levels deep.

This might involve a bit of refactor, so if you would like, you can change this to just include the setting and I will merge this to a feature branch.

Oh yeah, that's much better!
I dropped the commit in which I include the functionality, leaving just the new setting option. I pushed the change so you can open the feature branch. I'll try to work on it tomorrow, but no guarantee

@aeharding
Copy link
Owner

Thank you very much :)

@aeharding
Copy link
Owner

I am currently working on this.

@aeharding aeharding force-pushed the feat/collapsed-by-default-setting branch from 0b32a62 to 86df12e Compare July 2, 2023 00:49
@aeharding aeharding merged commit ce78d6d into aeharding:main Jul 2, 2023
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.

Setting to have comments collapsed by default
2 participants