Dynamic toolbar extension for Silo commands #14
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Overview
Dynamically show/hide Silo-specific toolbar commands based on the currently selected origin. When a Silo origin is selected, extended commands (Commit, Pull, Push, Info, BOM, etc.) appear in the toolbar. When Local Files is selected, these commands are hidden.
Parent Issue
Epic: #8 Unified File Origin System
Goals
Detailed Design
Toolbar Layout
Command Visibility Control
Create a system to register commands with capability requirements:
Silo Commands to Show/Hide
Origin_CommitOrigin_PullOrigin_PushOrigin_RollbackOrigin_InfoOrigin_BOMOrigin_SetStatusOrigin_AuthImplementation Approach
Option A: Dynamic Action Visibility
Option B: Separate Toolbar Section
Create a dedicated "Origin Tools" toolbar section that gets populated based on origin:
New Commands
Create new unified commands that replace
Silo_*commands:Menu Integration
Also update File menu to show/hide Silo items:
Implementation Tasks
OriginCommandManagerclassOriginCapabilityflagsOrigin_*commandsSilo_*commands to new systemFiles to Create/Modify
src/Gui/OriginCommandManager.h(new)src/Gui/OriginCommandManager.cpp(new)src/Gui/CommandOrigin.cpp(new - unified origin commands)src/Gui/MainWindow.cpp(toolbar updates)src/Gui/Application.cpp(menu updates)Acceptance Criteria
Dependencies
Blocking
None - this completes Phase 2
Complete. Closing with code references:
src/Gui/CommandOrigin.cpp(277 lines) — 5 capability-gated commands:Origin_Commit/Origin_Pull/Origin_Push— visible whensupportsRevisions()Origin_Info— visible whensupportsPartNumbers()Origin_BOM— visible whensupportsBOM()src/Gui/Application.cpp:1025—CreateOriginCommands()registrationsrc/Gui/Workbench.cpp— Origin commands added to toolbar/menu layout