organicmaps / organicmaps

🍃 Organic Maps is a free Android & iOS offline maps app for travelers, tourists, hikers, and cyclists. It uses crowd-sourced OpenStreetMap data and is developed with love by MapsWithMe (MapsMe) founders and our community. No ads, no tracking, no data collection, no crapware. Please donate to support the development!
https://organicmaps.app
Apache License 2.0
9.49k stars 912 forks source link

Synchronize night mode to phone system settings (Android + Android Auto) #749

Open rtsisyk opened 3 years ago

rtsisyk commented 3 years ago

Our current day/night mode settings are misleading:

  1. Auto <!-- Automatic for navigation mode only
  2. On <!-- Always on
  3. Off <!-- Always off

Users expect, that "Auto" will change the map theme also. The dark theme for maps is opinionated. Some people, including me, just doesn't like maps in the dark mode. However, the dark mode is really required during navigation in order not to dazzle the driver.

I propose to add more options:

  1. Automatic for navigation only <!-- DEFAULT
  2. Automatic for map & navigation
  3. Use system theme <!-- must handle theme changing events
  4. Always on
  5. Always off

2023-12-29 updated after discussions.

Implement 3 options for Android, iOS, CarPlay and Android Auto:

  1. Light
  2. Dark
  3. System <!-- follows system theme changing event in the phone/car.

Upvote & Fund

Fund with Polar

PetbkA commented 3 years ago

Automatic for map & navigation

Me personally don't see a point in this option. It adds flexibility, of course, but I don't know the navigation app that has such logic - usually the "dark" theme means dark theme in all modes.

Besides, as I already mentioned in #366 , changing theme to light when returning to map mode is very strange - dark theme is for navigating at night, and switching to light theme will just blind you.

Use system theme <!-- must handle theme changing events

Strange option for navigation app IMHO, but some other apps (e.g. Yandex Maps) are using it, so may be it's worth to be added

biodranik commented 3 years ago

Let's not create another OSMand and make it simpler. For now, just change the behavior for auto and make it taking the system theme, as all users expect.

And move this setting out of the Navigation block.

PetbkA commented 3 years ago

just change the behavior for auto and make it taking the system theme, as all users expect.

I doubt that users expect that Auto will inherit system theme - there's usually a separate setting for it

jk commented 3 years ago

I doubt that users expect that Auto will inherit system theme - there's usually a separate setting for it

Personally, I would expect it, but make it clear, rename it to »Use system theme« and use it for maps and navigation.

PetbkA commented 3 years ago

I'll explain my point more thoroughly:

  1. Navigation apps enable night mode automatically mostly to save your eyes at night;
  2. Conversely, OS theme can be set 'cause you just like dark menus and so on;
  3. In some OSes (e.g. LineageOS) there's no automatic OS theme changes.

Considering terms 2 and 3, it's not very nice to change Auto mode to inherit OS settings 'cause in some cases it'll still always be dark or light theme - separate setting like Inherit OS theme would be better

rtsisyk commented 3 years ago

Let's not create another OSMand and make it simpler. For now, just change the behavior for auto and make it taking the system theme, as all users expect.

No, It doesn't work and we receive negative feedback regarding broken night mode.

jk commented 3 years ago

we receive negative feedback regarding broken night mode.

Really? Where? I see people, like me, wondering why »Auto« does not work for the whole UI, not just while navigating. I just searched the issues and App store comments and can't find anyone complaining that there are too few customizations of the night mode or complain about it covers the whole UI.

biodranik commented 3 years ago

@rtsisyk I like the idea with renaming it to "Use system theme".

So let's:

  1. Rename auto and support system theme changes notifications.
  2. Move this setting out of Navigation block.
TimMagee commented 3 years ago

The current behavior (where navigation switches to night mode) is how G Maps works. It is how OsmAnd works by default. It is how the Uber Driver app works. I'm sure other map apps work the same way.

We need to not violate the principle of least astonishment while also providing a minimal set of options that will work well for most people.

The settings we need (IMO):

The auto day/night mode is a navigation only option that turns navigation into day/night mode based on sunrise and sunset. In this mode, the system drops back to the app theme after navigation is over.

While I understand that we did receive a complaint about this behavior, most other navigation apps have this behavior, so I think we should provide it in order to provide what most users expect.

rtsisyk commented 3 years ago

@TimMagee does "App Theme" affects the map theme too? I thought about two options, but wanted to keep it simple.

PetbkA commented 3 years ago

The current behavior (where navigation switches to night mode) is how G Maps works. It is how OsmAnd works by default. It is how the Uber Driver app works. I'm sure other map apps work the same way.

Just tried the following apps:

  1. Google Maps (latest version available in Google Play, 5 000 000 000+ downloads): separate settings for navigation and app/map modes:
    1. App/map: Light / Dark / As system options. No Auto at all;
    2. Navigation: Auto / Day / Night. So you can't set G Maps to constantly work with the same theme in Auto mode;
  2. Waze (latest version available in Google Play, 100 000 000+ downloads): one setting for color scheme with Day / Night / Auto options. In Auto mode, theme stays constant, i.e. doesn't change to light when cancelling the route;
  3. Yandex Maps 10.0 (I'm using "ad-free" version which isn't updated, 50 000 000+ downloads): one setting for the app/map and navigation with On / Off / Auto / System theme. In Auto mode, theme stays constant, i.e. doesn't change to light when cancelling the route;
  4. Sygic Maps (latest version available in Google Play, 50 000 000+ downloads): one setting for the app/map and navigation with On / Off / Auto / System theme. In Auto mode, theme stays constant, i.e. doesn't change to light when cancelling the route;
  5. HERE WeGo (latest version available in Google Play, 10 000 000+ downloads): one setting for navigation only. Map browsing is always using the light theme;
  6. OsmAnd (latest version available in Google Play, 5 000 000+ downloads): separate settings for app theme and day/night mode (i.e. for the map) which can even be applied to different profiles, including Browse map and Driving. For day/night mode there's a Sunrise / Sunset / Day/Night / Light sensor. The least is very strange option, and settings scheme is pretty clumsy, but you can set Day/Night for browsing map and navigation.

Haven't tried the Uber Drive (50 000 000+) 'cause it requires an account, but in their guide we can see that there's a Night mode setting with Auto \ On \ Off options. May be theme is constant for map and navigation too.

So I wouldn't say that the majority of the apps doesn't allow to at least set them to use constant theme in Auto mode. IMHO Yandex Maps scheme is the best.

My initial error when creating FR was that I didn't realize that Night Mode setting was in the Navigation section, although I still can't understand why it's good when your eyes are blinded with light theme at night.

Considering previous comments, I would vote for leaving the setting as it is now 'cause in the other case it'll be clumsy schemes like Google or even OsmAnd with tons of options made just to satisfy everyone

TimMagee commented 3 years ago

@rtsisyk In my plan, app theme definitely affects the map theme as well. It changes the menus and the maps to dark or light mode.

In the navigation settings, there is a setting that allows the user to make the app go dark during navigation at night because I think many users find that to be a good default (it is similar to how Osmand, and Google do it).

rtsisyk commented 3 years ago

@PetbkA good research! Thanks!

it'll be clumsy schemes like Google or even OsmAnd with tons of options made just to satisfy everyone

I agree with you that we should make things simple. However, our current Dark theme is not really convenient for anything else except car navigation. See https://github.com/organicmaps/organicmaps/issues/688

The updated proposal is to have separate settings:

Map Theme:

  1. Automatic
  2. System theme
  3. Light theme <!-- default until dark theme is fixed, there is no way we can enable current Dark theme by default
  4. Dark theme

Navigation Theme:

  1. Automatic <!-- default on Android < 10
  2. System theme <!-- default on Android 10+
  3. Light theme
  4. Dark theme

Map Theme defaults can be synchronized with Navigation Theme defaults as soon as we fix #688.

@biodranik @vng @keksikex @ooprizrakoo any thoughts?

biodranik commented 3 years ago

There is also a popular feature request to have a dark mode UI with light mode map colors (maybe a bit less bright than normal).

So I think it can make sense to split dark app theme vs dark map style.

PetbkA commented 3 years ago

So I think it can make sense to split dark app theme vs dark map style.

👍 , we need a separate setting for app and map with Dark, Light, System and Auto options. Thus there won't be separate setting for map view and navigation, although I can't imagine who needs such strange splitting

TimMagee commented 3 years ago

@PetbkA While I won't go to my grave on this (I may switch back to OsmAnd but who cares, settings are built for the majority not for me), I only want the map in dark mode while I am navigating. I find the map dark mode annoying to look at and I never use it, unless I am navigating. When I am in navigation mode, I am not trying to browse the map. Instead I am looking at the road and my next turn and I don't want to be blinded by the normal mode.

In short, I need just "such a strange splitting".

What I don't understand is why someone would want dark menus but a light map. I mean, if the menus are bright, you don't get the battery or eye savings of night mode unless the map is also dark.

I feel that dark mode should cover the entire app (menus and map) but we should allow users to selectively enable it only during navigation because some users really hate darkmode unless they are driving at night and want the car to be as dark as possible.

biodranik commented 3 years ago

I assume that some users want to have a "light" map because it's simply easier to read than the current implementation of a dark map. E.g. if we seriously improve the map readability, then users won't need to have a dark interface + the "light" map.

But I also see that we should take into account all possible use-cases:

  1. Light/Dark map in the hand when not driving
  2. Light/Dark map in the car without CarPlay, in normal or Navigation mode
  3. Light/Dark map in the CarPlay in normal or Navigation mode

By properly implementing all these 6 scenarios we'll get the most comfortable to use product.

PetbkA commented 3 years ago

@TimMagee , I guess I finally understood your point.

Will my proposition be fine with settings not for map+navigation and app, but for map+app and navigation:

  1. App+Map Themе:
    1. Day;
    2. Night;
    3. Auto;
    4. As system;
  2. Navigation Theme:
    1. Day;
    2. Night;
    3. Auto;
    4. As system.

Theoretically this will be fine at least for both of us.

The scheme you offered in your first post would definitely be NOK for me 'cause it excludes Auto mode for the app, and I don't want to switch it manually 'cause System option will be equal to Dark in my case

n-peugnet commented 3 years ago

I have another proposition based on @TimMagee's first one. While I think the last one from @PetbkA is good and more flexible, the simplest settings IMO would be something like this:

General settings

Navigation

PetbkA commented 3 years ago

@n-peugnet , initially my vision of the best implementation was as one setting for map+app+navigation.

It turned out that there's different views that are opposite to it. The implementation to satisfy maximum of users is with two settings.

So when we're coming to two settings, I would prefer to give maximum flexibility. In your implementation I can't enable Auto mode for the app+map+navigation, so I'm standing for my last proposition where I can set app+map+nav to switch automatically while somebody can leave nav with dark theme but set app+map to some other option

n-peugnet commented 3 years ago

In your implementation I can't enable Auto mode for the app+map+navigation

@PetbkA , ah sorry, the theme setting was meant for (App + Map + Navigation), I just edited. So I agree that there are less possible combination with my solution than with yours but this one was meant to be possible.

The whole point of my idea is to limit the numbers of possibilities, it is opinionated but also simpler IMO. Indeed, it seems that the only reason why somebody would want a different theme throughout the app would be when using the navigation at night, where a dark theme is more appropriate. In every other situation, why would the navigation theme differ from the rest of the app's one?

TimMagee commented 3 years ago

The only options that @n-peugnet is leaving out are the options for 'dark', 'light', and 'system' themes in navigation being set separately from the app/map theme.

If somebody wants navigation to always be dark and never light, I would be surprised if they want the app to auto switch between day/night mode when not in navigation.

In essence, I don't see a reason to have a separate setting for navigation theme (except to force day/night mode even when app theme is something else).

If a user wants navigation to always be dark (even during the day) then I think it's reasonable to assume that almost all such users will also want the rest of the app dark.

PetbkA commented 3 years ago

@TimMagee

If a user wants navigation to always be dark (even during the day) then I think it's reasonable to assume that almost all such users will also want the rest of the app dark

But you don't want it, do you? You wrote:

I find the map dark mode annoying to look at and I never use it, unless I am navigating

Meanwhile I want the whole app (or app+map+nav) to switch from Dark to Light theme automatically (and this is not what System option will give, as I already wrote). And considering your comments, we just can't stay with one setting and will have to split it to app+map and nav

n-peugnet commented 3 years ago

I am sorry to be pushy but my solution would accommodate both of these configurations:

TimMagee commented 3 years ago

Sorry, @PetbkA, I should have clarified, I only use Dark Mode when both of the following conditions are true:

  1. It is at night
  2. I am currently navigating

So @n-peugent's suggestion works perfectly for me.

And, if I understand correctly, you always want auto day/night mode (even when not navigating). Once again, this suggestion allows for this.

4tegs commented 2 years ago

Using with Apple Carplay the map does display only in dark / night-mode. Regardless my settings. The settings work well in native mode only - but no influence on the carplay behaviour. Dark theme is not usable during daylight in carplay mode. No chance to recognize any roads.

lonelymyp commented 2 years ago

Using with Apple Carplay the map does display only in dark / night-mode. Regardless my settings.

Night mode is set by the car, depending on the light sensor or the headlights on or something else. Settings in the app are ignored. So I would like the "auto" mode in the application to not be overwritten by the mode from the car.

suhridkhan commented 2 years ago

Glad to see this being worked on. I use OM in my cars android head unit. At night beings set in auto mode, the screen totally blinds me.

biodranik commented 2 years ago

This issue is more complex because CarPlay users also expect that these modes should work.

