Repository navigation
Update to DocSearch v5 - #14953
Update to DocSearch v5#14953HiDeoo wants to merge 7 commits into
Conversation
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
|
|
Preview deployment ✅ Deployment complete!
|
|
Yeah, this is one of the issues I've spotted so far and I think this is an upstream regression. In DocSearch v3, we had a dedicated We could override it in the Starlight plugin but this feels more like a regression and a limitation other users could also run into rather than something specific to our setup (and would also adding more override based on internal CSS classes in our plugin). |
|
Thanks for exploring @HiDeoo! I actually was just coming to share my own similar exploration. I was looking at how the modal works on the DocSearch docs and I think if we take some cues from there we can have less issues and likely also avoid needing things like The basic approach was to avoid highlighting each result and not to use the grey shade for the modal interior. That means we start from a higher contrast background colour for the modal and can then use our
This also helps in the AI response mode for making stuff like the “speech bubbles” in the chat stand out:
I also noted down some other small tweaks to ensure contrast/improve a11y. I didn’t try yet with different theme presets like you did though — will do that now and if it seems to be working, I will share a patch in the Starlight PR so others can try it. |
Oh, interesting. It's actually one of the first implementation I initially tried (as you mentioned it's how it works in the DocSearch docs), and ended up dismissing it almost immediately 😅 I personally didn't like having the input, dialog body and footer having the same background color. Altho, it's purely a matter of personal preference from me and we know I'm not the best at design choices anw, so if you think it's fine and works better this way, I'm more than happy to go with it. |
Yeah, that’s also a fair observation. Here’s a quick side-by-side for our two approaches to compare:
The benefit to me of the single background colour is that it removes the noise of all the element borders from the UI, so you can cleanly see the text and especially the currently highlighted result. (For example, on the left, the highlighted/focused result actually has less contrast from the rest of the UI so stands out a bit less even though technically it is the “more important” UI element.) Where I agree with you in particular is that I would like the text input to look a bit more like a text input, and having it be white in your version helps a bit — especially in the initial state when a user is about to type. I’m not sure that’s achievable with my approach though. I’m now finishing up a review on the Starlight PR that includes detailed comments for each of the tweaks I made, so then you can perhaps see them in context and decide what you think. Edit: Posted my review: withastro/starlight#3346 (review) |


















Description (required)
This PR removes the custom implementation of DocSearch v3 and updates it to use DocSearch v5 using the official Starlight DocSearch plugin. This PR is still a draft as it currently uses a preview release of the next minor version of the Starlight DocSearch plugin.
Most of the changes can be split into 2 categories:
References
Remaining Tasks
@lunaria-track:src/content/i18n/en.yml