Skip to content

Migrate FailedTestCaseSampleData table to core-ui Table component#27985

Open
shah-harshit wants to merge 3 commits intomainfrom
feat/migrate-failed-sample-data-core-ui
Open

Migrate FailedTestCaseSampleData table to core-ui Table component#27985
shah-harshit wants to merge 3 commits intomainfrom
feat/migrate-failed-sample-data-core-ui

Conversation

@shah-harshit
Copy link
Copy Markdown
Contributor

Summary

  • Replace Ant Design Table with core-ui Table (react-aria-components) in FailedTestCaseSampleData.component.tsx
  • Add border wrapper tw:overflow-x-auto tw:border tw:border-border-secondary tw:rounded-[10px] with horizontal scroll support
  • Add 210px min-width on data cells for consistent column sizing
  • Add 8px padding on header and data cells
  • Center diff-type column content vertically and horizontally
  • Move all styles from failed-test-case-sample-data.less to tw: theme token classes — delete the .less file entirely
  • Use semantic tw: tokens: tw:bg-success-primary, tw:bg-error-primary, tw:text-error-primary, tw:text-success-primary, tw:text-gray-500, tw:bg-gray-50, tw:border-r-gray-blue-100
  • Preserve failed-sample-data-column CSS class for e2e test selector compatibility

Reference

https://github.com/open-metadata/openmetadata-collate/issues/3837

Test plan

  • Verify failed test case sample data table renders with correct border and layout
  • Verify diff rows show correct background colors (green for add, red for remove, grey for not-equal)
  • Verify diff-type column (+/-/!=) shows centered with correct text color
  • Verify failed column highlighted with red background and text
  • Verify horizontal scroll works when many columns present
  • Run e2e: yarn playwright:run --grep FailedTestCaseSampleData

🤖 Generated with Claude Code

…mponent

- Replace Ant Design Table with core-ui Table (react-aria-components)
- Add border wrapper tw:border tw:border-border-secondary tw:rounded-[10px]
- Add 210px min-width on data cells with horizontal scroll
- Add 8px padding on header and data cells
- Center diff-type column content vertically and horizontally
- Move all styles from .less file to tw: classes using theme tokens
- Delete failed-test-case-sample-data.less

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@shah-harshit shah-harshit requested a review from a team as a code owner May 8, 2026 09:27
@shah-harshit shah-harshit added UI UI specific issues safe to test Add this label to run secure Github workflows on PRs labels May 8, 2026
@shah-harshit shah-harshit self-assigned this May 8, 2026
@shah-harshit shah-harshit changed the title refactor(FailedTestCaseSampleData): migrate table to core-ui Table component Migrate FailedTestCaseSampleData table to core-ui Table component May 8, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 8, 2026

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 62%
62.5% (63200/101117) 42.98% (34252/79689) 45.87% (10088/21992)

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 8, 2026

🟡 Playwright Results — all passed (12 flaky)

✅ 4016 passed · ❌ 0 failed · 🟡 12 flaky · ⏭️ 86 skipped

Shard Passed Failed Flaky Skipped
✅ Shard 1 299 0 0 4
🟡 Shard 2 752 0 3 8
🟡 Shard 3 756 0 3 7
🟡 Shard 4 789 0 1 18
🟡 Shard 5 686 0 1 41
🟡 Shard 6 734 0 4 8
🟡 12 flaky test(s) (passed on retry)
  • Features/ActivityAPI.spec.ts › Activity event shows the actor who made the change (shard 2, 1 retry)
  • Features/BulkEditEntity.spec.ts › Glossary (shard 2, 1 retry)
  • Features/Glossary/GlossaryWorkflow.spec.ts › should start term as Draft when glossary has reviewers (shard 2, 2 retries)
  • Features/RTL.spec.ts › Verify Following widget functionality (shard 3, 1 retry)
  • Features/Table.spec.ts › Table pagination with sorting should works (shard 3, 1 retry)
  • Flow/PersonaDeletionUserProfile.spec.ts › User profile loads correctly before and after persona deletion (shard 3, 1 retry)
  • Pages/CustomProperties.spec.ts › Set & Update all CP types on apiCollection (shard 4, 1 retry)
  • Pages/ExplorePageRightPanel.spec.ts › Should verify deleted tag not visible in tag selection for databaseSchema (shard 5, 1 retry)
  • Features/AutoPilot.spec.ts › Create Service and check the AutoPilot status (shard 6, 1 retry)
  • Pages/InputOutputPorts.spec.ts › Remove single output port (shard 6, 1 retry)
  • Pages/Lineage/LineageFilters.spec.ts › Verify lineage schema filter selection (shard 6, 1 retry)
  • Pages/Lineage/LineageRightPanel.spec.ts › Verify custom properties tab IS visible for supported type: searchIndex (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
Copy link
Copy Markdown

gitar-bot Bot commented May 8, 2026

Code Review ✅ Approved 1 resolved / 1 findings

Migrates FailedTestCaseSampleData to the core-ui Table component and adopts Tailwind utility classes. Refactor the hardcoded tw:rounded-[10px] value to use a standard theme-defined border-radius token to align with styling guidelines.

✅ 1 resolved
Quality: Hardcoded border-radius value violates styling guidelines

📄 openmetadata-ui/src/main/resources/ui/src/components/DataQuality/IncidentManager/FailedTestCaseSampleData/FailedTestCaseSampleData.component.tsx:249
The class tw:rounded-[10px] uses an arbitrary hardcoded value. Per project guidelines, hardcoded values should be avoided in favor of semantic CSS custom properties or standard Tailwind scale values (e.g., tw:rounded-xl which is 12px, or tw:rounded-lg which is 8px). Consider using the closest standard value or defining a semantic token if 10px is intentional.

Options

Display: compact → Showing less information.

Comment with these commands to change:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 8, 2026

@shah-harshit shah-harshit enabled auto-merge (squash) May 8, 2026 16:12
Comment on lines +294 to +296
<span
className={classNames('tw:font-medium', {
'tw:text-success-primary':
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can we use here Typography ?

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 UI UI specific issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants