feat: Switch to pagefind component UI #837
Conversation
✅ Deploy Preview for fipguide ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Hi there! 👋 Thank you for your contribution to the FIP Guide! 🚀 Checklist before merging:
|
therobrob
left a comment
There was a problem hiding this comment.
This pagefind-update is really cool! So we're getting rid of some custom code :)
I’ve left some thoughts in the comments. Further more:
- the aria-label of the input element isn’t fitting: "Suche diese Seite" => "durchsuche diese Seite. We should overwrite it, what do you think?
- the screenreader read out the # from the .pf-heading-chip elements (for example "Nummernzeichen Wissenswertes“). Could we hide it fore screenreaders?
- does the pagefind version support an aria-live feature? I think we should announce the search results after typing in the search term.
There is already an open PR for it, I would just wait until it's merged: Pagefind/pagefind#1096
There was a way by overwriting the content of the
Looks like they don't want to implement it, at least that's the only comment I could find regarding to it: Pagefind/pagefind#162 (comment) |
|
The comments should be addressed now :) |
therobrob
left a comment
There was a problem hiding this comment.
There are two little this left, i’d like to address.
Do you think the localization-issue on behalf of pagefind is solved soon? Otherwise we can merge this PR before and update pagefind later on :)
Regarding aria-live: my idea is to announce, that the search results changed, not what exactly changed in the search results. I understood the pagefind-MR to mean that aria live should announce all changed results. But we can leave this unaddressed for now, i think there is no serious violation. :)
They are usually fast in merging PRs, so I would do it the way proposed: Merge this PR and then update pagefind once the new version is released.
Makes sense to me, but sounds like a bit of effort, so feel free to track it as issue if you want :) |
|
Done, I also replaced the border with outline (like we do it for the teasers), otherwise there were cases with two borders / outlines. EDIT: Now the border is gone, I'll fix it tomorrow morning. |
therobrob
left a comment
There was a problem hiding this comment.
Everything looks great now, thanks a lot! 🫶
In pagefind v1.5.0, a completely new component UI library was added. While the old default UI remains supported, the recommendation is to switch to the new UI. It provides better accessibility, customization and has a modern touch. This is the implementation for the FIP Guide. It makes many things simpler, so I could remove a lot of custom code that was needed before for the same behavior.
It does also resolve #538: LKA is now listed as result and Schweiz is ranked as first result in the German search.