Skip to content

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

Conversation

RitikaPahwa4444
Copy link
Collaborator

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:

Before After
Map
map_before map_after
Feedback Dialog
feedback_before feedback_after

The light mode still remains the same:

Light Mode:

Before After
Map
light_map_b4 light_map_after
Feedback Dialog
light_feedbback_before light_feedback_after

@RitikaPahwa4444 RitikaPahwa4444 deleted the ui_elements_not_conforming_to_dark_mode branch March 30, 2023 15:57
@RitikaPahwa4444 RitikaPahwa4444 restored the ui_elements_not_conforming_to_dark_mode branch March 30, 2023 15:57
* 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
@kartikaykaushik14
Copy link
Contributor

@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")

@nicolas-raoul
Copy link
Member

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 setStyle with other usages, if you think it makes sense.

Thanks both!

…oto location (commons-app#5190)

Co-authored-by: Siva <doodsiva@gmail.com>
@RitikaPahwa4444
Copy link
Collaborator Author

I just checked out the latest master. Thank you @nicolas-raoul for giving the example; I will make the necessary changes.

@RitikaPahwa4444
Copy link
Collaborator Author

Seems like the unit tests have changed too in the latest master. They are failing because of the constants I added in the LocationPickerConstants file and need to be modified. Will update after fixing the tests🙂

@nicolas-raoul
Copy link
Member

Ah sorry, thanks for noticing!

@RitikaPahwa4444
Copy link
Collaborator Author

I have added an additional target exception in the unit test caused by the introduction of constants in the code.

Copy link
Member

@nicolas-raoul nicolas-raoul left a 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. :-)

@nicolas-raoul nicolas-raoul merged commit a5a65fc into commons-app:master Apr 3, 2023
@RitikaPahwa4444
Copy link
Collaborator Author

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 LocationPickerConstants file does not sound appropriate if we are using these styles across the other fragments too like ExploreMapFragment and NearbyParentFragment as they are located in separate directories in the project and are logically different.

@nicolas-raoul
Copy link
Member

@RitikaPahwa4444 You are right on all points!

@RitikaPahwa4444
Copy link
Collaborator Author

Thank you for confirming. I'll make the changes and create another pull request soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dark mode: Some UI elements not conform
4 participants