feat: add collapsible stage cards with per-stage and global toggle#201
Merged
feat: add collapsible stage cards with per-stage and global toggle#201
Conversation
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
Contributor
There was a problem hiding this comment.
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_collapsedthrough 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.
- 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add collapse/expand functionality to stage cards so users can minimize stages they're not actively tweaking, keeping the UI compact.