Repository navigation
Move the query-builder and filter glossary fields onto GlossaryTermPicker - #33736
Conversation
Migrates the remaining glossary-term selectors: the Workflow Builder condition values, the Data Quality dashboard filter, and the three query-builder fields (advanced search, JSONLogic related terms, and the data contract semantics rule). The query-builder fields mark themselves with `withGlossaryTermField` rather than being matched by path, because the JSONLogic builders reach glossary terms, classification tags and tier through the same `tags.tagFQN` subfield. The widgets swap only the rendered control and still hand RAQB the same FQN string, so operators and the ES/JSONLogic serialisation are unchanged. `fqnsToGlossaryTags`/`glossaryTagsToFqns` centralise the FQN mapping the CSV editor already needed.
…inside The filter bar renders every filter as a labelled button chip, and its regression test asserts that. Rendering the picker's input trigger there broke both that check and the flow that drives the chip's search box. Give the picker the button trigger and staged commit the other filters use, so the chip affordance is unchanged and only the dropdown contents become the shared tree.
…s do The dashboard's E2E locators are label-based (search-dropdown-Tag, search-dropdown-Glossary Term); switching to searchKey broke the domain-tab filter-bar check.
❌ PR checklist incompleteThis PR cannot be merged until the following are addressed on its linked issue:
The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically. Maintainers can bypass this check by adding the |
|
Hi there 👋 Thanks for your contribution! The OpenMetadata team will review the PR shortly! Once it has been labeled as Let us know if you need any help! |
✅ Playwright Results — workflow succeededValidated commit ✅ 4504 passed · ❌ 0 failed · 🟡 8 flaky · ⏭️ 1 skipped · 🧰 0 lifecycle flaky PerformanceBlocking targets: ✅ met · Optimization targets: 🟡 in progress Shard-job maxima below are not the full workflow wall time; the linked run includes build, fixture, planning, and reporting. 🕒 Full workflow signal wall (to summary) 1h 58m 57s ⏱️ Max setup 4m 51s · max shard execution 21m 33s · max shard-job elapsed before upload 25m 27s · reporting 22s 🌐 224.97 requests/attempt · 2.23 app boots/UI scenario · 39.13% common-shard skew Optimization targets still in progress:
🟡 8 flaky test(s) (passed on retry)
How to debug locally# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip # view trace |
| <GlossaryTermPicker | ||
| commitMode="staged" | ||
| data-testid={`search-dropdown-${filter.label}`} | ||
| key={filter.key} | ||
| label={filter.label} | ||
| triggerVariant="button" | ||
| value={fqnsToGlossaryTags(filter.selectedFqns)} | ||
| onChange={(terms) => | ||
| filter.onChange(glossaryTagsToFqns(terms)) | ||
| } | ||
| /> |
There was a problem hiding this comment.
Combining staged mode, the button trigger, and cascading root selection produces inconsistent counts. Selecting a glossary root stages the root plus its terms, so Apply shows N+1; the picker then removes the root before committing, and the resulting chip shows N. This makes the displayed selection count change merely because the user applied it.
Knowledge Base Used: Governance and collaboration experience
Comments Outside DiffThese findings sit on lines the diff does not cover, so they could not be posted inline. Each one leaves this list once its file changes.
|
…ping Adds DQ_FILTER_TYPES alongside the existing DQ_FILTER_KEYS and uses it for every `type` on DqFilterDescriptor — the declarations, the emitted descriptors, both renderers and the hook test — so the discriminant is no longer a bare string. Also folds fqnsToGlossaryTags into a single reduce.
The earlier sweep only matched `type === '...'`, so the `type !== '...'` guards in the hook test and the `type: '...' as const` fixtures in the chip and bar tests were left as bare strings.
…com/open-metadata/OpenMetadata into glossary-term-picker-query-surfaces
Code Review ✅ Approved 1 closed / 1 findings🟡 Medium risk · Shared picker migration changes controls across query, workflow, and quality-filter surfaces Migrates glossary-term filters and condition fields to the shared ✅ 1 closed✅ Bug: OMSelectWidget async branch shadows glossary picker
OptionsDisplay: compact → Counting what did not apply, without listing it. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
|



