Open cdanfon opened 2 years ago
hey @bheasman Tibor has fleshed out this ticket. What would be the next actions?
Thanks both. @anilkanji - this was raised a while back by the team. It feels like a good option if @tbrlpld works on this as a contribution this to core Wagtail as there seems like a clear wider benefit to the community too - are you happy with that approach?
Thanks both, and sorry for the delay - could you estimate how much of a sprint this might take (I know that's not an easy thing to figure out but even a rough sense would be helpful)
I'd say something around 2-3 days plus some buffer for back and forth of feedback from the Wagtail core team.
@cdanfon this would be awesome even though it's core Wagtail, I guess just slap "brought to you by Mozilla" after the dropdown 🤣
Description
Currently, when using the search feature in the Wagtail admin, pages of all locales are returned.
While this is ok in the case in the screenshot with only two languages and two search results for each locale, with more locales and search results per locale, it can get hard to find the page you were searching for pretty quick.
It would be great to have the functionality in Wagtail to filter the search results based on the locale. I think a dropdown in the header could work nicely, since it's next to the search bar on the results screen. It is also how you select locale in the page edit screen or select sites in the settings screens (e.g. feature flags).
To avoid having to reinvent this feature in the future, it would be great to contribute this feature as a PR directly to Wagtail. Also, since this is an override of internal Wagtail functionality, if we were to develop this for our project only, we would need to make sure that future work in Wagtail is not breaking our overrides. Having this feature contributed to Wagtail directly would mean that it will be automatically included and considered in future updates of Wagtail itself.
Acceptance criteria
WAGTAIL_I18N_ENABLED = False
) the locale switcher is not displayed.Dev tasks
templates/wagtailadmin/pages/search.html
templates/wagtailadmin/pages/search_results.html
wagtail.admin.views.pages.search
┆Issue is synchronized with this Jira Task