Repository navigation
[2.0] fix(ui): distinguish composite unique constraints (backport 2.0 #37750) - #38178
Conversation
* 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)
❌ 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 |
Code Review ✅ Approved 🟢 Low riskThe 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. VerificationRules No rules evaluated Functional validation Not enabledAuto-approval Not enabledFor more verification details, comment OptionsDisplay: compact → Showing compact verification results. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
Describe your changes:
Backport of #37750 to
2.0: distinguish composite unique constraints in the schema table and the table version history.2.0still renders constraint icons with antd, whilemainuses UntitledUI, so this is a port of #37750's behaviour rather than a straight cherry-pick:TableUtils.tsx: keeps 2.0's antdIconandTooltip, and adds fix(ui): distinguish composite unique constraints #37750's composite grouping and A/B/C lettering. The composite marker is a coreBadge(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.parseVersionDiffArraydoes not exist on 2.0, so it uses plainJSON.parse, like the code next to it.ConstraintIcon.tsx(inpages/TableDetailsPageV1/TableConstraints/on 2.0): the composite tooltip title on the antd version.it-it.json.getDataTypeBadgeColorand core-icon a11y cases (main-only code).TableConstraint.spec.ts: the composite check applies as in fix(ui): distinguish composite unique constraints #37750, except that the tooltip is closed withblur()instead of Escape, which is how antd's focus tooltip closes.Type of change:
Tests:
Unit tests
TableUtils.test.tsx,VersionTable.test.tsx,TableConstraintsandTablePureUtilssuites on this branch, with 2.0's dependencies: 4 suites, 157 tests, 0 failed.TableUtils.tsxreverted toorigin/2.0, all 9 new composite tests fail (5 inTableUtils.test.tsx, 4 inVersionTable.test.tsx).Playwright (UI) tests
TableConstraint.spec.tsupdated as above. Not run locally; it runs in CI.eslinton the spec: 0 errors.yarn lint:playwrighton 2.0 exits non-zero only for stale suppressions ineslint-suppressions.jsonthat are already on 2.0; none is for this spec.Checkstyle
--fixand 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:
REVIEW.mdmyself rather than with a separate reviewer; the 2.0-specific differences are listed above. No 🔴.🤖 Generated with Claude Code


Confidence 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.
No actionable issues found.
Reviews (1) · Last reviewed commit: "test(ui): adapt composite unique constra..." · Reviewed by Greptile