-
Notifications
You must be signed in to change notification settings - Fork 424
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use trait collection to control theme changes #2672
Merged
Merged
Conversation
This file contains 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
github-actions
bot
added
the
bot: not in app board
Added by automation for pull requests with tasks not added to iOS App Board Asana project
label
Apr 4, 2024
dus7
removed
the
bot: not in app board
Added by automation for pull requests with tasks not added to iOS App Board Asana project
label
Apr 5, 2024
Deprecate existing appearance-specific themes
Now that Autoupdating theme has dynamic colors its not required to artificially propagate theme changes through UI layers.
This applies colors during view initialization and optionally adds changes needed to be done on trait collection change.
dus7
force-pushed
the
mariusz/dynamic-colors
branch
from
April 5, 2024 11:28
c914cbd
to
c3ab446
Compare
brindy
approved these changes
Apr 5, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I bashed on this for a bit and nothing jumps out in the code. Great work! Let's get it merged and tested in the alpha/internal release. :)
samsymons
added a commit
that referenced
this pull request
Apr 7, 2024
# By Christopher Brind (2) and others # Via GitHub * main: Use trait collection to control theme changes (#2672) Expand maestro tests (#2691) scroll to selected item after opening new tab, etc (#2689) Update autoconsent to v10.5.0 (#2671) Fix history debug view controller causing crash on tap (#2681) # Conflicts: # DuckDuckGo/HomeCollectionView.swift # DuckDuckGo/HomeViewController.swift
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.
Task/Issue URL: https://app.asana.com/0/72649045549333/1206042861558085/f
Tech Design URL:
CC:
Description:
Changes here remove custom dark/light theme propagation and uses native
traitCollection
and possibility to override this setting for Window to apply user’s selection.Approach:
dynamicProvider
for colors.decorate
functions private and apply colors locally in respective View or ViewController.decorate
functions during initialization, droppingapplyTheme
calls.traitCollectionDidChange
in places usingCGColor
s, animations and other places not using dynamic assets.Themable
protocol.Steps to test this PR:
See https://app.asana.com/0/0/1206918196231425/f for specific testing details.
OS Testing:
Theme Testing:
Internal references:
Software Engineering Expectations
Technical Design Template