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

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

Open
kaycebasques opened this issue Sep 10, 2024 · 7 comments
Open
Labels
kind: enhancement New feature or request tag: UX Issues or improvements related to user experience

Comments

@kaycebasques
Copy link
Contributor

kaycebasques commented Sep 10, 2024

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

@drammock
Copy link
Collaborator

drammock commented Sep 10, 2024

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

@kaycebasques
Copy link
Contributor Author

@drammock LMK who else I should get onboard before proceeding

@drammock
Copy link
Collaborator

@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)

@12rambau
Copy link
Collaborator

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.

@trallard
Copy link
Collaborator

I am +1 on getting this in PST.

@trallard trallard added kind: enhancement New feature or request tag: UX Issues or improvements related to user experience labels Sep 30, 2024
@kaycebasques
Copy link
Contributor Author

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

@kaycebasques
Copy link
Contributor Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: enhancement New feature or request tag: UX Issues or improvements related to user experience
Projects
None yet
Development

No branches or pull requests

4 participants