-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Add collapsable threads and tweak "thread replies" appearance #7488
base: main
Are you sure you want to change the base?
Conversation
for (let val of skeleton.replies) { | ||
if (!isThreadPost(val)) continue | ||
if (collapsedCIDs.has(val.post.cid) || set.has(val.post.cid)) { | ||
val.replies?.forEach(r => { | ||
isThreadPost(r) && set.add(r.post.cid) | ||
}) | ||
} | ||
} |
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 traverses the tree of posts any time a post is collapsed, which may not be efficient enough in production
Might be easier to get this merged if you split the thread collapsing and actions rework into separate PRs |
That's fair, but I do like how it currently preserves positioning of the controls between states, as a bonus on top of the additional post density. Can appreciate others may not see the density as an advantage, happy to split if it becomes a point of debate |
"Thread view" for replies hasn't quite hit the mark for me — there's a lot of vertical screenspace reserved for controls and link embeds, which leaves room for improvement in my eyes on "skimmability". If I'm reading the replies, I'm usually looking for broad-strokes.
This makes a couple of changes:
I'm opening this as a draft PR because there are some bugs I want to sort out before calling it fully ready, specifically
Linear view collapses as well, which was not my intention"never collapse text" is not scoped to only thread view, which was my intention.Here's a before/after comparisonSee later comment for updated screenshotAnd here's a recording of the collapse experience
Screen.Recording.2025-01-18.at.4.46.43.PM.mov