Skip to content

Fixes #37577: Restyle Ontology Studio to match the design handoff - #37587

Merged
anuj-kumary merged 8 commits into
mainfrom
anuj-kumary/ontology_studio_handoff-access
Nov 12, 2026
Merged

anuj-kumary merged 8 commits into
mainfrom
anuj-kumary/ontology_studio_handoff-access

Conversation

@anuj-kumary

@anuj-kumary anuj-kumary commented Nov 11, 2026 •

Copy link
Copy Markdown
Member

Describe your changes:

Fixes #37577

Restyles Ontology Studio to match the design handoff: placement, layout and look and feel. The goal is no change to features. Every action that existed before is still reachable, with the same permissions, draft guard and API calls; only where it sits and how it looks changed.

Classic mode: the page header stays as it is until design delivers a classic-mode header. Everything below the header follows the handoff in both modes.

What moved or changed:

  • AI header: "Ontology Studio" title, Beta badge and subtitle; scope picker and actions on the right; underline View / Edit / Query tabs. Add concept now lives in the header in both modes (the canvas button is removed). Publish reads "Review & publish" on All ontologies and "Publish (n)" on one ontology. "Edit ontology →" stays in View.
  • Canvas toolbar (bottom centre): Draft / Published switch with the unpublished count, release history, concept search (same filter behaviour, new position) and a full-screen button that works like Lineage's (?fullscreen=true).
  • Concept panel: one side panel that opens already editable in Edit mode, so the separate edit aside is gone. Order: identity fields, relationships, properties, synonyms, mappings, assets, live data, advanced; Save and Cancel in the footer; delete moves to the ⋯ menu.
  • New concept panel: "in ‹ontology›" above the "New concept" title; IDENTITY / DEFINITION sections; Type dropdown with a hint per type.
  • Floating cards: the conflicts card sits top-right (collapsed when clean) and the health card bottom-right ("All visible terms connected." when healthy), on Graph and Tree.
  • All ontologies: Graph / Tree / Ontology tabs; the Ontology tab shows a "Choose an ontology" picker whose search filters the list.
  • Ontology surface: Overview stat cards (concepts, relationships, properties, constraints) with Validation and Health cards; definitions table with a "Last edited" column, editor in a side drawer.
  • Settings opens as a dialog from the picker's ⋯ menu. Tasks opens a large dialog with tabs, a queue and a detail pane, with a "No tasks here yet" empty state. Review banners become dismissible pills. The tree view, release panel and import/export menu are also restyled.

Fixes made along the way (each has a test that fails without it):

  • Unsaved concept field edits survive adding or deleting a relation or property in the same panel.
  • Leaving Edit discards in-place edits, so returning starts clean.
  • The ontology picker's search actually filters the list.
  • Tasks stays reachable in the AI header whenever there is no sub-bar: catalog empty, owner loading, a memory draft under review.
  • A pending or failed validation is never reported as "clean" (Overview and conflicts card).
  • On All ontologies → Ontology, the header hides Add concept, because that surface has no concept drawer.
  • Column-binding Save is disabled until the editable snapshot loads, a guard AI mode lacked.

Type of change:

  • Improvement

High-level design:

  • Layout shell (OntologyExplorerPage.tsx): renderCanvasArea wraps each surface in a relative container that hosts the floating banner and the bottom renderCanvasToolbar (version chip, search slot and full screen). Full screen is a URL flag that pins the shell fixed inset-0.
  • OntologyStudioDrawer (new) is the one side-panel frame, used by the concept, relation, new-concept and definition editors. placement="beside" keeps it in flow, so the canvas keeps its width and the header stays clickable; "overlay" portals into the canvas host via OntologyStudioDrawerHostContext.
  • In-place concept editing:
    • useOntologyConceptEditor now returns the form state.
    • ConceptEditorProvider, which uses core HookForm so it shares the provider's react-hook-form copy, wraps the inspector body and footer.
    • EditableConceptInspector keeps the inspector mounted while the working copy loads and resets the form only when the user leaves Edit.
    • useDraftConcept keeps the previous data for the same concept across refetches, so a relation write does not unmount the editor.
  • Graph viewport: on resize the graph stays anchored top-left (anchorViewportToTopLeft) and only reveals the selected node if it is hidden, instead of re-fitting, so nodes no longer jump when the side panel opens.
  • Removed: the classic-only branches in the inspector, property authoring, column binding and assets panels. Both modes now render the single layout; the classic header is the only remaining mode split.
  • No API, schema or backend change. New strings are in en-us.json, synced and translated into every locale.
  • Not in this PR:
    • Classic-mode header (waiting on design).
    • Restyle of the Query console, visual builder and Data mode.

Tests:

Use cases covered

  • Edit mode: select a concept and edit it in place. Unsaved edits survive relation and property writes and are discarded on leaving Edit.
  • Add concept from the header opens the New concept panel with Type options and hints; hidden on All ontologies → Ontology and for users without create permission.
  • All ontologies → Ontology / Query picker filters by the typed name and shows counts.
  • Tasks is reachable in AI and classic mode, including an empty catalog and a memory draft under review; the empty state reads "No tasks here yet".
  • Validation is shown as validating, failed or clean, and never reports clean before it answers or when it fails.
  • Conflicts and health cards appear on Graph and Tree with no panel open; the tree keeps its rows clear of them.
  • Review banner pills can be dismissed. Version switch, release history, import/export menu, Settings dialog and full screen work.

Unit tests

  • Added and updated Jest tests.
  • New test file: OntologyOverview.test.tsx.
  • Updated test files:
    • OntologyGraphView.test.tsx
    • OntologyExplorerPage.test.tsx and OntologyExplorerPage.publication.test.tsx
    • OntologyQueryPicker.test.tsx and OntologyQueryPicker.counts.test.tsx
    • AllOntologiesGraphView.test.tsx
    • OntologyConceptEditor.test.tsx
    • OntologyConceptAssets.test.tsx
    • OntologyAuthoringWorkspace.test.tsx
    • OntologyNewClassPanel.test.tsx
    • OntologyHealthPanel.test.tsx
    • OntologyReviewBanner.test.tsx
    • OntologyTasksDrawer.test.tsx
    • OntologyImportExportMenu.test.tsx
    • OntologyVersionChip.test.tsx
    • OntologyStudioSubBar.test.tsx
  • jest src/components/governance/ontology src/pages/OntologyExplorerPage src/components/OntologyExplorer → 134 suites, 1575 tests passed on c4eb52e7b6a.
  • The full UI Jest suite passed earlier in the work (27,298 tests) but was not rerun after the review fixes.
  • Coverage %: not measured.
  • tsc --noEmit: 0 errors in files this PR touches. The 11 remaining TS4023/TS4053 errors are in untouched files and come from the locally built core-components dist types.
  • ESLint and Prettier: clean on changed files. yarn lint:playwright: 0 errors.

Backend integration tests

  • Not applicable (no backend changes).

Ingestion integration tests

  • Not applicable (no ingestion changes).

Playwright (UI) tests

  • Updated specs for the new layout. They are in playwright/e2e/Features/, plus the helpers in playwright/utils/ontologyStudio.ts:
    • OntologyNativeStudio, OntologyNativeImport, OntologyNativeImportReview and OntologyNativeExport
    • OntologyReview and OntologyReviewChanges
    • OntologyStudioFlows, OntologyPublishedView, OntologyAuthoringSafety and OntologyNativeTreeShell
    • OntologyConceptDrawer, OntologyLargeGraph, OntologyNativeAuthoring and OntologyNativeRelations
    • OntologyStudioPermissions and OntologyQueryScope
  • Run locally against Vite plus a local 2.0.0-SNAPSHOT server, before the self-review fixes:
    • OntologyConceptDrawer, OntologyNativeAuthoring, OntologyNativeRelations and OntologyStudioFlows: 49 passed.
    • OntologyAuthoringSafety, OntologyNativeImport, OntologyNativeOperations, OntologyNativeRelations, OntologyNativeStudio, OntologyNativeTreeShell, OntologyPublishedView, OntologyStudioFlows and OntologyStudioIsolatedToggle: 49 passed.
    • OntologyNativeAuthoring, OntologyNativeExport, OntologyQueryScope and OntologyStudioPermissions: 14 passed.
  • Some specs failed locally because the local backend is missing pieces, not because of UI asserts. They are still pending a run against a full stack:
    • OntologyAuthor role, deleteImpact and export endpoints return 404.
    • superProperties is rejected.
    • The CSV header format differs.
    • SPARQL returns 0 rows.
    • The library category is missing.
  • Pending: a rerun of the impacted specs on the final commit (make playwright_affected_run). The merge queue runs the full suite.

Manual testing performed

  1. Ran a local OpenMetadata server (2.0.0-SNAPSHOT) with the HL7 FHIR Starter library ontology installed.
  2. Served this branch's UI through the Collate AI shell (Vite) at /governance/ontology and signed in as admin.
  3. Walked every state in the recording below in AI mode, and repeated the main ones in classic mode (header unchanged).
  4. Negative checks:
    • The conflicts card shows an error, not "clean", when the local validation endpoint fails.
    • The Ontology picker hides Add concept.
    • Dirty concept edits survive adding a relation and are discarded on leaving Edit.

UI screen recording:

Recorded at c4eb52e7b6a: 1920×1080, 114 s, AI mode, real server responses with no route mocks. Each step is captioned. The recording covers:

  • All ontologies: Graph, Tree, and the Ontology picker filtering by "FHIR".
  • One ontology: the graph with the conflicts and health cards and the Draft/Published switch.
  • The concept panel opening editable in Edit.
  • Add concept from the header: the New concept panel and its Type dropdown.
  • Tree with the cards.
  • The Ontology Overview stat cards and the Concepts table.
  • The Tasks dialog empty state, the import/export menu and full screen.
  • View mode with "Edit ontology →".

On this local server, the validation endpoint returns an error (so the conflicts card shows it), and All ontologies → Graph shows "too many ontologies to show as one graph" because of the local catalog size. Both are existing behaviour.

Pending: the recording was made against a local dev server with the branch UI served by Vite, not the Docker build from skills/ui-pr-recording. This PR stays draft until it is re-recorded against the Docker build with sample data.

ontology-studio-handoff.mp4
Concept panel (editable in Edit) New concept + Type
Tree with floating cards Ontology Overview
Choose an ontology (filtered) Tasks dialog
Full screen

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. (No schema changes.)
  • For a UI feature or feature task: as part of PR creation, I ran the PR build in Docker with sample data and embedded a verified GitHub-hosted recording plus build/health evidence above (or explained why this requirement is not applicable). (Recorded against a local server; Docker recording pending, so this PR is draft.)
  • I have added tests (unit / integration / Playwright as applicable) and listed them above.
  • Self-review: I reviewed the final diff against REVIEW.md (the pr-checklist skill runs it) and fixed every 🔴 finding, or answered it on the line below.
    • Three fresh-context passes: 2a63b5a8a93, then ae7065d6cfc and 619b2bab6de. Every 🔴 was fixed in ae7065d6cfc, the last two passes found no 🔴, and the final 🟡 fixes are in c4eb52e7b6a, which got an inline check only.
    • Answered rather than fixed:
      • 🟡 toBeAttached in OntologyReview.spec: the test still asserts the text and toHaveAccessibleDescription.
      • 🟡 Count strings without plural forms: they follow the existing pattern.
      • 🟡 The Tasks placement rule repeats the workspace routing: left as is, with a comment.
      • 🟡 No tests for the Settings dialog close guard and diff refresh: these are one-line wiring changes.
      • 🟡 All ontologies still computes a Publish count it no longer shows: left as is.
  • Decision check: no durable decision. This is a layout restyle with no contract, default or ordering.

@anuj-kumary
anuj-kumary marked this pull request as ready for review November 11, 2026 15:01
@anuj-kumary
anuj-kumary requested a review from a team as a code owner November 11, 2026 15:01
Visual-only restyle of Ontology Studio: AI-mode header, canvas toolbar
(version switch, search, full screen), unified concept side panel, new
concept panel sections, floating conflicts/health cards, All ontologies
surfaces, overview stat cards, settings/tasks dialogs and review pills.
- Keep unsaved concept field edits across a relation/property write in the same panel
- Filter the ontology picker list by the typed query
- Keep Tasks in the AI header whenever the sub-bar is not shown
- Never report a pending or failed validation as clean (Overview, conflicts card)
- Hide All ontologies Add concept on the Ontology picker surface
- Show the conflicts and health cards on Tree as well as Graph
- Guard the Settings dialog close and refresh the working diff on save
…tion as clean

- Pad the Tree surface on the right while the conflicts/health cards float
- Hide the All ontologies health card in Data mode, as the per-ontology view does
- Conflicts card shows the clean note only once validation answered
- Concept search results open upward from the bottom toolbar so the canvas never clips them
- Settings dialog loads the full ontology (owners, reviewers) before showing the form
- Tree view offers Add concept like Graph view
- Disabled Publish explains why on hover
- Edit mode says when the concept's working copy failed to load
@anuj-kumary
anuj-kumary force-pushed the anuj-kumary/ontology_studio_handoff-access branch from d858dcc to 058d80d Compare November 12, 2026 02:06
@gitar-bot

gitar-bot Bot commented Nov 12, 2026

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

Restyling Ontology Studio also changes concept-editing state, validation displays, and navigation, so regressions could disrupt ontology authoring workflows.

Restyles Ontology Studio to match the design handoff across the AI header, canvas toolbar, concept panel, floating cards, All ontologies, Ontology surface, Settings and Tasks, with no feature or permission changes. Tasks empty queue now uses the shared NoDataPlaceholder as the ADR requires, and the Tasks dialog scroll dividers were corrected. No open issues remain.

✅ 2 closed
✅ Quality: Tasks empty queue hand-rolls an empty state, contradicting the ADR

📄 openmetadata-ui/src/main/resources/ui/src/components/governance/ontology/OntologyTasksDrawer/OntologyTasksDrawer.tsx:714-728
The new empty queue (ontology-tasks-empty) builds its own empty state out of FeaturedIcon color="gray" and two Typography blocks. The Accepted record ADR:2026-10-21-empty-states-render-through-the-placeholder-wrappers requires every empty state to go through a wrapper in common/EmptyPlaceholder/, and it bans grey icon overrides. The same file already uses NoDataPlaceholder for the 'select a task' pane, so this one is just inconsistent. Either use NoDataPlaceholder with title={t('message.ontology-no-tasks-yet')} and the assigned/created description in a tw:relative host, or add a record that supersedes the ADR.

✅ Quality: New Tasks dialog omits dividers="scroll"

📄 openmetadata-ui/src/main/resources/ui/src/components/governance/ontology/OntologyTasksDrawer/OntologyTasksDrawer.tsx:884-888
The Tasks slide-out has become a Dialog, but it uses the default always dividers and draws its own border-b on the header block. The repository rule is that modals always use <Dialog dividers="scroll"> and never draw their own header or footer borders, because the default is kept only for legacy modals. The new OntologySettingsDialog in this PR follows the rule; this one should too.

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 merged commit 6bca74e into main Nov 12, 2026
65 checks passed
@anuj-kumary
anuj-kumary deleted the anuj-kumary/ontology_studio_handoff-access branch November 12, 2026 05:24
anuj-kumary added a commit that referenced this pull request Nov 12, 2026
…ntology Studio restyle

#37587 and #37607 restyled Ontology Studio; the ontology E2E specs and
visual scenarios were not updated with it.

Product regressions fixed:
- A Concepts row opened no panel: OntologyGraphView waited for a selection
  nothing made; it now selects the requested concept.
- The canvas no longer re-fit a wholly visible graph when a drawer opened,
  so nodes sat under the drawer; restored in settleAfterCanvasResize.
- A discarded "New concept" form reappeared after Edit -> View -> Edit;
  the editor state is cleared when leaving Edit.

Tests updated to the intended redesign: drawers overlay the header and
canvas (close them before clicking covered controls), Advanced disclosure
in settings, new change-count copy, release export filename, health card
Review step, column count toggle, 62px sub-bar, and Import/Export dialogs.

Visual: model the new working/validation and export reads, update the
ontology scenarios to the current UI, drop the removed publication picker,
and refresh the baselines CI rendered.
anuj-kumary added a commit that referenced this pull request Nov 12, 2026
…ntology Studio restyle (#37641)

* Fixes #37640: Fix ontology Playwright and visual failures after the Ontology Studio restyle

#37587 and #37607 restyled Ontology Studio; the ontology E2E specs and
visual scenarios were not updated with it.

Product regressions fixed:
- A Concepts row opened no panel: OntologyGraphView waited for a selection
  nothing made; it now selects the requested concept.
- The canvas no longer re-fit a wholly visible graph when a drawer opened,
  so nodes sat under the drawer; restored in settleAfterCanvasResize.
- A discarded "New concept" form reappeared after Edit -> View -> Edit;
  the editor state is cleared when leaving Edit.

Tests updated to the intended redesign: drawers overlay the header and
canvas (close them before clicking covered controls), Advanced disclosure
in settings, new change-count copy, release export filename, health card
Review step, column count toggle, 62px sub-bar, and Import/Export dialogs.

Visual: model the new working/validation and export reads, update the
ontology scenarios to the current UI, drop the removed publication picker,
and refresh the baselines CI rendered.

* Refresh the Playwright impact map for the updated ontology specs

* fix(ui): sort OntologyProfileReport import in visualData
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.

Restyle Ontology Studio to match the design handoff

3 participants