Skip to content

Ontology Studio: picker alignment, centred unlink dialog, Show More count - #37780

Merged
anuj-kumary merged 4 commits into
mainfrom
anuj-kumary/ontology-studio-design-review-follow-up
Nov 13, 2026
Merged

anuj-kumary merged 4 commits into
mainfrom
anuj-kumary/ontology-studio-design-review-follow-up

Conversation

@anuj-kumary

Copy link
Copy Markdown
Member

Describe your changes:

Fixes #

Follow-up design-review fixes for Ontology Studio after #37774:

  • Add data assets picker (AI mode): the type icon is top-aligned (self-start, 3px) instead of centred on the text, and the checkbox sits 4px from the top. Signed off by design on a local build.
  • Unlink asset: the confirmation is a centred 400px page dialog (Cancel / Unlink) instead of a popover anchored to the row's trash button, which could jump to the top-left of the screen when the row re-rendered. A failed unlink keeps the dialog open to retry; it can't be dismissed while the unlink is in flight.
  • Concept picker: Show More now shows the count, e.g. Show More 20/54 (listed / matching the search).

Type of change:

  • Bug fix
  • Improvement

High-level design:

N/A — small UI follow-up. The unlink confirm drops useAnchoredConfirm + ConfirmPopover for the core ModalOverlay/Dialog, matching the other Studio confirms.

Tests:

Use cases covered

  • Unlinking an asset confirms in a centred page dialog; Cancel closes it without a request.
  • Show More reports listed/total and updates as more rows are revealed.
  • The picker checkbox carries its layout margin in AI mode.

Unit tests

  • Added/updated Jest tests; the new unlink-dialog assertion fails against the old popover.
  • 259 passing across OntologyDataAssetPicker, OntologyConceptInspector and OntologyGraphView.

🤖 Generated with Claude Code

…ount

- Add data assets: type icon top-aligned; checkbox 4px from the top
- Unlink asset confirmation is a centred page dialog, not a row popover
- Concept picker Show More shows shown/total (e.g. Show More 20/54)
@anuj-kumary
anuj-kumary requested a review from a team as a code owner November 13, 2026 14:04
@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.

@anuj-kumary anuj-kumary added skip-pr-checks Bypass PR metadata validation check safe to test Add this label to run secure Github workflows on PRs labels Nov 13, 2026
@anuj-kumary

Copy link
Copy Markdown
Member Author

Thanks for the review.

1. Show More count string — fixed in 7502a52. The label now comes from a new interpolated key label.show-more-count ("Show More {{shown}}/{{total}}"), added to every locale using each locale's existing "Show More" translation. The picker test now runs against en-us and asserts the rendered Show More 20/N → Show More 40/N.

2. Unlink confirm pressed again by keyboard — not reproducible, so no change. The core Button passes isLoading to react-aria-components as isPending. RAC's Button then disables interactions (useDisableInteractions(buttonProps, isPending)) and calls useButton with isDisabled: props.isDisabled || isPending. That blocks Enter/Space as well as pointer presses while the request runs. I checked with a test that held removeAsset pending and sent Enter to the confirm button: only one DELETE went out, with or without the suggested guard. Since a test for the guard would pass either way, I didn't add it.

@anuj-kumary

Copy link
Copy Markdown
Member Author

Applied the suggested guard in 9f6d8d0: confirmUnlink returns early while isUnlinking, and the confirm button is isDisabled during the request. React-aria's isPending already blocked the second press, so this is a backstop in case the core Button stops mapping isLoading to it.

@gitar-bot

gitar-bot Bot commented Nov 13, 2026

Copy link
Copy Markdown
Code Review ✅ Approved 🟡 Medium risk 2 closed / 2 findings

The modal-based unlink flow changes confirmation, cancellation, and retry behavior for concept-asset links; state errors could block intended unlink operations.

Ontology Studio design-review follow-up: top-aligns the data asset picker type icon and checkbox, replaces the unlink popover with a centred 400px confirm dialog that stays open on failure and can't be dismissed mid-request, and shows Show More counts like Show More 20/54. Resolved this session: the Show More count is now translated with an interpolated key instead of string concatenation, and the unlink confirm is guarded against keyboard re-entry while in flight. No open issues found.

✅ 2 closed
✅ Quality: Show More count is built by string concatenation, not translated

📄 openmetadata-ui/src/main/resources/ui/src/components/governance/ontology/OntologyGraphView/OntologyConceptPicker.tsx:191
In OntologyConceptPicker.tsx:191 the label is put together as ${t('label.show-more')} ${visible.length}/${matches.length}. That fixes the word order and the n/m format in code, so a locale can't move the count or write it its own way. The repo's i18n rule says user-facing strings must come from translation keys. Add a key with interpolation, e.g. label.show-more-count: "Show More {{shown}}/{{total}}", and call t('label.show-more-count', { shown: visible.length, total: matches.length }). Then update the test assertions in OntologyGraphView.test.tsx to match.

✅ Bug: Unlink confirm can be pressed again by keyboard while in flight

📄 openmetadata-ui/src/main/resources/ui/src/components/governance/ontology/OntologyConceptInspector/OntologyConceptAssets.tsx:247-259 📄 openmetadata-ui/src/main/resources/ui/src/components/governance/ontology/OntologyConceptInspector/OntologyConceptAssets.tsx:293-299
The confirm button is disabled only by !canUnlink(unlinkTarget). isLoading in the core Button only adds tw:pointer-events-none, and isDisabled is still passed as disabled (button.tsx:435-445). So after a click, focus stays on the button, and pressing Enter or Space calls confirmUnlink again. confirmUnlink has no isUnlinking guard, so a second removeAsset goes out with the same expectedRevision, and the user gets an error toast from the stale-revision write. To fix this, disable the button while the unlink runs and return early from confirmUnlink when a request is already in flight.

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

@anuj-kumary
anuj-kumary enabled auto-merge (squash) November 13, 2026 14:34
@anuj-kumary
anuj-kumary merged commit b60a0c5 into main Nov 13, 2026
52 of 53 checks passed
@anuj-kumary
anuj-kumary deleted the anuj-kumary/ontology-studio-design-review-follow-up branch November 13, 2026 14:46
anuj-kumary added a commit that referenced this pull request Nov 13, 2026
… dialog

#37780 replaced the unlink popover with a page modal whose Cancel button has
no test id, so OntologyNativeOperations waited on ontology-unlink-cancel until
the test timed out.
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 skip-pr-checks Bypass PR metadata validation check

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants