pydata/pydata-sphinx-theme

Search-as-you-type UX built on top of built-in Sphinx search tools

kaycebasques opened this issue ยท 7 comments

Hello! pigweed.dev switched over to PyData Sphinx Theme (PST) last week. We're happy to join the family :)

I managed to cobble together an inline search AKA search-as-you-type UX built on top of Sphinx's built-in search tools:

search-as-you-type.webm

Would you all be interested in me upstreaming this into PST?

Here's the core logic: https://github.com/google/pigweed/blob/03466a70189630fc2d659f919c6f9eb141effe54/docs/_static/js/pigweed.js#L22-L128

It requires loading the built-in search tools on each page: https://github.com/google/pigweed/blob/03466a70189630fc2d659f919c6f9eb141effe54/docs/layout/layout.html#L29-L32

I can set it up as an opt-in feature (i.e. you have to flip some config flag in conf.py to True before it's enabled on any site).

It did require using the built-in search tools a bit beyond their intended scope. I can kick off a discussion in the upstream Sphinx repo to check that they're cool with supporting this type of usage.

And of course there's lots of room to improve / polish the UI

This would be a big win for our users. I don't want to speak for other maintainers but AFAIC this should be full speed ahead

@drammock LMK who else I should get onboard before proceeding

@drammock LMK who else I should get onboard before proceeding

@trallard @gabalafou and @Carreau (assuming @12rambau is already on board, as he was attempting similar things already a year or so ago, but stalled)

I'm completely onboard there are multiple attempts on stale in my personnal forks. I wanted to achieve the same level of fluidity as they get in the sphinx immaterial theme.
I think it would be be simlply awesome to have an out of the box solution for this. Implementing what you already have would be wonderful and we can iterate on the UX once the JS logic is there.

I am +1 on getting this in PST.

Great! It sounds like there is sufficient quorum. I will start my upstreaming PR this week.

(status update) I have a conference early next week and then should have more time to continue work on this