fix(toolbar): add workbench-level fallback contexts (#230) #235

Merged
forbes merged 2 commits from fix/workbench-toolbar-fallback into main 2026-02-15 01:23:36 +00:00

2 Commits

Author SHA1 Message Date
e6dd3c6896 Merge branch 'main' into fix/workbench-toolbar-fallback
Some checks failed
Build and Test / build (pull_request) Has been cancelled
2026-02-15 01:23:25 +00:00
forbes
9a566cabf9 fix(toolbar): add workbench-level fallback contexts (#230)
Some checks failed
Build and Test / build (pull_request) Has been cancelled
PartDesign, Sketcher, and Assembly toolbars use
DefaultVisibility::Unavailable and rely on EditingContextResolver to
show them. When switching to these workbenches without a specific editing
state (e.g. PartDesign with no Body activated), no context matches and
all workbench toolbars stay hidden.

Add workbench-level fallback contexts at priority 20 that match when the
workbench is active regardless of editing state:
- partdesign.workbench: shows Helper Features + Sketcher toolbars
- sketcher.workbench: shows Sketcher + Sketcher Tools
- assembly.workbench: shows Assembly toolbar

These fill the gap between object-specific contexts (priority 30+) and
the empty_document fallback (priority 10).
2026-02-14 19:17:04 -06:00