-
-
Notifications
You must be signed in to change notification settings - Fork 809
New Pagefind UI #3335
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
base: main
Are you sure you want to change the base?
New Pagefind UI #3335
Conversation
|
✅ Deploy Preview for astro-starlight ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Lunaria Status Overview🌕 This pull request will trigger status changes. Learn moreBy default, every PR changing files present in the Lunaria configuration's You can change this by adding one of the keywords present in the Tracked Files
Warnings reference
|
Alongside some minor changes and improvements, this PR now also includes an always-visible query input. It does not looks great and it's part of the points I initially mentioned in the description of this PR that should be discussed regarding potential changes to the original Pagefind UI. The main reason I quickly implemented it is to make testing easier as the original design was not very convenient when using the search UI a lot. It's in a dedicated commit so it can be easily reverted later if needed. |
Updated the PR to adds support for new features which are currently not supported at all in Starlight. To decide which features to implement first, I looked at the various feature requests that have been opened and also what is currently being done in the ecosystem.
|
Updated the PR based on the feedback from T&D (14 August 2025):
|
* main: (137 commits) i18n(fr): update `resources/themes.mdx` (withastro#3399) i18n(de): translate `themes.mdx` (withastro#3397) [ci] format i18n(ko): translate `themes.mdx` (withastro#3398) [ci] format docs: add Starlight Page to themes showcase (withastro#3393) i18n(de): update German themes (withastro#3394) docs: change image of Starlight Galaxy Theme dark image to not include a visible scrollbar (withastro#3395) [ci] format i18n(ko-KR): update `themes.mdx` (withastro#3392) [ci] format Add link to new Starlight theme (withastro#3390) i18n(fr): update `guides/css-and-tailwind.mdx` (withastro#3389) i18n(de): translate `guides/css-and-tailwind.mdx` (withastro#3386) [ci] format i18n(ko-KR): update `css-and-tailwind.mdx` (withastro#3388) Adds OmniPrint documentation to the showcase (withastro#3387) docs(showcase): Add Aptos Docs (withastro#3385) docs: add section about multiple Tailwind configs (withastro#3273) Add basic ESLint config, lint script and lint CI job (withastro#1640) ...
* main: (26 commits) i18n(ja): resources/themes (withastro#3442) add openstatus showcase (withastro#3436) [ci] release (withastro#3434) Add `head` config validation for `meta` tags with `content` (withastro#3380) Fix Astro Island margins in Markdown (withastro#3340) Ensure tab links span the full tab height (withastro#3427) Move `<summary>` to top of `<details>` for validity (withastro#3423) Run all tests on CI workflow changes (withastro#3433) [ci] format i18n(fr): small rewording and fixes in top-level pages (withastro#3432) i18n(fr): small rewording and fixes in `guides` (withastro#3431) i18n(fr): fix typo and links in `reference` files (withastro#3429) i18n(fr): small rewording in `components` (withastro#3430) [ci] release (withastro#3384) i18n(de): Update `page.lastUpdated` translation to be more in‐line with the English translation (withastro#3416) Remove invalid value attribute from `<select>` (withastro#3421) Convert invalid `<div>` child of `<summary>` to `<span>` (withastro#3422) [i18nIgnore] Fix typo in Spanish docs documentation (withastro#3408) chore(deps): update actions/labeler action to v6.0.1 (withastro#3407) [i18nIgnore] Fix duplicate i18n collection definition (withastro#3409) ...
Tested on Firefox Developer Tools (desktop):
One minor (nitpick) drawback on mobile. Now that input search (header) and more results (footer) are sticky, when clicking "More results", you don't have a visual change anymore that shows that new results were loaded. |
Thanks for the great feedback 🙌 Definitely agree, and this is also something I've started looking at in #3335 (comment) (screenshots included). To give a bit more context, this PR initially started by a rewrite to improve the accessiblity, but as we now have more control, some UI/UX changes have also started to make sense. So far, such changes have been added with minimal effort regarding the design aspect which explains such large padding around some elements. As I'm also not the best when it comes to design, this is also something where Chris inputs would be very valuable. Regarding the last point, definitely something that is missing right now, great reminder. Such indicators have been implemented for screen-readers, but not visually yet. I'm guessing these would be added once we have a better idea of the overall design direction. |
Description
This draft PR is a very early version of a rewrite of the Pagefind UI that is used in Starlight.
This is a work in progress and is not ready for production or even for a full review yet. A lot of work is still needed to get it to a point where it can be used in Starlight. Most of the work has only been done in 1 browser and parts of the UI have been tested in isolation against only 1 screen reader so far so it'll require a lot of testing and improvements before it can be considered ready in its entirety.
The main goal of having more control over the search UI and improving the accessibility of the search experience in Starlight.
A few important points to note:
Filters are always visible as some have been configured in the content which is not the case in the live version of the documentation.Something coming to mind could be an always-visible query input but that's a decision that should be made later. This PR implements an always-visible query input but it's not looking great and was mostly done to make testing easier (in a dedicated commit so it can be easily reverted later if needed).An interesting search isupgrade
:It displays some metadata.With this branch not being updated with Exclude banner content from Pagefind indexing #3276, the banner content of the homepage is still indexed and this search will display it as a single root result with an excerpt and no sub-results (which is not broken like in Search display broken due to code marks and other elements #3267).Development notes:
pnpm pagefind
command to thedocs/
directory which should be used when iterating on this PR:4321
port and a prod version on the4322
port.http://localhost:4321
will use the search indexes from the prod version which allows for using/testing/iterating on the search UI (note that changes that would result in a change to the search indexes will require running thepnpm pagefind
command again).Remaining todos
TODO(HiDeoo)
remaining comments and address them.