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

Listing page: Experiment with sticky sidebar #461

Open
towerofnix opened this issue Apr 7, 2024 · 1 comment
Open

Listing page: Experiment with sticky sidebar #461

towerofnix opened this issue Apr 7, 2024 · 1 comment

Comments

@towerofnix
Copy link
Member

This is a bit of a stub issue, but listing pages currently don't make much use of the sidebar. It's present for quick navigation between listings, but nothing more, so only duplicates the functionality of the listing index itself. This is OK for mobile/thin where the sidebar just isn't accessible, but it's a missed opportunity area in wider layouts. Since listings are very tall, and the sidebar isn't sticky, it's usually just a blank space!

We'd like to retain the listing index box, but besides that we could reflect the "Skip to a section" content in the sidebar, for applicable listings. It would be nice to generalize the album commentary sidebar's behavior so we can make use of it here — reinforcing the association between sticky subheading and highlighted section in sidebar, particularly for clearly segmented pages (like album commentary or sectioned listings).

Technical end: All sidebar dynamics happen in the client, so we have full access to the generated page. Maybe we could detect an HTML attribute association between sidebar elements and content headings...? Just querying <a> elements linking to # IDs associated with content headings would probably be sufficient. We don't remember exactly how these sidebar dynamics have been coded, but they already hook into the sticky subheading. We could keep the sidebar dynamics separate and reuse the existing hook, which would be a minimal refactor while encouraging system interaction, but it might be worth it just to roll them together, if the cue for sidebar dynamics is already in linked content headings to begin with.

@towerofnix
Copy link
Member Author

Thanks to Celeste for bringing up tall listing navigation in general (#hsmusic-chat), which might've got us thinking about this idea in the middle of the night a few days ago.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant