-
Notifications
You must be signed in to change notification settings - Fork 281
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
feat: add general purpose search components #2588
Conversation
… components and types
…earchSourceResultListEnd
…cusedMessage value
Size Change: +146 kB (+12.11%) Total Size: 1.35 MB
ℹ️ View Unchanged
|
fc2a860
to
ed3f7da
Compare
@@ -380,18 +398,29 @@ const UnMemoizedChannelList = < | |||
}, | |||
); | |||
|
|||
const showChannelList = !searchActive || additionalChannelSearchProps?.popupResults; | |||
const showChannelList = | |||
(!searchActive && !searchIsActive) || additionalChannelSearchProps?.popupResults; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure what the difference between searchActive
and searchIsActive
is at first glance.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One is a label to display the old ChannelSearch and the other is derived from the state of searchController to display the new Search component.
# Conflicts: # package.json # yarn.lock
## [12.12.0](v12.11.1...v12.12.0) (2025-02-12) ### Bug Fixes * determine audio recording format with MediaRecorder.isTypeSupported not userAgent ([#2639](#2639)) ([1c445de](1c445de)) ### Features * add general purpose search components ([#2588](#2588)) ([d545207](d545207)) ### Chores * **deps:** upgrade react-markdown to v9 ([#2643](#2643)) ([07812fe](07812fe))
🎉 This PR is included in version 12.12.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
🎯 Goal
Provide general purpose search components and controller. Allow for absolute search customization.
Fixes React-24
Closes #1412
Depends on
🛠 Implementation details
Search controller
Coordinates search execution among individual search sources. Allows to combine unknown search sources defined by the integrator. Implements the search state machine.
Base search source
Takes care of common search source task like:
Search source
Class that takes advantage of inheriting from BaseSearchSource. Each search source should defined integrators or the default one is responsible for:
React components
The new components live in
experimental/Search
folder. This allows for component name duplication compared toChannelSearch
components.An important change is the ability to jump from a message search result to that message in the parent channel. Currently the information about the jumped-to-message is stored in the SearchController state, but this should be moved to a future message list controller state.
The searchController instance has been added to the
ChatContext
.ChannelList
allows to override theChannelSearch
component with the experimentalSearch
component asAlso
ChannelAvatar
has been added to the component context value as a separate key and is prioritized inChannelHeader
andChannelPreview
,Out of scope
🎨 UI Changes
VO0L.webm