Skip to content
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

Open
wants to merge 7 commits into
base: staging
Choose a base branch
from
Open

Component search upgrades #7314

wants to merge 7 commits into from

Conversation

vder
Copy link
Contributor

@vder vder commented Dec 11, 2024

Describe your changes

some adjustments in advanced search toolbar:

  • rename id to name in search string
  • reordering of the searching fields
  • fixing type filter + additional autocompletion there

Checklist before merge

  • Related issue ID is placed at the beginning of PR title in [brackets] (can be GH issue or Nu Jira issue)
  • Code is cleaned from temporary changes and commented out lines
  • Parts of the code that are not easy to understand are documented in the code
  • Changes are covered by automated tests
  • Showcase in dev-application.conf added to demonstrate the feature
  • Documentation added or updated
  • Added entry in Changelog.md describing the change from the perspective of a public distribution user
  • Added MigrationGuide.md entry in the appropriate subcategory if introducing a breaking change
  • Verify that PR will be squashed during merge

Copy link
Contributor

github-actions bot commented Dec 11, 2024

updated: #7315
⚠️ Be careful! Snapshot changes are not necessarily the cause of the error. Check the logs.

@vder vder force-pushed the component-search-upgrades branch from e172450 to 023d0a2 Compare December 11, 2024 12:40

type SelectorResult = { expression: string } | string;
type Selector = (node: NodeType) => SelectorResult | SelectorResult[];
type FilterSelector = { name: string; selector: Selector }[];

const fieldsSelectors: FilterSelector = [
{
name: "id",
name: "name",

Copy link
Member

@gskrobisz gskrobisz Dec 12, 2024

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"),
Copy link
Contributor

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[];
Copy link
Contributor

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"),
Copy link
Contributor

@lciolecki lciolecki Dec 12, 2024

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()),
Copy link
Contributor

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?

@vder vder force-pushed the component-search-upgrades branch from 5739db2 to c81dc67 Compare December 17, 2024 18:40
import { nodeInput } from "../graph/node-modal/NodeDetailsContent/NodeTableStyled";
import React from "react";

export const SearchLabeledAutocomplete = ({ children, name, options, value, setFilterFields }) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need separated component? It seems this is just a proxy for styles/?

paramValue: t("panels.search.field.paramValue", "Value"),
outputValue: t("panels.search.field.outputValue", "Output"),
edgeExpression: t("panels.search.field.edgeExpression", "Edge"),
label: t("panels.search.field.paramName", "Label"),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

panels.search.field.label
panels.search.field.value
panels.search.field.output
panels.search.field.edge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client client main fe ui
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants