Sidebar Navigation: Architecture Options for CoMPAS OpenSCD
Status | Draft — open for community discussion |
Date | 2026-03-11 |
Context
The current compas-open-scd layout uses a modal drawer (mwc-drawer) for navigation. When opened, it overlays the editor content and must be dismissed to return to work. Editor switching is handled separately via a tab bar (mwc-tab-bar) at the top of the screen.
The oscd-shell project takes a different approach: navigation is split across two areas:
App bar (plugins-menu): a dropdown in the top bar that holds menu plugins and validators
Persistent sidebar (editor-plugins-panel): a fixed 280 px column for editor plugins only, collapsible, always alongside the editor content
Layout Comparison
| compas-open-scd (current) | oscd-shell (reference) |
|---|---|---|
Editor navigation | Tab bar at top of screen | Persistent sidebar (collapsible) |
Menu plugins & validators | Modal drawer (overlays editor) | Dropdown in app bar |
Layout behaviour | Drawer overlays content, must be dismissed | Sidebar sits alongside content |
Note: The oscd-shell sidebar is not a full navigation replacement. Menu plugins and validators have separate homes in the app bar. Any sidebar adoption for compas-open-scd must include a decision on where those plugin kinds live.
Options
Option A — Extract the sidebar from oscd-shell
Lift editor-plugins-panel (~174 lines, well-decoupled) from oscd-shell and wire it into the compas-open-scd layout.
What needs to change:
Upgrade Lit from v2 to v3 across the monorepo (breaking change for all plugins)
Add
@omicronenergy/oscd-uias a dependencyAdapt the plugin data model (oscd-shell uses a simpler
PluginEntry; compas-open-scd haskind,position,requireDoc, etc.)Decide where menu plugins and validators go
| Details |
|---|---|
✅ Pros |
|
❌ Cons |
|
Option B — Custom sidebar in compas-open-scd
Design and implement a new sidebar component using the existing MWC stack and plugin model.
What needs to change:
Implement sidebar component using existing
@material/mwc-*componentsReplace or repurpose
mwc-drawer(could be kept for menu/validator plugins)Remove
oscd-menu-tabstab bar; replace with sidebar-based editor switchingDecide where menu plugins and validators go
| Details |
|---|---|
✅ Pros |
|
❌ Cons |
|
Summary
Criterion | Option A (Extract) | Option B (Custom) |
|---|---|---|
Implementation effort | Low–medium (adaptation) | Medium |
Lit upgrade required | Yes (v2 → v3) | No |
New dependencies | @omicronenergy/oscd-ui | None |
Plugin model fit | Partial (needs adaptation) | Full |
Handles all plugin kinds | No (only editors) | Yes (can be designed for all) |
Risk | Dependency & Lit upgrade | Scope creep, UX decisions |
Open Questions for the Community
Is a Lit v3 upgrade planned for compas-open-scd? If yes, Option A becomes significantly more practical. If not in the near term, Option B is the lower-risk path.
Where do menu plugins and validators live in a sidebar layout? Both options must answer this. Keeping the modal drawer for non-editor plugins is one possibility; moving everything into a structured sidebar panel is another.