Rewrite the spotlight search as a React component#33
Open
ramonski wants to merge 1 commit into
Open
Conversation
a79e4f3 to
1cba25e
Compare
Replace the legacy Backbone/Underscore implementation with a modern React
component that consumes the shared React instance exposed by senaite.core via
Webpack externals (no bundled React copy).
Highlights:
- Dedicated control panel (hotkey, catalogs, commands, result limit,
highlighting) backed by the registry, reachable from a settings link
- Command palette ("/") to navigate or trigger permission-filtered actions
- Catalog prefix scoping ("s:water"), content type narrowing and workflow
state filtering ("is:received") with state autocomplete suggestions
- Relevance ranking over the mixed multi-catalog brain set, computed on brain
metadata only so objects are woken up for the shown results only
- Standalone, listing based search page at "@@spotlight-search"
- Redesigned look and feel as a modern command palette with dark mode
1cba25e to
b12ba2b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Replaces the legacy Backbone/Underscore spotlight with a modern React component. React is consumed from the shared instance exposed by senaite.core (Webpack externals), so this bundle ships no React of its own.
Depends on senaite/senaite.core#2961 (exposes React/ReactDOM globally via
vendor-react.js).What is new
@@spotlight-controlpanel(registry backed,senaite.core: Manage Bika) to configure the hotkey, catalogs, commands, result limit, min chars, debounce and highlighting. Catalogs and commands areDataGridFieldgrids; add-ons can append via their ownregistry.xml. A settings link is shown inside the spotlight to users with the permission./to list all commands (filtered by the user's permissions),/addto filter them.<prefix>:<term>scopes to a single catalog (e.g.s:water).is:<state>filters by workflow state (e.g.s:CA20 is:received), with an autocomplete of the available states (segment-aware matching, soactivedoes not matchinactive).@@spotlight-search(listing based) reachable from the spotlight, with catalog switcher tabs, filters, pagination and breadcrumb locations. Honors the sameis:token and auto-runs from the spotlight's "Advanced search" link.Robustness
-operator so ids likeWS-001no longer collapse the ZCTextIndex search.<NO_VALUE>sentinel) as unset and ignores invalid/non-sortablesort_onindexes, handling catalog errors gracefully.Upgrade
GenericSetup profile 2700 -> 2701 (registers the control panel, registry records and resources).