feat: Independent color settings per background type#471
Merged
Conversation
- Added typeColors field to store colors per background type - Updated useBackgroundPreferences to manage per-type colors - Modified BackgroundSettings UI to use per-type colors - Added migration logic for backward compatibility - Added tests to verify color independence between types Co-authored-by: ullbergm <273876+ullbergm@users.noreply.github.com>
- Fix fallback reference to use typeColors.gradient.color - Only update gradient-specific properties when type is gradient - Make gradient value computation conditional on type Co-authored-by: ullbergm <273876+ullbergm@users.noreply.github.com>
Use typeColors values from DEFAULT_PREFERENCES for consistency Co-authored-by: ullbergm <273876+ullbergm@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add more granular settings for background colors
feat: Independent color settings per background type
Nov 6, 2025
Contributor
Test Results - JVM946 tests 938 ✅ 1m 7s ⏱️ Results for commit 9808f0e. |
Contributor
Test Results - Native946 tests 938 ✅ 1m 8s ⏱️ Results for commit 9808f0e. |
Contributor
|
Pull Request closed and locked due to lack of activity. |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Background types (solid, gradient, geopattern) previously shared color state. Changing gradient colors would overwrite the solid color when switching back.
Changes
Data Model
typeColorsobject storing per-type color state:State Management (
useBackgroundPreferences.js)updatePreference()now writes to type-specific path when updatingcolor,secondaryColor, orgradientDirectiongetBackgroundStyle()reads from active type's color settingsUI (
BackgroundSettings.jsx)Tests
Behavior
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.