Describe your changes:
Fixes #
Follow-up to #33680, which consolidated the glossary-term assignment surfaces onto
GlossaryTermPicker. The query-builder and filter surfaces still had their own flatasync selects, so a glossary term looked and behaved differently depending on whether
you were assigning it or querying on it.
This moves the remaining five onto the shared picker.
Type of change:
High-level design:
Query-builder fields mark themselves. The JSONLogic builders reach glossary terms,
classification tags and tier through the same
tags.tagFQNsubfield, so a field-pathmatch would swap the tag and tier controls too. Instead each glossary field opts in:
OMSelectWidgetandOMMultiSelectWidgetread that marker offfieldDefinitionandrender
GlossaryTermQueryWidget— which still hands RAQB the same FQN string (or arrayof them). No widget registration changes, and operator handling plus the ES/JSONLogic
serialisation are untouched; only the rendered control differs. Both widgets are wired
because the advanced-search field's operators span single (
select_equals) and multi(
select_any_in).The DQ dashboard filter keeps its chip. That filter bar renders every filter as a
labelled button chip with a count and a staged Apply, and its regression test asserts
that. So the picker is given the
triggerVariant="button"andcommitMode="staged"that
FilterSelectDropdownuses — the chip affordance is unchanged and only thedropdown contents become the shared tree. A new
glossaryTermdescriptor carries theselection, handled by both renderers (OSS and the core-components chip).
Surfaces migrated:
EntityFields.GLOSSARY_TERMSRELATED_TERMS→fullyQualifiedNameglossaryTermField→tagFQNGlossaryandRelated TermsvaluesfqnsToGlossaryTags/glossaryTagsToFqnscentralise the FQN⇄TagLabelmapping thatthe CSV cell editor already needed and now shares.
Deliberately not migrated: the Ontology Explorer visual query builder. Its options
must come from the loaded ontology graph and its value is a term UUID feeding
SPARQL, so the picker — which searches every glossary and yields FQNs — would offer
terms that cannot appear in a result and emit the wrong value type. It needs a
fixed-options mode on the picker, which is a separate change.
Two further fields were left alone as out of scope: JSONLogic "Column Tags" searches
tags and glossary terms together (migrating it would drop classification tags), and
the advanced-search "Glossary" field selects a glossary rather than a term.
Tests:
Use cases covered
rules that must keep the flat select
Unit tests
useDataQualityDashboardFilters.test.ts— the newglossaryTermdescriptorDataQualityDashboard.test.tsx— filter-bar rendering through the pickerqueryBuilderWidgets,AdvancedSearchClassBase,JSONLogicSearchClassBaseand
DataContractUtilssuites pass unchanged, which is the check that the valuecontract did not move
Backend integration tests
Ingestion integration tests
Playwright (UI) tests
DataQualityDashboard.spec.ts— the glossary filter's search box and rows now comefrom the picker, so that step targets them instead of the old dropdown's.
Manual testing performed
unchanged from the flat-select version
confirmed only the glossary rule shows the tree
UI screen recording / screenshots:
Checklist:
Fixes <issue-number>: <short explanation>Fixes #<issue-number>above.🤖 Generated with Claude Code
The PR appears safe to merge, although the existing non-blocking staged-count inconsistency remains unresolved.
Findings
Summary
This PR migrates glossary-term query and filter surfaces to the shared hierarchical
GlossaryTermPickerwhile preserving the existing FQN-based value contracts.TagLabelvalues.Diagram
%%{init: {'theme': 'neutral'}}%% flowchart LR F[Glossary-marked field] --> Q[Query-builder widget factory] Q --> P[GlossaryTermPicker] W[Workflow condition] --> P D[Data Quality filter] --> P P --> M[FQN / TagLabel conversion] M --> C[Existing query or filter contract]Reviews (9) · Last reviewed commit: "Merge branch 'glossary-term-picker-query..."