feat(explore): show entity icons in Data Asset quick-filter dropdown - #30583
feat(explore): show entity icons in Data Asset quick-filter dropdown#30583Rohit0301 wants to merge 5 commits into
Conversation
Adds gray-500 entity icons to the left of each item in the Data Asset dropdown on the /explore page, using searchClassBase.getEntityIcon. Also centres items vertically (Space align="center") and collapses icon wrapper line-height (tw:leading-[0]) for pixel-accurate alignment. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
❌ 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 failedValidated commit ✅ 0 passed · ❌ 0 failed · 🟡 0 flaky · ⏭️ 0 skipped · 🧰 0 lifecycle flaky Pipeline and setup failures (5)
Performance⚪ Performance metrics unavailable; see the CI and reporting failures above.
How to debug locally# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip # view trace |
| const addEntityTypeIcons = ( | ||
| key: string, | ||
| opts: SearchDropdownOption[] | ||
| ): SearchDropdownOption[] => { | ||
| if (!ENTITY_TYPE_FILTER_KEYS.has(key)) { | ||
| return opts; | ||
| } | ||
| return opts.map((opt) => ({ | ||
| ...opt, | ||
| icon: | ||
| searchClassBase.getEntityIcon( | ||
| getCanonicalEntityType(opt.key), | ||
| 'tw:text-gray-500', | ||
| {}, | ||
| EntityIconSize.Size16 |
There was a problem hiding this comment.
💡 Bug: Selected option carries ReactNode icon into filter value state
addEntityTypeIcons attaches a React element to each option's icon field, and handleOptionToggle/handleApply in QuickFilterDropdown (and the legacy SearchDropdown path) propagate the full selected option — including icon — into field.value via onChange/onFieldValueSelect. Downstream query-filter construction and Explore's URL persistence only need key/label; if field.value is ever JSON/Qs-serialized (e.g. into the URL quick-filter param), the ReactNode would serialize to garbage or bloat the query string. Consider stripping icon before passing selected values to onChange, e.g. map to { key, label }.
Was this helpful? React with 👍 / 👎
❌ UI Checkstyle Failed❌ ESLint + Prettier + Organise Imports (src)One or more source files have linting or formatting issues. Affected files
❌ Tailwind AuditHardcoded Tailwind values found. Use a design-system utility (run ❌ Antd + Less Deprecation GuardA new Affected filesat Function._resolveFilename (node:internal/modules/cjs/loader:1401:15) Fix locally (fast - only checks files changed in this branch): make ui-checkstyle-changed |
Code Review 👍 Approved with suggestions 1 resolved / 2 findingsAdds entity icons to the Data Asset quick-filter dropdown across legacy and new dropdown implementations. Consider preventing the ReactNode icon from propagating into filter state during selection toggles. 💡 Bug: Selected option carries ReactNode icon into filter value state📄 openmetadata-ui/src/main/resources/ui/src/components/Explore/QuickFilterDropdown.tsx:127-141 📄 openmetadata-ui/src/main/resources/ui/src/components/Explore/QuickFilterDropdown.tsx:154-162 📄 openmetadata-ui/src/main/resources/ui/src/components/Explore/ExploreQuickFilters.tsx:65-79 📄 openmetadata-ui/src/main/resources/ui/src/components/Explore/ExploreQuickFilters.tsx:337-339
✅ 1 resolved✅ Quality: Icon uses raw palette color tw:text-gray-500 instead of semantic token
🤖 Prompt for agentsOptionsDisplay: compact → Showing less information. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Gitar | Powered by Gitar — free for open source |
|



Describe your changes:
I worked on adding entity icons to the Data Asset quick-filter dropdown on the
/explorepage because the items lacked visual differentiation between entity types (Table, Column, Dashboard, etc.).Changes made:
icon?: ReactNodefield toSearchDropdownOptioninterfaceaddEntityTypeIconshelper inExploreQuickFiltersthat callssearchClassBase.getEntityIconto resolve a 16px gray-500 icon for each entity type optionSearchDropdown(Ant Design) path viagenerateSearchDropdownLabeland the newQuickFilterDropdown(Untitled-UI) pathSpace align="center") and collapsed icon wrapper line-height (tw:leading-[0]) for pixel-accurate centeringType of change:
High-level design:
N/A — small change.
Tests:
Use cases covered
/exploreshows a gray entity icon to the left of each label (Table, Column, Dashboard, Pipeline, etc.)SearchDropdownand the Untitled-UIQuickFilterDropdown(used in the Assets Selection Modal/drawer)undefined)Unit tests
Backend integration tests
Ingestion integration tests
Playwright (UI) tests
Manual testing performed
/explorelocallyUI screen recording / screenshots:
Checklist:
Fixes <issue-number>: <short explanation>Fixes #<issue-number>above.Summary by Gitar
aiFrameworkControl,aiGovernancePolicy,LLMService, andMCPServiceentity types inAssets.constants.tsandTableUtils.tsxThis will update automatically on new commits.
Greptile Summary
Adds entity-specific icons across Explore quick filters and lineage node suggestions.
Confidence Score: 5/5
The PR appears safe to merge.
No blocking failure remains.
Important Files Changed
Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart LR A[Entity type option] --> B[Canonicalize entity type] B --> C[Resolve shared entity icon] C --> D[SearchDropdown legacy UI] C --> E[QuickFilterDropdown Untitled UI] C --> F[Lineage node suggestions]Reviews (5): Last reviewed commit: "fixed lineage entity icons" | Re-trigger Greptile