pastk commented 2 years ago

BTW its possible to have a dark UI with a light map style now via a following "hack":

csidirop commented 2 years ago

BTW its possible to have a dark UI with a light map style now via a following "hack":

  • enable the night mode is OM settings
  • go back to the map screen and to the search
  • enter "?light" in the search field
  • go back to the map, enjoy! :)

Thats funny and nice, thanks. But it do not work great. It resets sometimes when reopening the app an the overlays (all POIs) are semi transparent:

Screenshot_20220707-143737_Organic_Maps.png

Btw. I would love to have this combination.

Akczht commented 2 years ago

text in current night mode is not readable 6D62B932-059F-43C2-9F68-A7C3CAAA197C idk how this went under the radar

Esmolante commented 1 year ago

I don't know if it has already been reported, but the automatic mode does not work when we are in the middle of a journey. For example, if it gets dark, OM does not switch to night mode, we have to exit the application and, when we enter it again, then it will have chosen it.

BTW, I also prefer to see the maps in the light theme even if we are in night mode.

xmha97 commented 1 year ago

When will the system default theme be added to the app? @biodranik @rtsisyk

Akczht commented 1 year ago

text in current night mode is not readable 6D62B932-059F-43C2-9F68-A7C3CAAA197C idk how this went under the radar

In the latest release of Organic Maps on iOS Version: ⁦2022.12.18-9⁩ , the issue that I had earlier was fixed , but just on the main page , actually it’s everywhere . 64E82F14-65BC-4C92-9B63-92A49C477D74

biodranik commented 1 year ago

@Akczht thanks for checking it, it's actually about #4009 and #4035, please let's continue there.

toas-koas commented 1 year ago

Is it possible to switch to dark mode when I'm in a tunnel and switch back when I'm out?

biodranik commented 1 year ago

It depends on your car's sensors. CarPlay should work.

toas-koas commented 1 year ago

I dont speak from CarPlay. I mean the App itself

biodranik commented 1 year ago

In theory that may be possible, because the map already has the tunnel data in it. Can you please create a separate issue for that?

louwers commented 1 year ago

The current behavior (where navigation switches to night mode) is how G Maps works.

Apple Maps shows a dark map when system dark mode is active, so maybe using that as default makes most sense on iOS.

biodranik commented 1 year ago

It is not a big problem to switch to dark mode as Apple does. The issue is that our current dark map style was not designed for daylight use. It was designed to be used at night, in the car. So people who try to use it during the day won't see much on the map due to a low contrast.

FabulousSoldier commented 1 year ago

On my iPhone the map is constantly on dark mode (or night mode?) in CarPlay. Regardless if iOS is set to dark or light mode or if night mode in the app is deactivated.

CarPlay is unusable at day as the map is way to dark. Any way to fix this?

biodranik commented 1 year ago

@FabulousSoldier yes, check your CarPlay settings (NOT Organic Maps settings) when the device is connected, and select "auto" instead of "always dark".

FabulousSoldier commented 1 year ago

@FabulousSoldier yes, check your CarPlay settings (NOT Organic Maps settings) when the device is connected, and select "auto" instead of "always dark".

Thank you that worked!

peternrdstrm commented 1 year ago

My only issue is that dark mode makes the map dark too. I wish I could do it just for the UI

biodranik commented 1 year ago

Automatic dark mode in tunnel, like Apple CarPlay does: #5828

flares01 commented 1 year ago

I just wanted to point out that “auto” Night Mode currently only works for navigating a car route, not for pedestrians and cyclists.

I’m commuting and travelling by bicycle and therefore use navigation mode with bicycle routes, not car routes.

Please keep in mind that many people travel by foot or bike after dark and therefore also need a navigation mode that works well with these forms of transport in these circumstances.

Especially during rainy nights riding in traffic, a light navigation view is basically unusable due to glare.

biodranik commented 1 year ago

It should be easy to fix. There's likely an if (car routing) check somewhere in the code that can be removed.

jumelles commented 11 months ago

@FabulousSoldier yes, check your CarPlay settings (NOT Organic Maps settings) when the device is connected, and select "auto" instead of "always dark".

Unfortunately this is an imperfect workaround and not a solution. Users shouldn't have to change the look of the entire CarPlay UI in order to get Organic Maps to display as desired. Neither Apple Maps nor Google Maps show a dark map while CarPlay is in dark mode, only Organic Maps does:

tWY7XGk xD7VSUs VzllBKf

Apple also seems to expect that people want light maps with dark mode, since once you select CarPlay dark mode, another entire option appears to "Always Show Dark Maps", implying light maps should be the default otherwise:

CFhoOdI QMup41M