Skip to content

[2.0] fix(ui): distinguish composite unique constraints (backport 2.0 #37750) - #38178

Merged
chirag-madlani merged 2 commits into
2.0from
chirag-madlani/backport-37750-2.0
Nov 19, 2026
Merged

chirag-madlani merged 2 commits into
2.0from
chirag-madlani/backport-37750-2.0

Conversation

@chirag-madlani

@chirag-madlani chirag-madlani commented Nov 19, 2026 •

Copy link
Copy Markdown
Collaborator

Describe your changes:

Backport of #37750 to 2.0: distinguish composite unique constraints in the schema table and the table version history.

2.0 still renders constraint icons with antd, while main uses UntitledUI, so this is a port of #37750's behaviour rather than a straight cherry-pick:

  • TableUtils.tsx: keeps 2.0's antd Icon and Tooltip, and adds fix(ui): distinguish composite unique constraints #37750's composite grouping and A/B/C lettering. The composite marker is a core Badge (blue) showing the group letter. It is keyboard-focusable (role="button", tabIndex=0, tooltip on hover and focus), and its accessible name lists the group's columns. The tooltip shows the title, the columns joined with +, and the explanation.
  • VersionTable.component.tsx: keeps the antd imports. parseVersionDiffArray does not exist on 2.0, so it uses plain JSON.parse, like the code next to it.
  • ConstraintIcon.tsx (in pages/TableDetailsPageV1/TableConstraints/ on 2.0): the composite tooltip title on the antd version.
  • Locales: the two new keys in the 19 locales that exist on 2.0. 2.0 has no it-it.json.
  • Tests: the unit tests are rewritten for antd's tooltip. Dropped: main's malformed-diff case (2.0 has no guarded parser) and the getDataTypeBadgeColor and core-icon a11y cases (main-only code).
  • Playwright TableConstraint.spec.ts: the composite check applies as in fix(ui): distinguish composite unique constraints #37750, except that the tooltip is closed with blur() instead of Escape, which is how antd's focus tooltip closes.

Type of change:

  • Bug fix

Tests:

Unit tests

  • TableUtils.test.tsx, VersionTable.test.tsx, TableConstraints and TablePureUtils suites on this branch, with 2.0's dependencies: 4 suites, 157 tests, 0 failed.
  • With TableUtils.tsx reverted to origin/2.0, all 9 new composite tests fail (5 in TableUtils.test.tsx, 4 in VersionTable.test.tsx).

Playwright (UI) tests

  • TableConstraint.spec.ts updated as above. Not run locally; it runs in CI.
  • eslint on the spec: 0 errors. yarn lint:playwright on 2.0 exits non-zero only for stale suppressions in eslint-suppressions.json that are already on 2.0; none is for this spec.

Checkstyle

  • organize-imports, eslint --fix and prettier, run with 2.0's tooling on the changed files: no changes. yarn i18n: no diff.

UI screen recording:

Not applicable — backport of an already-reviewed fix.

Checklist:

  • I have added tests (unit / integration / Playwright as applicable) and listed them above.
  • Self-review: I reviewed the port against REVIEW.md myself rather than with a separate reviewer; the 2.0-specific differences are listed above. No 🔴.

🤖 Generated with Claude Code

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge.

Summary

Adds lettered markers and clearer explanations for composite unique constraints in the schema table and version history.

  • Composite constraints now show which columns belong together.
  • Version history keeps composite group letters consistent across changes.

No actionable issues found.

Reviews (1) · Last reviewed commit: "test(ui): adapt composite unique constra..." · Reviewed by Greptile

IceS2 and others added 2 commits November 19, 2026 12:48
* fix(ui): distinguish composite unique constraints

* fix(ui): identify composite unique groups with letters

* fix(ui): style composite unique indicators as blue badges

* fix(ui): keep composite labels consistent in table history

(cherry picked from commit 2790240)
@chirag-madlani
chirag-madlani requested a review from a team as a code owner November 19, 2026 07:22
@chirag-madlani
chirag-madlani requested review from karanh37 and removed request for a team November 19, 2026 07:22
@github-actions

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.

@gitar-bot

gitar-bot Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Code Review ✅ Approved 🟢 Low risk

The UI labels composite unique constraints in schema and version views; this changes presentation only, not constraint enforcement or stored data.

Backports composite unique constraint distinction to 2.0 by adding lettered composite markers with accessible tooltips to the schema table and version history, using antd components. No issues found.

Verification

Rules No rules evaluated

Functional validation Not enabled

Set up

Auto-approval Not enabled

Set up

For more verification details, comment gitar display:verbose.

Options

Display: compact → Showing compact verification results.

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

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source

@chirag-madlani
chirag-madlani merged commit df51219 into 2.0 Nov 19, 2026
59 of 62 checks passed
@chirag-madlani
chirag-madlani deleted the chirag-madlani/backport-37750-2.0 branch November 19, 2026 08:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants