Skip to content

Search results with breadcrumbs. Search with filters by section. #1913

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

Closed
ksuess opened this issue Mar 15, 2025 · 10 comments · Fixed by #1914
Closed

Search results with breadcrumbs. Search with filters by section. #1913

ksuess opened this issue Mar 15, 2025 · 10 comments · Fixed by #1914
Assignees

Comments

@ksuess
Copy link
Member

ksuess commented Mar 15, 2025

before:

Image

@ksuess ksuess self-assigned this Mar 15, 2025
@ksuess
Copy link
Member Author

ksuess commented Mar 15, 2025

I raise the issue, I propose an implementation.

@ksuess ksuess changed the title Search with filter by section Search results with breadcrumbs. Search with filters by section. Mar 15, 2025
@stevepiercy
Copy link
Contributor

@ksuess how can we implement search by category together with Nuclia search? Now that I have Plone Sphinx Theme stabilized, that's the next big step forward.

@stevepiercy
Copy link
Contributor

Additionally, without hard-coding the categories now, I would prefer to do this upstream in Plone Sphinx Theme. I want to minimize the number of files that we have to modify across the increasing number of Plone documentation sites. We can package template, JavaScript, and CSS files in the distribution now.

@ksuess
Copy link
Member Author

ksuess commented Mar 16, 2025

I am aware that this change here will be replaced with a future AI search. And I am fine with it.
Search by category is for me personally 2nd priority. I am fine with not implementing it with a future AI search.
My need for this PR is, that I want to be able to see which search results are relevant for me. For this it is very helpful to see the section/category of a search result. Especially if there are 50+ results of sections backend, frontend, etc..

And, yes, a lift to the theme Plone-sphinx-theme would be great, if it's possible to do it in a way, that the documentation that uses the theme can configure the categories. If that's not possible. I am fine with not implementing the category filter.

@stevepiercy
Copy link
Contributor

Here are my concerns.

  • Customizing Sphinx's search JavaScript makes it difficult to maintain when Sphinx releases a new version.
  • Keeping categories current in the search-field template is another maintenance task, especially with the continuing reorganization.
  • Nuclia may offer this feature, but with a different implementation. I haven't explored it thoroughly, but this video implies it would be possible.

@stevepiercy
Copy link
Contributor

@ksuess until we can implement Nuclia, I'm OK with adding this in the short-term. However, if it breaks from an update to Sphinx or upstream themes, then we'll have to remove it and fallback to the default Sphinx search. Would that be reasonable?

@ksuess
Copy link
Member Author

ksuess commented Mar 16, 2025

I am happy with an intermediate solution that adds breadcrumbs or just the category/section to search results.

@ksuess
Copy link
Member Author

ksuess commented Mar 16, 2025

If opinions tend to not showing a filter for categories, I am fine with removing this from this PR. My prio is the category on the search result.

@ksuess
Copy link
Member Author

ksuess commented Mar 16, 2025

Maybe we can do the change here and kick it out when the AI search is installed.

@stevepiercy
Copy link
Contributor

Agreed. I just submitted a review of the PR. There's a possible bug, a tweak, and a question for you. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants