Skip to content

Updated context center icons#29775

Open
Rohit0301 wants to merge 11 commits into
mainfrom
context-center-icons
Open

Updated context center icons#29775
Rohit0301 wants to merge 11 commits into
mainfrom
context-center-icons

Conversation

@Rohit0301

@Rohit0301 Rohit0301 commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Describe your changes:

Fixes #

I worked on ... because ...

Type of change:

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

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:

  • I have read the CONTRIBUTING document.
  • My PR title is Fixes <issue-number>: <short explanation>
  • My PR is linked to a GitHub issue via Fixes #<issue-number> above.
  • I have commented on my code, particularly in hard-to-understand areas.
  • For JSON Schema changes: I updated the migration scripts or explained why it is not needed.
  • For UI changes: I attached a screen recording and/or screenshots above.
  • I have added tests (unit / integration / Playwright as applicable) and listed them above.

Summary by Gitar

  • UI/UX improvements:
    • Replaced various external library icons with custom SVG assets across ContextCenter and KnowledgeCenter components to standardize the icon set.
    • Updated ButtonUtility styles and iconography to improve visual consistency and alignment across the UI.

This will update automatically on new commits.

Greptile Summary

This PR migrates icon usage across ContextCenter and KnowledgeCenter components from @untitledui/icons external library to custom SVG assets, and updates ButtonUtility tertiary style tokens. The change also adds new SVG icon sets under action-icons/, common/, and sidebar-icons/ directories.

  • Icon migration: Replaces @untitledui/icons components (e.g., Trash01, File06, Copy06, Clock, DotsVertical) with ReactComponent SVG imports across 15+ files; icon props shift from passing component types to passing pre-sized <Svg height={n} width={n} /> elements.
  • ButtonUtility style update: Changes the tertiary variant classes from tw:text-fg-quaternary/tw:hover:text-fg-quaternary_hover to tw:text-quaternary/tw:hover:text-tertiary, and reorders imports to match project convention.
  • Test fix: Splits the KnowledgePageUtils mock in ArticleDetailHeader.test.tsx so getKnowledgePageName is mocked under KnowledgePagePureUtils (its actual module), keeping updateKnowledgeCenterRecentViewed in KnowledgePageUtils.

Confidence Score: 5/5

Safe to merge — the change is a mechanical icon swap with no logic or API surface alterations.

All modified files perform a straightforward substitution of external library icon components for custom SVG imports. No data flow, API calls, state management, or routing logic is altered. The test mock correction in ArticleDetailHeader.test.tsx fixes an existing mismatch rather than introducing risk.

No files require special attention — all icon paths resolve to the new SVG files added in this PR.

Important Files Changed

Filename Overview
openmetadata-ui/src/main/resources/ui/src/components/ContextCenter/ArticleDetailHeader/ArticleDetailHeader.component.tsx Replaces 10 @untitledui/icons with custom SVGs; thumb/follow/vote buttons refactored. One residual CSS typo (ttw:shrink-0) from a previous thread remains in the trash icon className.
openmetadata-ui-core-components/src/main/resources/ui/src/components/base/buttons/button-utility.tsx Updates tertiary button color tokens and reorders imports to match project style; functionally correct.
openmetadata-ui/src/main/resources/ui/src/components/ContextCenter/DocumentsView/DocumentsView.component.tsx Replaces external icons (Copy06, Download01, Trash01, Pin02) with custom SVGs; manages dropdown trigger migration from Dropdown.DotsButton to ButtonUtility.
openmetadata-ui/src/main/resources/ui/src/components/ContextCenter/MemoriesView/MemoriesView.component.tsx Migrates Clock, Copy06, Trash01 to custom SVGs; clock icon increases from 12px to 16px.
openmetadata-ui/src/main/resources/ui/src/components/KnowledgeCenter/KnowledgePagesHierarchy/KnowledgePagesHierarchy.tsx Replaces File06 with custom FileIcon but retains Trash01 from @untitledui/icons, making it the only file in the PR that still uses the old trash icon.
openmetadata-ui/src/main/resources/ui/src/constants/LeftSidebar.constants.ts Replaces sidebar icons (Archive, File06, FolderIcon, GridIcon, Lightbulb03) with new sidebar-specific SVGs; clean migration.
openmetadata-ui/src/main/resources/ui/src/pages/ContextCenterPage/ContextCenterDashboardPage/ContextCenterDashboardPage.tsx Replaces File05, File06, Sun, UploadCloud02 with custom SVGs for article/memory pillar cards and upload button.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[ContextCenter / KnowledgeCenter Components] --> B{Icon Source}
    B -->|Before| C["@untitledui/icons\n(File06, Trash01, Copy06, etc.)"]
    B -->|After| D[Custom SVG ReactComponents]
    D --> E["action-icons/\n(copy, trash, edit, follow, etc.)"]
    D --> F["common/\n(file, folder, clock, user, globe, etc.)"]
    D --> G["sidebar-icons/\n(archive, articles, dashboard, etc.)"]
    H[ButtonUtility tertiary style] -->|Before| I["tw:text-fg-quaternary / tw:hover:text-fg-quaternary_hover"]
    H -->|After| J["tw:text-quaternary / tw:hover:text-tertiary"]
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
    A[ContextCenter / KnowledgeCenter Components] --> B{Icon Source}
    B -->|Before| C["@untitledui/icons\n(File06, Trash01, Copy06, etc.)"]
    B -->|After| D[Custom SVG ReactComponents]
    D --> E["action-icons/\n(copy, trash, edit, follow, etc.)"]
    D --> F["common/\n(file, folder, clock, user, globe, etc.)"]
    D --> G["sidebar-icons/\n(archive, articles, dashboard, etc.)"]
    H[ButtonUtility tertiary style] -->|Before| I["tw:text-fg-quaternary / tw:hover:text-fg-quaternary_hover"]
    H -->|After| J["tw:text-quaternary / tw:hover:text-tertiary"]
Loading

Reviews (9): Last reviewed commit: "unit test fix" | Re-trigger Greptile

@Rohit0301 Rohit0301 self-assigned this Jul 6, 2026
@Rohit0301 Rohit0301 requested a review from a team as a code owner July 6, 2026 12:02
@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

❌ PR checklist incomplete

This PR cannot be merged until the following are addressed on its linked issue:

  • No GitHub issue is linked. Link an issue in the Development section of the PR (or add Fixes #12345 to the description). For a same-org cross-repo issue, add Fixes open-metadata/<repo>#123 to the description.

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 skip-pr-checks label.

@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Hi there 👋 Thanks for your contribution!

The OpenMetadata team will review the PR shortly! Once it has been labeled as safe to test, the CI workflows
will start executing and we'll be able to make sure everything is working as expected.

Let us know if you need any help!

@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Hi there 👋 Thanks for your contribution!

The OpenMetadata team will review the PR shortly! Once it has been labeled as safe to test, the CI workflows
will start executing and we'll be able to make sure everything is working as expected.

Let us know if you need any help!

@Rohit0301 Rohit0301 force-pushed the context-center-icons branch from 6cea855 to 4f90d46 Compare July 6, 2026 12:04
@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Hi there 👋 Thanks for your contribution!

The OpenMetadata team will review the PR shortly! Once it has been labeled as safe to test, the CI workflows
will start executing and we'll be able to make sure everything is working as expected.

Let us know if you need any help!

@Rohit0301 Rohit0301 added the safe to test Add this label to run secure Github workflows on PRs label Jul 6, 2026
Comment on lines +600 to +605
data-testid="edit-memory-btn"
icon={ <DotsVerticalIcon height={18} width={18} />}
size="sm"
tooltip={t('label.manage-entity', {
entity: t('label.article'),
})}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 The manage-article dots button now carries data-testid="edit-memory-btn", overwriting the previous data-testid="manage-button". Any Playwright test that locates this button by manage-button will silently fail to find it. The same copy-paste issue appears in DocumentsView.component.tsx where the dots button for document management also receives edit-memory-btn.

Suggested change
data-testid="edit-memory-btn"
icon={ <DotsVerticalIcon height={18} width={18} />}
size="sm"
tooltip={t('label.manage-entity', {
entity: t('label.article'),
})}
data-testid="manage-button"
icon={ <DotsVerticalIcon height={18} width={18} />}
size="sm"
tooltip={t('label.manage-entity', {
entity: t('label.article'),
})}

@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

🔴 Playwright Results — 13 failure(s), 22 flaky

✅ 4502 passed · ❌ 13 failed · 🟡 22 flaky · ⏭️ 55 skipped

Shard Passed Failed Flaky Skipped
🔴 Shard 1 420 1 4 33
🔴 Shard 2 805 12 6 4
🟡 Shard 3 815 0 1 12
🟡 Shard 4 819 0 2 5
🟡 Shard 5 828 0 3 0
🟡 Shard 6 815 0 6 1

Genuine Failures (failed on all attempts)

Pages/Lineage/LineageInteraction.spec.ts › Verify function data in edge drawer (shard 1)
�[31mTest timeout of 180000ms exceeded.�[39m
Features/ContextCenterArchivePage.spec.ts › full document lifecycle: folder expand icon, upload, delete, restore, and permanent delete (shard 2)
�[31mTest timeout of 180000ms exceeded.�[39m
Features/ContextCenterDocumentPage.spec.ts › delete single document from card menu removes it from the list (shard 2)
�[31mTest timeout of 180000ms exceeded.�[39m
Features/ContextCenterDocumentPage.spec.ts › move document to folder via card menu shows folder name on the card (shard 2)
�[31mTest timeout of 180000ms exceeded.�[39m
Features/ContextCenterDocumentPage.spec.ts › moving document to folder shows folder on card; re-opening menu shows current folder selected; clicking it again removes document from folder (shard 2)
�[31mTest timeout of 180000ms exceeded.�[39m
Features/ContextCenterDocumentPage.spec.ts › document appears nested in the folder tree after being moved to a folder (shard 2)
�[31mTest timeout of 180000ms exceeded.�[39m
Features/ContextCenterDocumentPage.spec.ts › clicking folder in sidebar shows only that folder documents and move menu show the current folder (shard 2)
�[31mTest timeout of 180000ms exceeded.�[39m
Features/ContextCenterDocumentPage.spec.ts › duplicate filename in same folder shows retry error; uploading same name to different folder succeeds; delete file and folder from UI (shard 2)
�[31mTest timeout of 180000ms exceeded.�[39m
Features/ContextCenterMemories.spec.ts › deleting a memory via the row actions menu removes it from the list (shard 2)
�[31mTest timeout of 180000ms exceeded.�[39m
Features/ContextCenterPermission.spec.ts › user with view-only permission cannot see create or delete actions, but can use share/vote/conversation actions (shard 2)
Error: �[2mexpect(�[22m�[31mlocator�[39m�[2m).�[22mtoHaveClass�[2m(�[22m�[32mexpected�[39m�[2m)�[22m failed

Locator: getByTestId('upvote-btn').locator('svg')
Expected pattern: �[32m/fill-utility-blue-500/�[39m
Received string:  �[31m""�[39m
Timeout: 15000ms

Call log:
�[2m  - Expect "toHaveClass" with timeout 15000ms�[22m
�[2m  - waiting for getByTestId('upvote-btn').locator('svg')�[22m
�[2m    19 × locator resolved to <svg width="20" fill="none" height="20" viewBox="0 0 18 18" xmlns="http://www.w3.org/2000/svg">…</svg>�[22m
�[2m       - unexpected value ""�[22m

Features/ContextCenterPermission.spec.ts › user with editAll permission sees row move action but no upload, folder create, or delete actions, and can move a document (shard 2)
�[31mTest timeout of 180000ms exceeded.�[39m
Features/ContextCenterPermission.spec.ts › user with deleteAll permission sees row delete action but no upload, folder create, or move actions, and can delete a document (shard 2)
�[31mTest timeout of 180000ms exceeded.�[39m
Features/ContextCenterPermission.spec.ts › user with all permissions can see upload, folder create, and all row actions (shard 2)
�[31mTest timeout of 180000ms exceeded.�[39m
🟡 22 flaky test(s) (passed on retry)
  • Features/Glossary/GlossaryPagination.spec.ts › should filter by InReview status (shard 1, 1 retry)
  • Flow/Tour.spec.ts › Tour should work from help section (shard 1, 2 retries)
  • Pages/Lineage/LineageRightPanel.spec.ts › Verify custom properties tab IS visible for supported type: mlmodel (shard 1, 1 retry)
  • Flow/SearchRBAC.spec.ts › the browse tree only shows the asset-type categories a user can access (shard 1, 1 retry)
  • Features/BulkImport.spec.ts › Database Schema (shard 2, 1 retry)
  • Features/ContextCenterArticles.spec.ts › Article list cards, recently viewed widget, and pagination work (shard 2, 1 retry)
  • Features/ContextCenterMemories.spec.ts › editing visibility from Shared to Private saves and updates the badge (shard 2, 1 retry)
  • Features/ContextCenterPermission.spec.ts › user with deleteAll permission can see delete action but not restore action on an archived document, and can delete it (shard 2, 1 retry)
  • Features/DataQuality/ColumnLevelTests.spec.ts › Column Value Max To Be Between (shard 2, 1 retry)
  • Features/Glossary/GlossaryCRUDOperations.spec.ts › should create glossary with mutually exclusive enabled (shard 2, 1 retry)
  • Features/SearchExport.spec.ts › Export queues a background job and downloads from the jobs tray (shard 3, 1 retry)
  • Pages/DataContractsSemanticRules.spec.ts › Validate Description Rule Is_Not_Set (shard 4, 1 retry)
  • Pages/DataProductODPS.spec.ts › exports ODPS YAML from the data product manage menu (shard 4, 1 retry)
  • Pages/Entity.spec.ts › Tag and Glossary Term preservation in column detail panel (shard 5, 1 retry)
  • Pages/EntityDataSteward.spec.ts › DisplayName Add, Update and Remove for child entities (shard 5, 1 retry)
  • Pages/ExplorePageRightPanel_KnowledgeCenter.spec.ts › Should remove user owner for knowledgeCenter (shard 5, 1 retry)
  • Pages/ExplorePageRightPanel.spec.ts › Should allow Data Steward to view all tabs for dashboardDataModel (shard 6, 1 retry)
  • Pages/GlossaryImportExport.spec.ts › Import partial success - some terms pass, some fail (shard 6, 1 retry)
  • Pages/GlossaryTermRightPanel.spec.ts › Should assign tier from glossary term assets context (shard 6, 1 retry)
  • Pages/Lineage/LineageFilters.spec.ts › Verify Impact Analysis service filter selection (shard 6, 1 retry)
  • Pages/Lineage/LineageRightPanel.spec.ts › Verify custom properties tab is NOT visible for pipelineService in platform lineage (shard 6, 1 retry)
  • Pages/TagPageRightPanel.spec.ts › Should display correct tabs for table entity in tag assets page context (shard 6, 1 retry)

📦 Download artifacts

How to debug locally
# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip    # view trace

@gitar-bot

gitar-bot Bot commented Jul 6, 2026

Copy link
Copy Markdown
Code Review ⚠️ Changes requested 1 resolved / 3 findings

Replaces external icon library dependencies with custom SVG assets across the Context Center, but introduces an inverted follow icon state and incorrect data-testid attributes on management buttons.

⚠️ Bug: Follow button shows inverted active/inactive icon

📄 openmetadata-ui/src/main/resources/ui/src/components/ContextCenter/ArticleDetailHeader/ArticleDetailHeader.component.tsx:584

The follow button's icon logic is inverted. isFollowing is true when the current user already follows the article (confirmed at lines 148-151). The code renders icon={isFollowing ? <FollowIcon .../> : <FollowActiveIcon .../>}, so when the user IS following it shows the non-active follow.svg, and when the user is NOT following it shows the active follow-active.svg. This is backwards. The previous implementation correctly used isFollowing ? StarFilledIcon : StarIcon (active/filled when following). Note the adjacent tooltip is correct (isFollowing ? un-follow : follow), which makes the visual state contradict the tooltip. Swap the branches so the active icon renders when following.

Show the active follow icon when the user is following.
icon={isFollowing ? <FollowActiveIcon height={18} width={18} /> : <FollowIcon height={18} width={18} />}
💡 Quality: Duplicate/misleading data-testid 'edit-memory-btn' on manage buttons

📄 openmetadata-ui/src/main/resources/ui/src/components/ContextCenter/ArticleDetailHeader/ArticleDetailHeader.component.tsx:600 📄 openmetadata-ui/src/main/resources/ui/src/components/ContextCenter/DocumentsView/DocumentsView.component.tsx:171 📄 openmetadata-ui/src/main/resources/ui/src/components/ContextCenter/MemoriesView/MemoriesView.component.tsx:54

Several dropdown trigger buttons for 'manage' actions were given data-testid="edit-memory-btn". In ArticleDetailHeader this replaces the previous data-testid="manage-button", which may break existing Playwright/unit selectors. The id is also semantically wrong on the document/article manage triggers (it is a manage/more-actions button, not an edit-memory button) and collides with the genuine edit-memory button used elsewhere in MemoriesView, making test selection ambiguous. Use a descriptive, unique testid such as manage-button.

Restore/give a descriptive testid for the manage dropdown trigger.
data-testid="manage-button"
✅ 1 resolved
Bug: Typo 'ttw:shrink-0' breaks Tailwind class on delete icon

📄 openmetadata-ui/src/main/resources/ui/src/components/ContextCenter/ArticleDetailHeader/ArticleDetailHeader.component.tsx:618
The delete TrashIcon className is "ttw:shrink-0 tw:text-error-primary". ttw:shrink-0 is a typo (double 't') and is not a valid Tailwind class, so the shrink-0 behavior is silently dropped. Should be tw:shrink-0.

🤖 Prompt for agents
Code Review: Replaces external icon library dependencies with custom SVG assets across the Context Center, but introduces an inverted follow icon state and incorrect data-testid attributes on management buttons.

1. ⚠️ Bug: Follow button shows inverted active/inactive icon
   Files: openmetadata-ui/src/main/resources/ui/src/components/ContextCenter/ArticleDetailHeader/ArticleDetailHeader.component.tsx:584

   The follow button's icon logic is inverted. `isFollowing` is true when the current user already follows the article (confirmed at lines 148-151). The code renders `icon={isFollowing ? <FollowIcon .../> : <FollowActiveIcon .../>}`, so when the user IS following it shows the non-active `follow.svg`, and when the user is NOT following it shows the active `follow-active.svg`. This is backwards. The previous implementation correctly used `isFollowing ? StarFilledIcon : StarIcon` (active/filled when following). Note the adjacent tooltip is correct (`isFollowing ? un-follow : follow`), which makes the visual state contradict the tooltip. Swap the branches so the active icon renders when following.

   Fix (Show the active follow icon when the user is following.):
   icon={isFollowing ? <FollowActiveIcon height={18} width={18} /> : <FollowIcon height={18} width={18} />}

2. 💡 Quality: Duplicate/misleading data-testid 'edit-memory-btn' on manage buttons
   Files: openmetadata-ui/src/main/resources/ui/src/components/ContextCenter/ArticleDetailHeader/ArticleDetailHeader.component.tsx:600, openmetadata-ui/src/main/resources/ui/src/components/ContextCenter/DocumentsView/DocumentsView.component.tsx:171, openmetadata-ui/src/main/resources/ui/src/components/ContextCenter/MemoriesView/MemoriesView.component.tsx:54

   Several dropdown trigger buttons for 'manage' actions were given `data-testid="edit-memory-btn"`. In ArticleDetailHeader this replaces the previous `data-testid="manage-button"`, which may break existing Playwright/unit selectors. The id is also semantically wrong on the document/article manage triggers (it is a manage/more-actions button, not an edit-memory button) and collides with the genuine edit-memory button used elsewhere in MemoriesView, making test selection ambiguous. Use a descriptive, unique testid such as `manage-button`.

   Fix (Restore/give a descriptive testid for the manage dropdown trigger.):
   data-testid="manage-button"

Options

Display: compact → Showing less information.

Comment with these commands to change the behavior for this request:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

@gitar-bot

gitar-bot Bot commented Jul 6, 2026

Copy link
Copy Markdown
Code Review 👍 Approved with suggestions 2 resolved / 3 findings

Migrates ContextCenter and KnowledgeCenter icons to custom SVG assets and updates ButtonUtility styles. Please resolve the duplicate 'edit-memory-btn' testid usage across management components.

💡 Quality: Duplicate/misleading data-testid 'edit-memory-btn' on manage buttons

📄 openmetadata-ui/src/main/resources/ui/src/components/ContextCenter/ArticleDetailHeader/ArticleDetailHeader.component.tsx:600 📄 openmetadata-ui/src/main/resources/ui/src/components/ContextCenter/DocumentsView/DocumentsView.component.tsx:171 📄 openmetadata-ui/src/main/resources/ui/src/components/ContextCenter/MemoriesView/MemoriesView.component.tsx:54

Several dropdown trigger buttons for 'manage' actions were given data-testid="edit-memory-btn". In ArticleDetailHeader this replaces the previous data-testid="manage-button", which may break existing Playwright/unit selectors. The id is also semantically wrong on the document/article manage triggers (it is a manage/more-actions button, not an edit-memory button) and collides with the genuine edit-memory button used elsewhere in MemoriesView, making test selection ambiguous. Use a descriptive, unique testid such as manage-button.

Restore/give a descriptive testid for the manage dropdown trigger.
data-testid="manage-button"
✅ 2 resolved
Bug: Typo 'ttw:shrink-0' breaks Tailwind class on delete icon

📄 openmetadata-ui/src/main/resources/ui/src/components/ContextCenter/ArticleDetailHeader/ArticleDetailHeader.component.tsx:618
The delete TrashIcon className is "ttw:shrink-0 tw:text-error-primary". ttw:shrink-0 is a typo (double 't') and is not a valid Tailwind class, so the shrink-0 behavior is silently dropped. Should be tw:shrink-0.

Bug: Follow button shows inverted active/inactive icon

📄 openmetadata-ui/src/main/resources/ui/src/components/ContextCenter/ArticleDetailHeader/ArticleDetailHeader.component.tsx:584
The follow button's icon logic is inverted. isFollowing is true when the current user already follows the article (confirmed at lines 148-151). The code renders icon={isFollowing ? <FollowIcon .../> : <FollowActiveIcon .../>}, so when the user IS following it shows the non-active follow.svg, and when the user is NOT following it shows the active follow-active.svg. This is backwards. The previous implementation correctly used isFollowing ? StarFilledIcon : StarIcon (active/filled when following). Note the adjacent tooltip is correct (isFollowing ? un-follow : follow), which makes the visual state contradict the tooltip. Swap the branches so the active icon renders when following.

🤖 Prompt for agents
Code Review: Migrates ContextCenter and KnowledgeCenter icons to custom SVG assets and updates ButtonUtility styles. Please resolve the duplicate 'edit-memory-btn' testid usage across management components.

1. 💡 Quality: Duplicate/misleading data-testid 'edit-memory-btn' on manage buttons
   Files: openmetadata-ui/src/main/resources/ui/src/components/ContextCenter/ArticleDetailHeader/ArticleDetailHeader.component.tsx:600, openmetadata-ui/src/main/resources/ui/src/components/ContextCenter/DocumentsView/DocumentsView.component.tsx:171, openmetadata-ui/src/main/resources/ui/src/components/ContextCenter/MemoriesView/MemoriesView.component.tsx:54

   Several dropdown trigger buttons for 'manage' actions were given `data-testid="edit-memory-btn"`. In ArticleDetailHeader this replaces the previous `data-testid="manage-button"`, which may break existing Playwright/unit selectors. The id is also semantically wrong on the document/article manage triggers (it is a manage/more-actions button, not an edit-memory button) and collides with the genuine edit-memory button used elsewhere in MemoriesView, making test selection ambiguous. Use a descriptive, unique testid such as `manage-button`.

   Fix (Restore/give a descriptive testid for the manage dropdown trigger.):
   data-testid="manage-button"

Options

Display: compact → Showing less information.

Comment with these commands to change the behavior for this request:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

@Rohit0301 Rohit0301 force-pushed the context-center-icons branch from cc7acfa to 85e2891 Compare July 7, 2026 17:24
@gitar-bot

gitar-bot Bot commented Jul 7, 2026

Copy link
Copy Markdown
Code Review ✅ Approved 3 resolved / 3 findings

Replaces external icons with custom SVG assets and simplifies ButtonUtility styling. Resolved previously flagged issues regarding icon states, CSS class typos, and duplicate data-testids.

✅ 3 resolved
Bug: Typo 'ttw:shrink-0' breaks Tailwind class on delete icon

📄 openmetadata-ui/src/main/resources/ui/src/components/ContextCenter/ArticleDetailHeader/ArticleDetailHeader.component.tsx:618
The delete TrashIcon className is "ttw:shrink-0 tw:text-error-primary". ttw:shrink-0 is a typo (double 't') and is not a valid Tailwind class, so the shrink-0 behavior is silently dropped. Should be tw:shrink-0.

Bug: Follow button shows inverted active/inactive icon

📄 openmetadata-ui/src/main/resources/ui/src/components/ContextCenter/ArticleDetailHeader/ArticleDetailHeader.component.tsx:584
The follow button's icon logic is inverted. isFollowing is true when the current user already follows the article (confirmed at lines 148-151). The code renders icon={isFollowing ? <FollowIcon .../> : <FollowActiveIcon .../>}, so when the user IS following it shows the non-active follow.svg, and when the user is NOT following it shows the active follow-active.svg. This is backwards. The previous implementation correctly used isFollowing ? StarFilledIcon : StarIcon (active/filled when following). Note the adjacent tooltip is correct (isFollowing ? un-follow : follow), which makes the visual state contradict the tooltip. Swap the branches so the active icon renders when following.

Quality: Duplicate/misleading data-testid 'edit-memory-btn' on manage buttons

📄 openmetadata-ui/src/main/resources/ui/src/components/ContextCenter/ArticleDetailHeader/ArticleDetailHeader.component.tsx:600 📄 openmetadata-ui/src/main/resources/ui/src/components/ContextCenter/DocumentsView/DocumentsView.component.tsx:171 📄 openmetadata-ui/src/main/resources/ui/src/components/ContextCenter/MemoriesView/MemoriesView.component.tsx:54
Several dropdown trigger buttons for 'manage' actions were given data-testid="edit-memory-btn". In ArticleDetailHeader this replaces the previous data-testid="manage-button", which may break existing Playwright/unit selectors. The id is also semantically wrong on the document/article manage triggers (it is a manage/more-actions button, not an edit-memory button) and collides with the genuine edit-memory button used elsewhere in MemoriesView, making test selection ambiguous. Use a descriptive, unique testid such as manage-button.

Options

Display: compact → Showing less information.

Comment with these commands to change the behavior for this request:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

1 similar comment
@gitar-bot

gitar-bot Bot commented Jul 7, 2026

Copy link
Copy Markdown
Code Review ✅ Approved 3 resolved / 3 findings

Replaces external icons with custom SVG assets and simplifies ButtonUtility styling. Resolved previously flagged issues regarding icon states, CSS class typos, and duplicate data-testids.

✅ 3 resolved
Bug: Typo 'ttw:shrink-0' breaks Tailwind class on delete icon

📄 openmetadata-ui/src/main/resources/ui/src/components/ContextCenter/ArticleDetailHeader/ArticleDetailHeader.component.tsx:618
The delete TrashIcon className is "ttw:shrink-0 tw:text-error-primary". ttw:shrink-0 is a typo (double 't') and is not a valid Tailwind class, so the shrink-0 behavior is silently dropped. Should be tw:shrink-0.

Bug: Follow button shows inverted active/inactive icon

📄 openmetadata-ui/src/main/resources/ui/src/components/ContextCenter/ArticleDetailHeader/ArticleDetailHeader.component.tsx:584
The follow button's icon logic is inverted. isFollowing is true when the current user already follows the article (confirmed at lines 148-151). The code renders icon={isFollowing ? <FollowIcon .../> : <FollowActiveIcon .../>}, so when the user IS following it shows the non-active follow.svg, and when the user is NOT following it shows the active follow-active.svg. This is backwards. The previous implementation correctly used isFollowing ? StarFilledIcon : StarIcon (active/filled when following). Note the adjacent tooltip is correct (isFollowing ? un-follow : follow), which makes the visual state contradict the tooltip. Swap the branches so the active icon renders when following.

Quality: Duplicate/misleading data-testid 'edit-memory-btn' on manage buttons

📄 openmetadata-ui/src/main/resources/ui/src/components/ContextCenter/ArticleDetailHeader/ArticleDetailHeader.component.tsx:600 📄 openmetadata-ui/src/main/resources/ui/src/components/ContextCenter/DocumentsView/DocumentsView.component.tsx:171 📄 openmetadata-ui/src/main/resources/ui/src/components/ContextCenter/MemoriesView/MemoriesView.component.tsx:54
Several dropdown trigger buttons for 'manage' actions were given data-testid="edit-memory-btn". In ArticleDetailHeader this replaces the previous data-testid="manage-button", which may break existing Playwright/unit selectors. The id is also semantically wrong on the document/article manage triggers (it is a manage/more-actions button, not an edit-memory button) and collides with the genuine edit-memory button used elsewhere in MemoriesView, making test selection ambiguous. Use a descriptive, unique testid such as manage-button.

Options

Display: compact → Showing less information.

Comment with these commands to change the behavior for this request:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 63%
63.78% (72768/114081) 46.92% (42352/90255) 48.21% (13026/27016)

@sonarqubecloud

sonarqubecloud Bot commented Jul 7, 2026

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

safe to test Add this label to run secure Github workflows on PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant