-
Notifications
You must be signed in to change notification settings - Fork 1.3k
5191: Fix UI elements not conforming to dark mode #5193
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
5191: Fix UI elements not conforming to dark mode #5193
Conversation
* Fix commons-app#5182 Switch From Mapbox to MapLibre * Fix commons-app#5182 Switch From Mapbox to MapLibre - Resolved requestFeature() issue * Fix commons-app#5182 Switch From Mapbox to MapLibre - Resolved dark mode issue on two screens * Fix commons-app#5182 Switch From Mapbox to MapLibre - Resolved dark mode issue on additional screens * Fix commons-app#5182 Switch From Mapbox to MapLibre - Resolved dark mode issue on notification screen * Fix commons-app#5182 Switch From Mapbox to MapLibre - Test errors
@RitikaPahwa4444 You might have to make a few changes after rebasing with the latest version of Master. After the changes for moving from Mapbox to MapLibre, we now have the option to get a predefined style based on the type of configuration we choose. It could be Mapbox, MapLibre, or MapTiler. In order to retain the original configuration, we chose to retain the configuration type Mapbox. For ex: Style.DARK would now be used as Style.getPredefinedStyle("Dark") |
Indeed, Rikita would you mind rebasing and writing setStyle like on this line: https://github.com/commons-app/apps-android-commons/pull/5184/files#diff-b503ac9d99a74afbbde1ec04f8f774fd92a69b3a7e940233b82df7b9c3db59f0L319 By the way, do not hesitate to create constants or otherwise factorize the first argument of Thanks both! |
…oto location (commons-app#5190) Co-authored-by: Siva <doodsiva@gmail.com>
I just checked out the latest master. Thank you @nicolas-raoul for giving the example; I will make the necessary changes. |
Seems like the unit tests have changed too in the latest master. They are failing because of the constants I added in the |
Ah sorry, thanks for noticing! |
I have added an additional target exception in the unit test caused by the introduction of constants in the code. |
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.
Works great, special thanks for also fixing the unit tests!
I guess Style.DARK:Style.OUTDOORS
could be used in more places, they probably got overwritten by the rebase, feel free to modify in another pull request if you want. :-)
Hi @nicolas-raoul, thank you for merging the PR. I had noticed those occurrences but refrained from modifying them in this pull request as they were not a part of this issue. Is it okay if I create a common constants file for all the map styles that the app is using: Outdoors, Dark and Streets? Using the |
@RitikaPahwa4444 You are right on all points! |
Thank you for confirming. I'll make the changes and create another pull request soon. |
Description (required)
Fixes #5191
What changes did you make and why?
Changed the map in the upload wizard at the location selection step and black font in the feedback dialog to conform to the dark mode.
Tests performed (required)
Tested ProdDebug on Redmi 5A with API level 27.
Screenshots (for UI changes only)
Dark Mode:
The light mode still remains the same:
Light Mode: