Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the Data Marketplace UI to filter which announcements are shown, by allowing AnnouncementsWidgetV2 to accept an explicit list of EntityTypes and using that list to filter results from the announcements API.
Changes:
- Pass an explicit entity-type filter (
DOMAIN,DATA_PRODUCT) fromDataMarketplacePageintoAnnouncementsWidgetV2. - Add a new optional prop to
AnnouncementsWidgetV2and apply it to announcement filtering logic.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| openmetadata-ui/src/main/resources/ui/src/pages/DataMarketplacePage/DataMarketplacePage.component.tsx | Passes an entity-type filter into AnnouncementsWidgetV2 for the Data Marketplace page. |
| openmetadata-ui/src/main/resources/ui/src/components/DataMarketplace/AnnouncementsWidgetV2/AnnouncementsWidgetV2.component.tsx | Adds a new prop to control filtering and applies it when fetching active announcements. |
Comments suppressed due to low confidence (1)
openmetadata-ui/src/main/resources/ui/src/components/DataMarketplace/AnnouncementsWidgetV2/AnnouncementsWidgetV2.component.tsx:33
- There is an
importstatement after a non-import declaration (type AnnouncementsWidgetV2Props ...). In ES modules/TypeScript, all imports must come before other statements; this will fail to compile/lint. Move theAnnouncementsWidgetV2Propstype below the import block (or convert the later import into a type-only import earlier).
type AnnouncementsWidgetV2Props = WidgetCommonProps & {
type?: EntityType[];
};
import {
getEntityFQN,
getEntityType,
prepareFeedLink,
} from '../../../utils/FeedUtils';
| <AnnouncementsWidgetV2 | ||
| type={[EntityType.DOMAIN, EntityType.DATA_PRODUCT]} | ||
| widgetKey="announcements" | ||
| /> |
| <AnnouncementsWidgetV2 | ||
| type={[EntityType.DOMAIN, EntityType.DATA_PRODUCT]} | ||
| widgetKey="announcements" | ||
| /> |
|
@gitar-bot address issues |
Co-authored-by: Karan Hotchandani <33024356+karanh37@users.noreply.github.com>
Both issues have been addressed:
|
Code Review ✅ Approved 2 resolved / 2 findingsStabilizes the AnnouncementsWidgetV2 component by resolving an infinite re-fetch loop caused by inline array props and correcting import ordering. No issues found. ✅ 2 resolved✅ Performance: Inline array prop causes infinite re-fetch loop
✅ Quality: Type alias declared between import statements
OptionsDisplay: compact → Showing less information. Comment with these commands to change:
Was this helpful? React with 👍 / 👎 | Gitar |
|
🔴 Playwright Results — 2 failure(s), 10 flaky✅ 4016 passed · ❌ 2 failed · 🟡 10 flaky · ⏭️ 86 skipped
Genuine Failures (failed on all attempts)❌
|



Describe your changes:
Fixes #
This PR updates the Data Marketplace UI to filter which announcements are shown, by allowing AnnouncementsWidgetV2 to accept an explicit list of EntityTypes and using that list to filter results from the announcements API.
Type of change:
High-level design:
N/A — small change.
Tests:
Use cases covered
Unit tests
Backend integration tests
Ingestion integration tests
Playwright (UI) tests
Manual testing performed
UI screen recording / screenshots:
Not applicable.
Checklist:
Fixes <issue-number>: <short explanation>Fixes #<issue-number>above.Summary by Gitar
typeproperty toAnnouncementsWidgetV2to allow filtering by entity type.AnnouncementsWidgetV2logic to filter active announcements based on the provided entity types.DataMarketplacePageto passDOMAINandDATA_PRODUCTtypes to theAnnouncementsWidgetV2component.This will update automatically on new commits.