-
Notifications
You must be signed in to change notification settings - Fork 5
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
[MOB-3152] Refactor Ecosia theming #834
[MOB-3152] Refactor Ecosia theming #834
Conversation
PR Reviewer Guide 🔍(Review updated until commit f00805b)Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Latest suggestions up to f00805b
Previous suggestionsSuggestions up to commit 8ceb257
|
Turns out this was related to an old issue we had fixed in previous versions for theme changes with the app on foreground -> #712 Given Firefox still works like that and it's still a very specific case, leaving it to be properly QAed and handled separately. I also had some issues when trying to replicate the fix on the upgraded version, namely |
Persistent review updated to latest commit f00805b |
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.
This is such great work! 🎨
And indeed a great step forward towards a better design system integration!
On top of that, no more "legacy theme manager". Such a relief!
Lets bring it in so that I can align the opened Ecosia Framework and solve conflicts!
It's interesting your comment regarding the issue being only when the app is in "foreground".
Annoying.
For full visibility, I wanted to mention that what's fixed as part of #712 included the state when the automatic dark/light mode was triggered while the app was in the background state.
Upon reopening, you'd still see the appearance as it was before the switch.
The Foreground state mentioned in the PR included the scenario where we toggled the appearance forcely via the developer tools (CMD+SHIFT+A).
Hope that clarifies it too 👍
@d4r1091 Interesting, thanks for clarifying! Right now this is less of a problem then, since as soon as the app is reopened from background it updates correctly. It's only a problem if the theme changes when on foreground (e.g. becoming nightime with auto theme) which is a very specific use case (maybe not worth spending more time to investigate indeed). |
1b6d6e1
into
mob-3113-firefox-upgrade-133
MOB-3152
Context
On the latest upgrade, Firefox got rid of the
LegacyTheme
, which we were using for Ecosia colors.Approach
ThemeColourPalette
, following the same protocol-oriented approach.EcosiaTheme
using the nemEcosiaThemeColourPalette
LegacyTheme
andLegacyThemeManger
which had been recovered during the upgradeOther
Crashes cause by missing window
MOB-3159
Noticed that this other bug ticket is related to theme changes and caused by a missing window objected when applying the theme. I was apply to fix that together with this PR by using ThemeApplicable on views instead of
UIView.currentWindowUUID
, since that can frequently still benil
if a view is not yet added to the window.Reacting to appearance changes with the app on foreground
#834 (comment)
Before merging
Checklist
// Ecosia:
helper comments where needed