jointakahe / takahe

An ActivityPub/Fediverse server
BSD 3-Clause "New" or "Revised" License
1.12k stars 86 forks source link

Use post id to generate summary class #583

Closed karthikb351 closed 1 year ago

karthikb351 commented 1 year ago

Use the post's id to uniquely identify the summary class.

Currently we hash the name of the summary to generate the unique css class name, which causes all summaries with the same name to expand and close together (was this behaviour intentional?)

Example: https://fedi.karthikbalakrishnan.com/@me@karthikbalakrishnan.com/posts/182274944255353776/

https://github.com/jointakahe/takahe/assets/3104454/287501d3-6875-45f8-8c2c-164e78ba76c7

andrewgodwin commented 1 year ago

Yes, this was an entirely intentional feature - the reason being that if you are willing to expand one content warning, you may as well expand them all.

I'm curious if there are reasons not to do this that aren't "it's not what most other clients do"?

karthikb351 commented 1 year ago

I'm curious if there are reasons not to do this that aren't "it's not what most other clients do"?

@andrewgodwin I think the biggest issue is that in a long thread, it ends up shifting a lot of the content up/down, such that the toggle button also moves underneath your cursor. If we only did one at a time, the button would stay in the same place.

andrewgodwin commented 1 year ago

Yeah, that's a good point - we aren't going to sync the viewpoint. Plus, I am always a fan of the Principle of Least Surprise, which here probably includes "doing what everyone else is".