-
Notifications
You must be signed in to change notification settings - Fork 94
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
Component search upgrades #7314
base: staging
Are you sure you want to change the base?
Conversation
updated: #7315 |
e172450
to
023d0a2
Compare
|
||
type SelectorResult = { expression: string } | string; | ||
type Selector = (node: NodeType) => SelectorResult | SelectorResult[]; | ||
type FilterSelector = { name: string; selector: Selector }[]; | ||
|
||
const fieldsSelectors: FilterSelector = [ | ||
{ | ||
name: "id", | ||
name: "name", | ||
|
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.
Unnecesary line?
@@ -40,7 +40,7 @@ export function AdvancedSearchFilters({ | |||
|
|||
const displayNames = useMemo( | |||
() => ({ | |||
id: t("panels.search.field.id", "Name"), | |||
name: t("panels.search.field.id", "Name"), |
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.
panels.search.field.id -> panels.search.field.name?
description?: string[]; | ||
type?: string[]; | ||
componentGroup?: string[]; |
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.
As I remember we don't need it?
@@ -94,13 +121,13 @@ export function useFilteredNodes(searchQuery: SearchQuery): { | |||
|
|||
const displayNames = useMemo( | |||
() => ({ | |||
id: t("panels.search.field.id", "Name"), | |||
name: t("panels.search.field.id", "Name"), |
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.
panels.search.field.id -> panels.search.field.name
|
||
return useMemo(() => { | ||
return new Set( | ||
componentsGroups.flatMap((componentGroup) => componentGroup.components).map((component) => component.label.toLowerCase()), |
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.
Do we need component group?
Describe your changes
some adjustments in advanced search toolbar:
id
toname
in search stringChecklist before merge