-
Notifications
You must be signed in to change notification settings - Fork 119
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
VPN-6681: Dark mode images and animations (part 1) #10170
Open
mcleinman
wants to merge
18
commits into
main
Choose a base branch
from
vpn-6681-dark-mode-images
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
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
mcleinman
force-pushed
the
vpn-6681-dark-mode-images
branch
from
January 7, 2025 19:42
1f5bb74
to
3050617
Compare
mcleinman
force-pushed
the
vpn-6681-dark-mode-images
branch
from
January 7, 2025 19:57
d0eae60
to
0c68fa0
Compare
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.
Description
In a meeting on Dec 31, we decided to have two actual assets for each image/animation (rather than doing any recoloring for one-color assets or anything like that). All the themes will either use "dark mode assets" or "light mode assets" - that is, even though we'll likely have more than 2 themes, all will need to work well with one of the two sets of assets. There is a new flag in the theme file to determine which assets to use.
See
docs/Components/assets.md
(added in this PR) for more details on how this works. (This includes nuggets such as: "the only assets that don't change for dark mode are the flags".)The dark mode assets will come from design as part of VPN-3225. For testing, I've messed with some of the assets for dark mode (mostly using a lock in place of some regular assets in dark mode, and other similar design horrors).
I created automated tests. They check 3 things:
MZAssetLookup
are unique (there are no duplicates).MZAssetLookup.getImageSource
), except the expected flags.MZAssetLookup.getImageSource
actually exist in theimageLookup
withinMZAssetLookup
.These tests aren't perfect. For instance, in the spots that we feed a string into a
ListElement
, and then apply that string to aMZAssetLookup.imageLookup(someString)
- in those cases, #3 isn't properly checked. And in general, several of those tests don't run on animations. (Though we only have 5 animations, and seldom add more to the app.)In Dev menu: I moved the animation playground under "UI Testing", and created a currently-broken "image playground" (see "next up").
Next up
Another PR as part of VPN-6681. It will include:
Image Playground
, which will show all assets against a dark and a light background. This is mostly to show designers how assets may look.Work to do for the designers:
Not to be done: We are not going to mess with app icons and notification icons, per an earlier discussino.
Testing
There is a debug menu called
Theme list
. If you change it to the hacky theme, you'll see some assets change (most assets are currently identical in both dark and light mode, but I changed some dark mode assets to awful things just to show the change).Reference
VPN-6681
Checklist