feat: banner gradient toggle that follows the terminal palette (#336)#377
Merged
Conversation
Add behavior.banner_gradient (Settings -> Theme -> Banner Gradient). When off, the home banner is drawn in the theme's banner color instead of the animated RGB gradient, so with the Terminal (ANSI) preset the banner follows the terminal palette live (pywal etc.). The Terminal preset defaults the gradient off; an explicit config value wins. Preset cycling in Settings syncs the toggle, and the Home fast animation tick is skipped when the banner is static.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (7)
📝 WalkthroughWalkthroughAdds a configurable ChangesBanner Gradient Toggle
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant UserConfig
participant SettingsHandler
participant start_ui
participant draw_home
UserConfig->>SettingsHandler: resolved banner_gradient
SettingsHandler->>SettingsHandler: sync preset default or apply toggle
SettingsHandler->>start_ui: updated user configuration
start_ui->>draw_home: animation state and banner_gradient
draw_home->>draw_home: render gradient or theme.banner color
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
✨ Simplify code
Comment |
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.
Closes the follow-up request on #336: the Terminal (ANSI) theme preset recolors the whole UI live with the terminal palette, but the home banner kept its animated RGB gradient, which converts theme colors to hardcoded RGB and therefore never follows palette changes.
What's new
behavior.banner_gradientinconfig.yml). When off, the banner is drawn in the theme'sbannercolor as-is, so ANSI colors pass through and tools like pywal recolor the banner live along with the rest of the UI.banner_gradient:value in the config always wins. Cycling presets in the Settings screen syncs the toggle to the new preset's default, same as the color slots; Custom leaves it untouched.Tests
banner_gradient_toggle_switches_between_rgb_and_theme_color: renders Home both ways and asserts banner glyphs are RGB with the gradient on and exactlytheme.banner(ANSI Cyan under the Terminal preset) with it off.banner_gradient_defaults_off_for_terminal_preset_unless_explicit: config-load resolution (preset default vs explicit override).cycling_preset_to_terminal_turns_banner_gradient_setting_off: Settings preset cycling flips the toggle Default -> Terminal -> Pookie Pink.Verified manually on Windows Terminal: with the Terminal preset and the gradient off, the banner renders solid in the scheme's cyan and recolors instantly when switching color schemes (Campbell, Solarized Dark, One Half Light), no restart needed.
cargo fmt,clippy -D warnings(telemetry feature set), and the full test suite (439) pass.Summary by CodeRabbit
New Features
Documentation