TODO 3: Fix and Redesign Ontology Browser
Problem
The Ontology Browser at /docs/model/ontology is severely broken:
- Class Hierarchy renders bare numbers "0 0 0 4 1 2 0 0..." instead of class names
- Negative margin (
margin: 0 -24px) breaks VitePress doc layout - Sidebar is too narrow (fixed 240px)
- Only 2 levels of hierarchy visible
- 17 root classes with mostly 0 children makes hierarchy look broken
Root Cause of Bug #1 (Critical)
The template uses getClass(rootId)?.label || rootId — but the class data likely uses a different field name (e.g., name, className, or the IRI fragment). The rootId might be a numeric index, so when label is undefined, it shows the index as a bare number. Also, the ob-hier-count spans with value 0 render as visible "0" text.
Files to Modify
.vitepress/theme/components/OntologyBrowser.vue— Complete rewrite (~1550 lines)
Implementation Plan
Phase 1: Fix data binding bugs
- Read generated
public/data/ontology-schema.jsonto understand exact data shape - Fix getClass(), getProperty(), getShape() to return correct field names
- Fix Class Hierarchy template — hide zero-count badges, use correct label field
- Test all 4 sidebar tabs render correctly
Phase 2: Fix layout
- Remove
margin: 0 -24pxnegative margin - Replace fixed sidebar with responsive layout that works within VitePress doc container
- Desktop: collapsible sidebar (280px) + scrollable main content
- Mobile: full-width stacked layout
- Fix table overflow in property/shape detail views
Phase 3: Improve UX
- Add search/filter to entity lists
- Collapsible class hierarchy tree (not just 2 levels)
- Proper entity detail views with full metadata
- Alphabet navigation for long entity lists
- Breadcrumb navigation
Phase 4: Visual polish
- Apply brand design system consistently
- Dark mode support
- Smooth transitions for expand/collapse
- Proper table styling
Data Summary
- 24 OWL Classes (17 roots, only Designation has 4 children)
- 105 Properties (45 object + 60 datatype)
- 24 SHACL Shapes
- 14 Taxonomies with 129 named individuals
- 11 Annotation Properties
Verification
- Run
npm run devand navigate to /docs/model/ontology - Class Hierarchy shows actual class names (ManagedConcept, LocalizedConcept, etc.)
- All tabs work: Classes, Properties, Shapes, Taxonomies
- No horizontal overflow
- Responsive at all breakpoints
- Dark mode works