Skip to content

feat: add collapsible stage cards with per-stage and global toggle#201

Merged
OpenSauce merged 2 commits intomainfrom
feat/collapsible-stage-cards
Feb 28, 2026
Merged

feat: add collapsible stage cards with per-stage and global toggle#201
OpenSauce merged 2 commits intomainfrom
feat/collapsible-stage-cards

Conversation

@OpenSauce
Copy link
Copy Markdown
Owner

Add collapse/expand functionality to stage cards so users can minimize stages they're not actively tweaking, keeping the UI compact.

  • Per-stage ▶/▼ toggle button in each stage header
  • Global "Collapse All / Expand All" button in the control bar
  • Collapse state synced with stage add/remove/move/preset-load
  • Transient UI-only state, not persisted in presets

Add collapse/expand functionality to stage cards so users can minimize
stages they're not actively tweaking, keeping the UI compact.

- Per-stage ▶/▼ toggle button in each stage header
- Global "Collapse All / Expand All" button in the control bar
- Collapse state synced with stage add/remove/move/preset-load
- Transient UI-only state, not persisted in presets
Copilot AI review requested due to automatic review settings February 28, 2026 22:34
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds UI-only collapse/expand behavior for the stage cards in the GUI so users can reduce visual clutter while editing an amplifier chain.

Changes:

  • Add per-stage collapse toggle in each stage header and propagate is_collapsed through stage view rendering.
  • Add a global “Collapse All / Expand All” control and track collapse state in AmplifierApp, keeping it in sync on add/remove/move/preset-load.
  • Update stage list and registry plumbing to pass collapse state into each stage view.

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/gui/stages/tonestack.rs Conditionally render stage body based on is_collapsed; adjust padding.
src/gui/stages/preamp.rs Same: hide body when collapsed; accept is_collapsed.
src/gui/stages/poweramp.rs Same: hide body when collapsed; accept is_collapsed.
src/gui/stages/noise_gate.rs Same: hide body when collapsed; accept is_collapsed.
src/gui/stages/multiband_saturator.rs Same: hide body when collapsed; accept is_collapsed.
src/gui/stages/level.rs Same: hide body when collapsed; accept is_collapsed.
src/gui/stages/filter.rs Same: hide body when collapsed; accept is_collapsed.
src/gui/stages/compressor.rs Same: hide body when collapsed; accept is_collapsed.
src/gui/stages/mod.rs Extend StageConfig::view to accept and forward is_collapsed.
src/gui/messages/mod.rs Add messages for per-stage and global collapse toggling.
src/gui/components/widgets/common.rs Extend stage_header to include a collapse toggle button.
src/gui/components/stage_list.rs Pass per-stage collapse state into StageConfig::view.
src/gui/components/control.rs Add global collapse/expand button to the control bar.
src/gui/app.rs Store/update collapsed_stages, handle new messages, and compute all_collapsed().

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/gui/components/control.rs
- Extract stage_card() in common.rs to deduplicate the
  header/container/padding/style boilerplate across all 8 stage views
- Each stage view now just provides a body closure to stage_card()
- Add collapse_all/expand_all translation keys for EN and ZH_CN
- Use tr!() for the collapse/expand button label in control bar
@OpenSauce OpenSauce enabled auto-merge (squash) February 28, 2026 22:41
@OpenSauce OpenSauce merged commit 89cb313 into main Feb 28, 2026
7 checks passed
@OpenSauce OpenSauce deleted the feat/collapsible-stage-cards branch February 28, 2026 22:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants