Skip to content
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

Map card, new contrasted design: the "the dark_mode" option does not work #13333

Closed
3 tasks done
ildar170975 opened this issue Aug 3, 2022 · 24 comments
Closed
3 tasks done

Comments

@ildar170975
Copy link
Contributor

ildar170975 commented Aug 3, 2022

Checklist

  • I have updated to the latest available Home Assistant version.
  • I have cleared the cache of my browser.
  • I have tried a different browser to see if it is related to my browser.

Describe the issue you are experiencing

On 2022.8 a new "more contrasted" design was provided for Map card.
The dark_mode option now works not as it did earlier.

Here is how it works now:

Light default theme:

type: vertical-stack
cards:
  - type: map
    entities:
      - person.ildar
  - type: map
    entities:
      - person.ildar
    dark_mode: false

image


    ...
    dark_mode: true

The bottom map is dark (why?).
image


Dark default theme:

    ...
    dark_mode: false

The upper map is dark (why?).
The bottom map is less dark (why?).
image


    ...
    dark_mode: true

The upper map is dark (why?).
image

Describe the behavior you expected

If the dark_mode is true then:

  • if theme is in a dark mode -> map is dark
  • otherwise -> map is light

If the dark_mode is false or not specified then:

  • map is light

Steps to reproduce the issue

As described above.

What version of Home Assistant Core has the issue?

2022.8.0

What was the last working version of Home Assistant Core?

2022.7.7

In which browser are you experiencing the issue with?

Chrome 103.0.5060.134

Which operating system are you using to run this browser?

Win10x64

State of relevant entities

No response

Problem-relevant frontend configuration

No response

Javascript errors shown in your browser console/inspector

No response

Additional information

No response

@Kertz1954
Copy link

Another explanation.

If the system theme is set to Dark as opposed to Auto or Light, the Map Card, Dark Mode ? toggle switch has no effect on the map theme. It remains in Dark mode theme.

If the system theme is set to Light, then the Dark Mode ? toggle switch does change the map theme between Light or Dark.

New Map Card

@ildar170975
Copy link
Contributor Author

Another explanation.

Is it your explanation of THE CURRENT implementation or is it your proposed implementation?

If 1st:
then "to Dark as opposed to Auto or Light, the Map Card, Dark Mode ? toggle switch has no effect" is WRONG - seen above, the "default dark theme, dark_mode: false" case.

@Kertz1954
Copy link

This is the current method of operation which is incorrect. Dark mode is selected as main theme.
Map Card as shown is showing Dark Mode without the toggle being set.

@ildar170975
Copy link
Contributor Author

Map Card as shown is showing Dark Mode without the toggle being set.

Note that in dark theme the un-toggled "dark_mode" makes the map more contrasted.

@Kertz1954
Copy link

Kertz1954 commented Aug 3, 2022

Yes, but that is not the correct function of the toggle switch. It's being mis-used.

@ildar170975
Copy link
Contributor Author

I described the expected behaviour in the 1st post.

@Kertz1954
Copy link

I suggest you re-read your 1st post. It's not at all clear what you are trying to achieve from it.

@zsarnett
Copy link
Contributor

zsarnett commented Aug 3, 2022

The dark mode toggle only works if you are in light mode and want to have the map dark. No other functionality is offered.

@Kertz1954
Copy link

Then the toggle should be removed if you are in dark mode.

@ildar170975
Copy link
Contributor Author

ildar170975 commented Aug 3, 2022

The dark mode toggle only works if you are in light mode and want to have the map dark

This was the previous functionality which does not work now:
If the dark_mode is true then:
-- if theme is in a dark mode -> map is dark
-- otherwise -> map is light
If the dark_mode is false or not specified then:
-- map is light

Isn't it?
It WAS working this way. Probably the purpose of this "dark_mode" option was changed on 2022.8.


Update:
Check in 2022.7.4:

Strange, the logic here is:
if "dark_mode" = undefined
-- color = color of theme
if "dark_mode" = false
-- color = light (in any theme)
if "dark_mode" = true
-- color = dark (in any theme)

Really strange.
According to docs, default value = false. And this is not confirmed by tests below.
I guess that some time ago the logic was different and was like I described in the 1st post (repeated in the beginning of this post).

Results of tests in 2022.7.4 are below:

type: vertical-stack
cards:
  - type: map
    entities:
      - person.ildar
  - type: map
    entities:
      - person.ildar
    dark_mode: false

image


    dark_mode: true

image


    dark_mode: false

image


    dark_mode: true

image

@Kertz1954
Copy link

Kertz1954 commented Aug 3, 2022

As a programmer with 48 years of experience, the toggle should not have been changed. The whole purpose of this update was to first change the Light theme to a more colorful presentation which has been acheived by updating the Leaflet OpenStreetMap.
The Leaflet Dark theme ( CARTO.com Dark) still presented a problem as it is really dark, but a workaround was implemented to make it more readable.
A user should still have the option to decide which theme they wish to see in the map, regardless of the base OS theme.

@zsarnett
Copy link
Contributor

zsarnett commented Aug 4, 2022

This is a Feature Request not an issue.

@ildar170975
Copy link
Contributor Author

What exactly is a FR?

  1. See a difference between 2022.8 & 2022.7.4:
    old:
    image
    new:
    image

The "dark theme / dark_mode=false" is DIFFERENT.
Should it be?

  1. According to the docs:
    image
    But in both the "2022.7.4" & "2022.8" versions "dark_mode: default" is not the same as "dark_mode: false".

  2. As for my thoughts "how it was working long time ago":
    I may be wrong. Do not have an old HA version to clarify how it was working long time ago.

But even when comparing 2022.7.4 & 2022.8, what I see is:
-- the "dark theme / dark_mode=false" case is different;
-- in both versions "dark_mode: default" is not the same as "dark_mode: false" - which is specified in the docs.

@github-actions
Copy link

github-actions bot commented Nov 2, 2022

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label Nov 2, 2022
@ildar170975
Copy link
Contributor Author

up

@github-actions github-actions bot removed the stale label Nov 2, 2022
@arduiacob
Copy link

it should be possible to choose a light theme for the map, when the main theme is dark

@mikulik86
Copy link

up

@github-actions
Copy link

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label Aug 19, 2023
@ildar170975
Copy link
Contributor Author

up

@github-actions github-actions bot removed the stale label Aug 19, 2023
Copy link

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label Nov 17, 2023
@ildar170975
Copy link
Contributor Author

up

@532910
Copy link

532910 commented Feb 18, 2024

It's impossible to have white map with dark app interface. This is a bug, that should be fixed. Recent activity is not a reason to ignore it, please disable auto-closing.

@nickelliott
Copy link

It makes sense that, if a user doesn't define a dark_mode setting, the map card follows the theme setting, but if the user specifically specifies dark_mode: false it surely makes sense to respect that? Why not do so?

@karwosts
Copy link
Contributor

Fixed by #20541

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

No branches or pull requests

8 participants