unisonweb / website

Main Unison website
MIT License
8 stars 5 forks source link

Add CSS and JS enabling click-to-toggle on heading #32

Closed brianloveswords closed 2 years ago

brianloveswords commented 2 years ago

I was setting up a new computer and noticed this minor papercut on the Quickstart page: the heading on the toggle lists are not clickable. I saw in #troubleshooting that other people ran into this as well.

This was the most straightforward way I could find to fix it without having to change how unison generates the HTML. I don't love the .folded-details > div .word selector, but it does seem to work and not over-select in the light testing I did.

quickstart-toggle

If this is not the way you'd prefer for this to be fixed, and you'd prefer the HTML generator to change instead, feel free to reject this PR, I will not be offended!

brianloveswords commented 2 years ago

Thanks for the comments @hojberg, I'll look into making updates this weekend and @ you when it's ready for re-review!

brianloveswords commented 2 years ago

@hojberg alright I updated this to use closest and I checked the case where a term is embedded in the fold summary and it seems to work fine—the selector doesn't capture the anchor, and clicking on it works just fine.

image
hojberg commented 2 years ago

Thanks @brianloveswords :D