FEATURE: Initial version of experimental admin search (#31299)

This feature allows admins to find what they are
looking for in the admin interface via a search modal.
This replaces the admin sidebar filter
as the focus of the Ctrl+/ command, but the sidebar
filter can also still be used. Perhaps at some point
we may remove it or change the shortcut.

The search modal presents the following data for filtering:

* A list of all admin pages, the same as the sidebar,
   except also showing "third level" pages like
   "Email > Skipped"
* All site settings
* Themes
* Components
* Reports

Admins can also filter which types of items are shown in the modal,
for example hiding Settings if they know they are looking for a Page.

In this PR, I also have the following fixes:

* Site setting filters now clear when moving between
   filtered site setting pages, previously it was super
   sticky from Ember
* Many translations were moved around, instead of being
   in various namespaces for the sidebar links and the admin
   page titles and descriptions, now everything is under
   `admin.config` namespace, this makes it way easier to reuse
   this text for pages, search, and sidebar, and if you change it
   in one place then it is changed everywhere.

---------

Co-authored-by: Ella <ella.estigoy@gmail.com>
This commit is contained in:
Martin Brennan
2025-02-21 11:59:24 +10:00
committed by GitHub
parent a77d469eeb
commit e26a1175d7
90 changed files with 1582 additions and 525 deletions

View File

@ -1451,7 +1451,12 @@ class Plugin::Instance
def setting_category_name
return if setting_category.blank? || setting_category == "plugins"
I18n.t("admin_js.admin.site_settings.categories.#{setting_category}")
I18n.t("admin_js.#{setting_category_label}")
end
def setting_category_label
return if setting_category.blank? || setting_category == "plugins"
"admin.site_settings.categories.#{setting_category}"
end
def validate_directory_column_name(column_name)
@ -1500,7 +1505,7 @@ class Plugin::Instance
def default_admin_route
{
label: "#{name.underscore}.title",
label: setting_category_label || "#{name.underscore}.title",
location: name,
use_new_show_route: true,
auto_generated: true,