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

When viewing a Glossary, show an alphabet at the top. #11

Merged
merged 5 commits into from
Oct 25, 2024
Merged

Conversation

mauritsvanrees
Copy link
Collaborator

Clicking a letter scrolls the entries for that letter into view.

This is a customisation from the same client project where we are looking at #10, so I base this PR on that branch, for ease of my own testing.

Note that collective.glossary has a registry setting with a "Maximum before showing A-Z toolbar", which works in Classic UI. We did not implement checking this registry setting here because for this client we have hundreds of glossary terms and always want to show the A-Z bar.

An integrator would need to do some styling.
Screenshot with only this add-on:

Screenshot 2024-10-24 at 21 44 58

Screenshot in the client project:

Screenshot 2024-10-24 at 21 45 20

Note that this PR changes a few tags/ids/classes and I don't know why, I just copy some code here. The client project uses volto-light-theme, that may be why.

@mauritsvanrees mauritsvanrees requested a review from ksuess October 24, 2024 19:54
Base automatically changed from calculate-enhanced-text-on-route-change---store-with-jotai to main October 25, 2024 07:39
@ksuess
Copy link
Member

ksuess commented Oct 25, 2024

Thank you @mauritsvanrees for this improvement!

I would like to skip the Classic UI registry setting "Maximum before showing A-Z toolbar" but instead let it booleanish configurable with a default true.

I did a small styling on the letter list of the navigation.

I would like to stay with the common html markup of views and modified the Glossary.jsx back to this.

@ksuess ksuess closed this Oct 25, 2024
@ksuess ksuess reopened this Oct 25, 2024
@ksuess
Copy link
Member

ksuess commented Oct 25, 2024

grafik

@ksuess
Copy link
Member

ksuess commented Oct 25, 2024

The letters without a term beginning with this letter are paler.

    &.unmatched {
      filter: opacity(0.5);
    }

@ksuess ksuess merged commit 517f885 into main Oct 25, 2024
2 checks passed
@ksuess ksuess deleted the maurits-alphabet branch October 25, 2024 14:55
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.

2 participants