docs(theming patterns): add best practices - #5102
Merged
andrew-ronaldson merged 5 commits intoSep 17, 2026
Merged
Conversation
Collaborator
Contributor
Author
|
Notes on this draft:
|
andrew-ronaldson
marked this pull request as ready for review
September 10, 2026 17:24
phcox
reviewed
Sep 16, 2026
|
|
||
| - **Default to the system setting:** Provide a "System" option for color scheme and contrast mode, and select it by default, so your product respects the user's OS- or browser-level preferences until they choose to override them. | ||
| - **Persist user selections:** Store each user's choice, for example in `localStorage` or their account settings, so their preferences are remembered across sessions. | ||
| - **Apply changes immediately:** Update the UI as soon as a user makes a selection, without requiring a separate save or submit action. |
Contributor
There was a problem hiding this comment.
I agree with this guideline, but will there ever be a case when these controls are placed in a User Preferences modal that requires a Save or Apply action for other settings? If so, do we still want theme updates to happen immediately? I don't see a huge problem with it, but it could get weird that some things require a Save or Apply and others don't.
phcox
approved these changes
Sep 16, 2026
phcox
left a comment
Contributor
There was a problem hiding this comment.
Looks good. Just made a single comment that I don't think should prevent this from being merged.
Collaborator
|
Your changes have been released in:
Thanks for your contribution! 🎉 |
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.
Will close to #5037
Quick link to the edits https://pf-org--pr-5102-site.surge.sh/foundations-and-styles/theming#theme-controls