Sidebar Navigation: Architecture Options for CoMPAS OpenSCD

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)

 

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-ui as a dependency

  • Adapt the plugin data model (oscd-shell uses a simpler PluginEntry; compas-open-scd has kind, position, requireDoc, etc.)

  • Decide where menu plugins and validators go

 

Details

 

Details

✅ Pros

  • Component already exists, tested, and working

❌ Cons

  • Requires Lit v3 upgrade — highest-risk change in this option

  • Introduces @omicronenergy/oscd-ui, a new external dependency

  • Plugin model mismatch requires adaptation work

  • Only solves editor navigation; menu/validator placement still open

  • The oscd-shell sidebar uses different colours and styling — fitting it into the existing compas-open-scd layout will require visual adjustments to either the sidebar or the surrounding UI

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-* components

  • Replace or repurpose mwc-drawer (could be kept for menu/validator plugins)

  • Remove oscd-menu-tabs tab bar; replace with sidebar-based editor switching

  • Decide where menu plugins and validators go

 

Details

 

Details

✅ Pros

  • No Lit version upgrade required

  • No new dependencies

  • Full control over plugin model (editor, menu, validator, position, requireDoc)

  • Community can design the UX from scratch

❌ Cons

  • More implementation effort

  • Tests must be written from scratch

  • UX decisions regarding layout for all plugin kinds must be made before implementation


Summary

Criterion

Option A (Extract)

Option B (Custom)

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

  1. 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.

  2. 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.