Skip to content

[WiP] Search remodel - UI query builder - advanced search improvements - eificiency improovements - #6491

Closed
mosiac1 wants to merge 4 commits into
open-metadata:mainfrom
mosiac1:advancer_search
Closed

mosiac1 wants to merge 4 commits into
open-metadata:mainfrom
mosiac1:advancer_search

Conversation

@mosiac1

@mosiac1 mosiac1 commented Aug 1, 2022 •

Copy link
Copy Markdown
Contributor

Describe your changes :

Searching in OpenMetadata is a crucial feature and at the moment it may not entirely suit the needs of all users and admins.
The aim of this PR is to make searching:

  1. More precise - better guessing the information that users are looking for
  2. More powerful - giving power users the ability to build the queries they want
  3. More versatile - from fine-grain adjustment to extensive filtering

The major technical changes are:

  1. /search/query now accepts 2 more arguments: query_filter and post_filter. These follow Elasticsearch's paradigm of filtering: the query_filter is combined with the query_string (these work together in calculating the score of each document and follow Elasticsearch's normal querying mechanism) and the post_filter is used as a post filter (it does not affect the ranking of results, nor the aggregations - it's applied at the very end). This is used to separate search inputs on the explore page into filtering (the query builder, advanced search fields) and post-filtering (the left Facet).
  2. Using https://www.npmjs.com/package/react-awesome-query-builder added a UI-based complex query builder (see screenshots). This is meant for power users. The dependency stores the query in an internal tree representation that can easily be converted to Elasticsearch queries. The input support selects and multi-selects with autocomplete.
  3. Refactored search API return types. This is more for developers' comfort and to better model the data used by the UI.

WARNING: WiP
This is still in the mid-development stages. The concept works and needs to be polished. This should work to run locally using sample data for testing and demos.
I will continue to work on the code with cleanup/small changes/testing!

BTW: Sorry for how messy the PR is, I wanted to get something out ASAP - there are a lot of changes not related to the main feature that are rather PoC. Once we get the details ironed out we can split this into multiple PRs or remove the extra bulk.

Type of change :

  • Improvement
  • New feature
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Frontend Preview (Screenshots) :

![image](https://user-images.githubusercontent.com/88427079/182221082-c4ee4717-e897-4ff1-9900-6da43234f04e.png)

Checklist:

  • I have read the CONTRIBUTING document.
  • I have commented on my code, particularly in hard-to-understand areas.
  • I have added tests that prove my fix is effective or that my feature works.
  • All new and existing tests passed.

Reviewers

Frontend: @open-metadata/ui
Backend: @open-metadata/backend

@mosiac1
mosiac1 temporarily deployed to cypress August 1, 2022 18:48 Inactive
@mosiac1
mosiac1 temporarily deployed to cypress August 1, 2022 18:48 Inactive
@github-actions

github-actions Bot commented Aug 1, 2022

Copy link
Copy Markdown
Contributor

The Java checkstyle failed.

Please run mvn googleformatter:format@reformat-sources in the root of your repository and commit the changes to this PR.
You can also use pre-commit to automate the Java code formatting.

You can install the pre-commit hooks with make install_test precommit_install.

@mosiac1
mosiac1 temporarily deployed to cypress August 1, 2022 18:53 Inactive
@mosiac1
mosiac1 temporarily deployed to cypress August 1, 2022 18:53 Inactive
@github-actions

github-actions Bot commented Aug 1, 2022

Copy link
Copy Markdown
Contributor

The Java checkstyle failed.

Please run mvn googleformatter:format@reformat-sources in the root of your repository and commit the changes to this PR.
You can also use pre-commit to automate the Java code formatting.

You can install the pre-commit hooks with make install_test precommit_install.

@harshach

harshach commented Aug 2, 2022

Copy link
Copy Markdown
Collaborator

@Sachin-chaurasiya can you take a look.
@mosiac1 can you rebase with the latest main?

@Sachin-chaurasiya

Sachin-chaurasiya commented Aug 2, 2022 •

Copy link
Copy Markdown
Contributor

@Sachin-chaurasiya can you take a look. @mosiac1 can you rebase with the latest main?

Sure @harshach, we will have a look.
cc: @chirag-madlani

@mosiac1
mosiac1 temporarily deployed to cypress August 3, 2022 10:21 Inactive
@mosiac1
mosiac1 temporarily deployed to cypress August 3, 2022 10:21 Inactive
@github-actions

github-actions Bot commented Aug 3, 2022

Copy link
Copy Markdown
Contributor

The Java checkstyle failed.

Please run mvn googleformatter:format@reformat-sources in the root of your repository and commit the changes to this PR.
You can also use pre-commit to automate the Java code formatting.

You can install the pre-commit hooks with make install_test precommit_install.

@mosiac1
mosiac1 temporarily deployed to cypress August 3, 2022 10:41 Inactive
@mosiac1
mosiac1 temporarily deployed to cypress August 3, 2022 10:41 Inactive
@github-actions

github-actions Bot commented Aug 3, 2022

Copy link
Copy Markdown
Contributor

The Java checkstyle failed.

Please run mvn googleformatter:format@reformat-sources in the root of your repository and commit the changes to this PR.
You can also use pre-commit to automate the Java code formatting.

You can install the pre-commit hooks with make install_test precommit_install.

@mosiac1
mosiac1 temporarily deployed to cypress August 3, 2022 10:43 Inactive
@mosiac1
mosiac1 temporarily deployed to cypress August 3, 2022 10:43 Inactive
@github-actions

github-actions Bot commented Aug 3, 2022

Copy link
Copy Markdown
Contributor

The Java checkstyle failed.

Please run mvn googleformatter:format@reformat-sources in the root of your repository and commit the changes to this PR.
You can also use pre-commit to automate the Java code formatting.

You can install the pre-commit hooks with make install_test precommit_install.

@mosiac1
mosiac1 temporarily deployed to cypress August 3, 2022 10:51 Inactive
@mosiac1
mosiac1 temporarily deployed to cypress August 3, 2022 10:51 Inactive
@github-actions

github-actions Bot commented Aug 3, 2022

Copy link
Copy Markdown
Contributor

The Java checkstyle failed.

Please run mvn googleformatter:format@reformat-sources in the root of your repository and commit the changes to this PR.
You can also use pre-commit to automate the Java code formatting.

You can install the pre-commit hooks with make install_test precommit_install.

@mosiac1 mosiac1 closed this Aug 3, 2022
shah-harshit added a commit that referenced this pull request Sep 21, 2026
…palette guideline

- Scope the 90% destructive fill opacity to the primary-destructive button
  (tw:dark:bg-error-solid/90) and revert the shared --color-bg-error-solid
  token to opaque, so badges / error FeaturedIcons / relationship swatches
  stay solid (addresses greptile/gitar review).
- fg-quaternary dark gray-600 -> gray-400 (quaternary icons clear the 3:1
  floor; matches Collate #6491 fg-quaternary -> tertiary).
- border-secondary dark gray-800 -> white 8% (card edges/dividers were
  invisible on gray-800 surfaces).
- Modal overlay: panel on Raised gray-700, scrim near-black gray-950.
- Storybook: WithLeadingIcon, IconOnly and Modal render light|dark side-by-side.

Light mode unchanged.
DaniS2001 pushed a commit to DaniS2001/OpenMetadata that referenced this pull request Sep 21, 2026
…open-metadata#33714)

* fix(ui): dark-mode destructive fill opacity and blue link button tone

Apply 0.9 opacity to the dark error-solid fill (primary-destructive button)
and flip the link-color button to the blue-300 link tone in dark, per the
dark-mode palette guideline. Light mode stays unchanged. Show both variants
side-by-side in Storybook (Colors, LinkColors).

* fix(ui): scope destructive opacity to button; align dark tokens with palette guideline

- Scope the 90% destructive fill opacity to the primary-destructive button
  (tw:dark:bg-error-solid/90) and revert the shared --color-bg-error-solid
  token to opaque, so badges / error FeaturedIcons / relationship swatches
  stay solid (addresses greptile/gitar review).
- fg-quaternary dark gray-600 -> gray-400 (quaternary icons clear the 3:1
  floor; matches Collate open-metadata#6491 fg-quaternary -> tertiary).
- border-secondary dark gray-800 -> white 8% (card edges/dividers were
  invisible on gray-800 surfaces).
- Modal overlay: panel on Raised gray-700, scrim near-black gray-950.
- Storybook: WithLeadingIcon, IconOnly and Modal render light|dark side-by-side.

Light mode unchanged.

* fix(ui): brand tint 14% and 60% dark modal scrim per palette guideline

- --color-bg-brand-primary dark 16% -> 14% (nav-active / brand count chip).
- Modal scrim 60% in dark (tw:dark:bg-overlay/60); light stays 70%.

Light mode unchanged.

* fix(ui): dark modal story via body .dark-mode, not theme:both

React Aria portals the modal to document.body, so the theme:'both' decorator
(which wraps only the story root) never themed the overlay/surface. Drop the
meta theme:'both' and add a DarkOverlay story that toggles .dark-mode on
<body> so the portalled panel/scrim render with dark tokens (addresses
greptile P2).

* fix(ui): move dark-mode toggle into render to satisfy rules-of-hooks

useEffect in an anonymous Storybook decorator tripped react-hooks/rules-of-hooks
(UI checkstyle). Move the .dark-mode body toggle into the story's render (where
useState already runs), dropping the decorator.
timothybrush pushed a commit to timothybrush/OpenMetadata that referenced this pull request Sep 22, 2026
…s with palette guideline (open-metadata#6491) (open-metadata#33751)

* fix(ui): align dark brand + status-chip tokens with Collate open-metadata#6491

Port the AI-mode palette values into core dark tokens so OSS matches the
video / Collate open-metadata#6491 without a scoped layer:
- Brand foreground + text (fg-brand-*, text-brand-primary/secondary) -> blue-300
  link tone (was brand-500 / gray). Fixes saturated active-tab text + underline
  and other brand-blue accents.
- Status-chip utility-error/warning: 50/100 -> 500 @16% tint, 200 -> 500 @35%
  border, 500/700 -> 400-step text (was solid error-950/warning-950 dark-on-dark
  fills). Fixes the AttentionBadgeChip 'Owner Missing' / 'Certification Expired'
  brown/muddy look -> subtle tint chip.

Light mode unchanged.

* fix(ui): neutral filter-select active border in dark

The bordered filter trigger's active-selection border used tw:after:outline-brand,
which stays brand-blue in dark (border-brand = brand-400). Add
tw:dark:after:outline-brand_alt so the dark border resolves to the neutral
control tone (gray-700) while light stays brand (unchanged).

* fix(ui): success status chips use 16% tint + 400 text in dark

utility-success 50/100 -> 500 @16% tint, 200 -> 500 @35% border, 500/700 ->
400-step text (were solid success-950 dark-on-dark fills) — matches the
error/warning treatment so green status badges (Metadata tag, approve check)
read as a subtle tint chip in dark. Light unchanged.

* fix(ui): DQ dashboard cards sit on surface, not page, in dark

The dark-mode override pinned the pie-chart / status-card / custom-chart
backgrounds to --om-color-bg-primary (gray-950 = the page color), so the
cards had no elevation and blended into the page. Use --om-color-bg-surface
(gray-800) — the dark surface the override was meant to give them.

* fix(ui): DQ/incident card wrappers use surface bg in dark

- TestSuiteListPanel: tw:bg-primary -> tw:bg-surface (page->surface).
- TestCaseConfigurationCard: tw:bg-bg-primary (invalid class -> no bg, page
  showed through) -> tw:bg-surface.

* fix(ui): test case details page dark surfaces + status banner

- Header card + chart card (.test-case-result-tab-graph) -> bg-surface (were
  page/gray-950, blended into the page).
- Param / SQL / code-editor boxes + result tooltip -> --om-color-bg-surface;
  tooltip text @black -> --om-color-text-primary.
- Last-run banner: Aborted/Failed used raw bg-yellow-50 / bg-error-50 (static
  light) -> bg-utility-warning-50 / bg-utility-error-50 so they flip to the
  dark 16% tint (config card was already fixed to bg-surface).

* fix(ui): entity-palette swatches render blank in consumers without theme tokens

The entity color palette was tokenized in open-metadata#32917 so themes could remap hues,
but getEntityPalettePresentationColor emitted bare `var(--color-entity-palette-*)`
with no fallback. Consumers of ui-core-components that don't ship these custom
properties (e.g. the Collate build) resolve the var to nothing, so the tag and
glossary color/icon picker swatches paint transparent — blank.

Bake each token's hex value in as a var() fallback
(`var(--color-entity-palette-blue, #1470EF)`) so the color always renders while a
theme can still override the property. Fixes blank swatches with no downstream
consumer change.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>

* test(ui): update TestCaseLastRunBanner class assertions to utility tokens

The banner constants moved Aborted/Failed backgrounds from static bg-yellow-50/
bg-error-50 to bg-utility-warning-50/bg-utility-error-50 (so they flip in dark);
update the test's expected class map to match. Fixes the failing jest coverage
run.

* chore(ui): drop test-case-result-tab.style.less edits to avoid open-metadata#32069 queue conflict

open-metadata#32069 (CodeMirror v6) renames .CodeMirror/.CodeMirror-gutters -> .cm-editor/
.cm-gutters in this file, overlapping this PR's surface-bg edits and causing a
merge-queue conflict. Revert this file to main so the two PRs no longer touch
the same lines. The test-case-tab param/SQL/code/graph surface backgrounds will
re-land in a follow-up on the new .cm-* selectors once open-metadata#32069 merges.

* fix(ui): test-case-result-tab dark surfaces on the cm-* selectors (open-metadata#32069 merged)

open-metadata#32069 (CodeMirror v6) is now in main, so re-apply the dark surface backgrounds
this PR dropped to dodge the queue conflict — now on the renamed selectors:
graph card, parameter-container, sql-expression-container, and the .cm-editor
code area -> bg-surface; tooltip -> bg-surface + text-primary (was @black).

---------

Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>

This branch was previously deployed

1 inactive deployment
cypress — b36bdc2f Deployed Aug 3, 2022 by mosiac1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants