Re: [openstreetmap/openstreetmap-website] Dark Mode for maps (Issue #5328)

2024-11-24 Thread pkrasicki via rails-dev
@Wilhem275
>It's not a fear, it's an absolute certainty that the output will be a mess 😄
Exactly what's happening here:

I messed something up back then and couldn't be bothered to edit the screenshot 
afterwards, since it was just about showing the new options. Here is what the 
preview actually looks like with filter `invert(1) hue-rotate(180deg)`:

![osm-layers](https://github.com/user-attachments/assets/ad217bf6-de82-417b-8a07-2ce7a3fce8ca)

There are only a few layers and it's easy to make filters. And no, we don't 
need separate filters for each zoom level, we don't even need a different 
filter for each layer, because some filters will work well for more than one 
layer.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/5328#issuecomment-2496066507
You are receiving this because you are subscribed to this thread.

Message ID: 
___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


Re: [openstreetmap/openstreetmap-website] Dark Mode for maps (Issue #5328)

2024-11-24 Thread pkrasicki via rails-dev
> I made a little utility to try out filter combinations more easily: 
> https://codepen.io/hlfan/full/GRVVGog For convenient editing in the dev 
> tools, the outputted filter is stored in a custom property and the filter is 
> also applied to the SVG that holds the filters.

@hlfan This is really good! Unfortunately it doesn't work for me in Firefox 
128.4 ESR, but I just tested it in Chromium and it works really well. Is there 
a way to test different layers?



-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/5328#issuecomment-2496199555
You are receiving this because you are subscribed to this thread.

Message ID: 
___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


Re: [openstreetmap/openstreetmap-website] Dark Mode for maps (Issue #5328)

2024-11-24 Thread pkrasicki via rails-dev
>Something to remember if SVG filters will be used: Firefox ignores filter 
>definitions if they are behind a display: none.

@hlfan Looks like it's fixed now.

>Do you mean layering filters or changing the Map Tile URL under the heading 
>Map Tile URL?

I wanted to test different layers like Cycle Map, Transport Map, Tracestrack. 
Can I do that with a URL change somehow?

>This one: enable my rotation filter ignoring problems with hillshading?

@AntonKhorev You were the first person to point out that this a problem. So it 
took years to get any feedback. Now we have @hlfan's filters that we can use 
for the layers that have hillshading.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/5328#issuecomment-2496486871
You are receiving this because you are subscribed to this thread.

Message ID: 
___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


Re: [openstreetmap/openstreetmap-website] Dark Mode for maps (Issue #5328)

2024-11-19 Thread pkrasicki via rails-dev
>Until vector maps are implemented, any tampering with the map via CSS filters 
>should be avoided.

@mxdanger But why? @hlfan has shown us a few solutions that might work. If you 
see a specific problem with any of them, point it out and we will see if it can 
be fixed. I get that people are scared that we will mess up the map. It's 
normal for users to be afraid of UI changes even when they are good for them 
long term. But just saying that it isn't gonna work isn't productive.

@omcnoe Or we can go with the option 4b - display dark tiles when available, 
use filters when not. Currently no layer has dark tiles yet, so all will have a 
filter.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/5328#issuecomment-2486051821
You are receiving this because you are subscribed to this thread.

Message ID: 
___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


Re: [openstreetmap/openstreetmap-website] Dark Mode for maps (Issue #5328)

2024-11-20 Thread pkrasicki via rails-dev
>It's also not helpful to dismiss other opinions with "people don't know how 
>things work, so they're scared and afraid of change".
I explained some technical reasons why messing with the maps appearance means 
tampering with their message. It's measurable in numbers, don't dismiss it as 
uninformed fearmongering.

@Wilhem275 If your opinion isn't just based on fear, then you should have no 
problem pointing out what specific issues you've noticed with the proposed 
solutions. I don't mean to criticize you, though. It's common for users to be 
against significant UI changes. I'm just saying that we shouldn't let that fear 
stop us from adding new features.

>@pkrasicki The "hacky" way of using filters to override the existing tile map 
>to get the dark mode map is not good long term.

@mxdanger No one here is proposing it as a long term solution. But any changes 
made to the map (even if cartographers crate dark tiles) will be temporarily 
annoying to the users, because they will have to get used to the new thing. 
This is normal. The only thing we can do about that here, is adding a setting 
to let users disable the dark map and I included that in my UI proposal.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/5328#issuecomment-2489436075
You are receiving this because you are subscribed to this thread.

Message ID: 
___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


Re: [openstreetmap/openstreetmap-website] Dark Mode for maps (Issue #5328)

2024-11-18 Thread pkrasicki via rails-dev
>from what I've been able to discern by fiddling around, fine-tuning away the 
>old-photo-like yellowish look would take more effort than it's worth.

@hlfan Just out of curiosity, can we apply a CSS filter on top to fix that? 
:laughing:

>Yes, kind of kidding, but depending on where the preferences will be put there 
>might be more than enough space anyway.

It's best to focus on having good defaults, so that users don't have to worry 
about changing anything, but yeah this could be possible. If devs want to give 
more control to the users, they could add those options.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/5328#issuecomment-2483316049
You are receiving this because you are subscribed to this thread.

Message ID: 
___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


Re: [openstreetmap/openstreetmap-website] Dark Mode for maps (Issue #5328)

2024-11-16 Thread pkrasicki via rails-dev
>For years nobody could produce viable pull requests implementing dark mode. 
>https://github.com/openstreetmap/openstreetmap-website/pull/2532 and 
>https://github.com/openstreetmap/openstreetmap-website/pull/3028 were 
>overriding a ton of css, justifying it with arguments like osm-website doesn't 
>change much therefore we can afford it 
>https://github.com/openstreetmap/openstreetmap-website/pull/2532#issuecomment-585434930.

They were viable and it was probably the only way without migrating to 
Bootstrap 5. That's how the site was written, it's nobody's fault.

>Why would anyone use your invert+rotate filter you've been promoting in 
>https://github.com/openstreetmap/openstreetmap-website/issues/2332 if the 
>entire site doesn't have a dark mode?

I've never proposed to have dark map without dark theme.

>Tracestrack on low zooms doesn't look good even we ignore shadows. The colors 
>are completely off.

Can we tweak the colors for this particular layer?

>You won't be able to restore shadows by slightly tweaking, unless you mean 
>stop doing invert+rotate.

That's valid criticism and I have no solution to this. Is it a deal breaker (I 
genuinely don't know)?

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/5328#issuecomment-2480692337
You are receiving this because you are subscribed to this thread.

Message ID: 
___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


Re: [openstreetmap/openstreetmap-website] Dark Mode for maps (Issue #5328)

2024-11-16 Thread pkrasicki via rails-dev
> Just deploy it, we’ll see if many people complain 😅

Since most Firefox users browse modern websites just fine, I suspect not many. 
But [here's a UI 
proposal](https://github.com/openstreetmap/openstreetmap-website/issues/5324#issuecomment-2480755496)
 that would let you quickly disable the filters.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/5328#issuecomment-2480760276
You are receiving this because you are subscribed to this thread.

Message ID: 
___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


Re: [openstreetmap/openstreetmap-website] Dark Mode for maps (Issue #5328)

2024-11-16 Thread pkrasicki via rails-dev
> @pkrasicki And you can drag the map smoothly? I have a huge increase in input 
> lag when dragging the dark map.

It's smooth for me on a 10 years old CPU running Firefox 128.4.0esr. Sometimes 
it's laggy when I have the dev tools open, but that happens regardless if the 
filter is enabled or not. Maybe check your CPU usage while doing this, does it 
increase a lot?

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/5328#issuecomment-2480628943
You are receiving this because you are subscribed to this thread.

Message ID: 
___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


Re: [openstreetmap/openstreetmap-website] Add light/dark mode preference (Issue #5324)

2024-11-16 Thread pkrasicki via rails-dev
Here's a simple UI proposal:
![osm-theme-settings](https://github.com/user-attachments/assets/19cd3bdd-45cd-407a-9b83-84224fed1368)

Dark theme toggle depends on system settings (just like now), but user can 
override it by pressing the toggle button in top left corner. The setting will 
be remembered in local storage. The map theme is set to Auto by default, which 
means it follows website's theme. But users can override that by selecting 
Light or Dark.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/5324#issuecomment-2480755496
You are receiving this because you are subscribed to this thread.

Message ID: 
___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


Re: [openstreetmap/openstreetmap-website] Dark Mode for maps (Issue #5328)

2024-11-16 Thread pkrasicki via rails-dev
>Tracestrack on low zooms doesn't look good even we ignore shadows. The colors 
>are completely off.

>But (as previously mentioned) Option 4 for Tracestrack has the same Issues.

@AntonKhorev @hlfan Would something like this be a step in the right direction? 
This just for the Tracestrack layer:

![osm-tracestrack-filter](https://github.com/user-attachments/assets/d36f6c8e-27e7-4189-b58c-afd038bfaa84)

`filter: brightness(0.55) contrast(1.75);`

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/5328#issuecomment-2480806892
You are receiving this because you are subscribed to this thread.

Message ID: 
___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


Re: [openstreetmap/openstreetmap-website] Dark Mode for maps (Issue #5328)

2024-11-16 Thread pkrasicki via rails-dev
> I'd rank the Options 4 > 1 > 3 > 2 (current), since these performance issues 
> came up.

I'm sorry, but I think it's an exaggeration to call it that. There aren't 
performance issues, it's a bug in Firefox that affects an unknown amount of 
users. It's unfortunate that some people experience it, but I see no reason to 
think that it's super popular.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/5328#issuecomment-2480738127
You are receiving this because you are subscribed to this thread.

Message ID: 
___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


Re: [openstreetmap/openstreetmap-website] Dark Mode for maps (Issue #5328)

2024-11-16 Thread pkrasicki via rails-dev
Maybe you can see it and I can't, because of your monitor's higher refresh rate 
(I'm not sure about your laptop, though) or because I'm testing on 1080p. 
Thanks for finding those bug reports. We could include an option to disable the 
filter for the people affected by this bug (so allow them to have a bright map).

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/5328#issuecomment-2480647098
You are receiving this because you are subscribed to this thread.

Message ID: 
___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


Re: [openstreetmap/openstreetmap-website] Dark Mode for maps (Issue #5328)

2024-11-15 Thread pkrasicki via rails-dev
Of course dark mode isn't about contrast. It's about brightness. People either 
don't want to stare at a bright screen all day/night or they want to conserve 
battery on mobile. That's why we need a dark theme and a dark map and why other 
map applications have them. That's why option 1 is not a solution as it 
completely ignores the problem. This isn't an image viewer, we can display the 
information however we want.

When you're talking about inverting the colors, I hope you don't mean literally 
just that? We've already made at least 2 better proposals 4 years ago:
https://github.com/openstreetmap/openstreetmap-website/issues/2332#issuecomment-727266980
![image](https://github.com/user-attachments/assets/61c9e6eb-4c9d-4596-998b-b890a7516471)

https://github.com/openstreetmap/openstreetmap-website/issues/2332#issuecomment-867821340
![image](https://github.com/user-attachments/assets/9c793b71-73e2-433e-8eb1-44c85640e2e5)

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/5328#issuecomment-2480196749
You are receiving this because you are subscribed to this thread.

Message ID: 
___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


Re: [openstreetmap/openstreetmap-website] Dark Mode for maps (Issue #5328)

2024-11-15 Thread pkrasicki via rails-dev
So why have dark mode if the main element of the app isn't dark? If you want to 
have an option to configure this, I can understand that, it might be a good 
idea. But having a dark map in dark mode seems like a sane default for a **map 
viewer** application.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/5328#issuecomment-2480246243
You are receiving this because you are subscribed to this thread.

Message ID: 
___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


Re: [openstreetmap/openstreetmap-website] Use CSS filter instead of dimming tiles (PR #5325)

2024-11-15 Thread pkrasicki via rails-dev
@pkrasicki commented on this pull request.



> @@ -504,7 +504,13 @@ body.small-nav {
 @include color-mode(dark) {
   .leaflet-tile-container,
   .mapkey-table-entry td:first-child > * {
-filter: brightness(.8);
+filter: invert(100%) hue-rotate(180deg) brightness(95%) contrast(90%);

@Dr-Mx My bad, I worded my comment poorly and I've edited it since then. I 
meant to say that you should give us more information about the problems you've 
encountered. Otherwise it would be hard to make an informed decision. 
Performance is important, so it's good that you mentioned this, but how old 
were those smartphones?

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5325#discussion_r1844188669
You are receiving this because you are subscribed to this thread.

Message ID: 
___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


Re: [openstreetmap/openstreetmap-website] Use CSS filter instead of dimming tiles (PR #5325)

2024-11-15 Thread pkrasicki via rails-dev
1. Have a problem, i.e. lack of dark mode.
2. The proper solution is difficult.
3. People propose temporary workarounds and submit PRs to fix the problem.
4. Reject their PRs and ignore their proposals, listing an infinite amount of 
side problems that would need to be considered first.
5. The discussion continues for years while users keep complaining about the 
main issue.
6. Finally implement something that isn't perfect either and ignores people's 
suggestions.
7. People complain.
8. Close the GitHub issue, but open new ones that talk about side problems and 
ignore the specific proposals people have made over the years.
9. People complain about that, so tell them they're being dismissive of the 
depth of the problem.
10. Continue discussing side problems while being as vague as possible, so that 
you can keep going in circles (bikeshedding).
11. Dismiss any criticism of this process while claiming that you welcome 
anyone to get involved.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5325#issuecomment-2480149503
You are receiving this because you are subscribed to this thread.

Message ID: 
___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


Re: [openstreetmap/openstreetmap-website] Dark Mode (#2332)

2024-11-14 Thread pkrasicki via rails-dev
@kcne

>Would you know which class should be targeted to apply this effect to the map?

I'm not using the latest version of Leaflet, so I don't know if anything has 
changed, but back then I did this:

JS code:
```js
const mapElementId = "map";
map = L.map(mapElementId,
{
attributionControl: false,
zoomControl: false
});

L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
{
attribution: '© https://www.openstreetmap.org/copyright";>OpenStreetMap contributors',
className: "map-tiles"
}).addTo(map);
```

CSS:
```css
/* the map container itself */
#map
{
background: #1f1f1f !important; /* when !important is added this will 
be the color of map tiles while they are loading */
}

.map-tiles
{
filter: brightness(0.6) invert(1) contrast(3) hue-rotate(200deg) 
saturate(0.3) brightness(0.7); /* dark map */
}
```

Another thing you might want to do is changing the color of map controls (you 
can check my app's code for that) and whatever shapes you draw on the map, you 
probably need to change their colors too.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/2332#issuecomment-2477280730
You are receiving this because you are subscribed to this thread.

Message ID: 
___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


Re: [openstreetmap/openstreetmap-website] Use CSS filter instead of dimming tiles (PR #5325)

2024-11-15 Thread pkrasicki via rails-dev
@pkrasicki commented on this pull request.



> @@ -504,7 +504,13 @@ body.small-nav {
 @include color-mode(dark) {
   .leaflet-tile-container,
   .mapkey-table-entry td:first-child > * {
-filter: brightness(.8);
+filter: invert(100%) hue-rotate(180deg) brightness(95%) contrast(90%);

But is it really a big deal? How old would the hardware have to be for this to 
visibly impact performance? I have no issues with my even longer filter on a 10 
years old desktop CPU. So unless you have a specific reason to worry about 
this, I would ignore that comment.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5325#discussion_r1844154279
You are receiving this because you are subscribed to this thread.

Message ID: 
___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


Re: [openstreetmap/openstreetmap-website] Dark Mode (#2332)

2024-11-15 Thread pkrasicki via rails-dev
>This issue has always struggled to be actionable, since there are at least 3 
>different topics to consider

It failed to be actionable, because developers have rejected PRs and 
suggestions from contributors. Now they've completely ignored our proposed 
solution for a dark map and went with something else that's difficult to read. 
We've been talking about the map issue for 4 years. Now you're closing the 
issue and we're supposed to start over? The solution is literally just a few 
lines of CSS that's already been tested by me and others.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/2332#issuecomment-2479417232
You are receiving this because you are subscribed to this thread.

Message ID: 
___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


Re: [openstreetmap/openstreetmap-website] Use CSS filter instead of dimming tiles (PR #5325)

2024-11-15 Thread pkrasicki via rails-dev
Alternative proposal:
![image](https://github.com/user-attachments/assets/daf6c2e9-42a8-4253-8fae-7b2a38cc3e8d)

`filter: brightness(0.6) invert(1) contrast(3) hue-rotate(200deg) saturate(0.3) 
brightness(0.7);`

You can test it here: https://issviewer.com
Full source code: https://github.com/pkrasicki/issviewer

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5325#issuecomment-2479430326
You are receiving this because you are subscribed to this thread.

Message ID: 
___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


Re: [openstreetmap/openstreetmap-website] Dark Mode (#2332)

2024-11-15 Thread pkrasicki via rails-dev
In that issue you're not talking about our specific ideas for filters, you 
didn't show screenshots or said how to test them. You are just discussing 
different approaches. Option 1 is do nothing. Option 2 is your workaround that 
you've just implemented. Option 3 is our workaround. Option 4 is the proper 
solution (or at least that's how I see it), which is great, but if we could 
easily do that, we wouldn't need those temporary workarounds.

Some of your criticism of our workaround is that `This can lead to perceptual 
contrast problems` or `Can have unexpected effects for shadows (e.g. 
hillshading or building shadows)`. You could show us those problems in practice 
with a specific filter so that we can try and improve it. I know those filters 
aren't perfect, but right now it feels like our ideas were almost completely 
ignored.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/2332#issuecomment-2479604580
You are receiving this because you are subscribed to this thread.

Message ID: 
___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


Re: [openstreetmap/openstreetmap-website] Dark Mode for maps (Issue #5328)

2024-11-16 Thread pkrasicki via rails-dev
>Couldn't the dark mode have waited for the release of the vector.osm.org tiles?

@hlfan There is nothing wrong with incremental progress. The issue here is that 
the devs have been ignoring our dark map discussion for years and did something 
without talking to the community, which turned out to be not as good.

>Do we need different filters for different layers?

@AntonKhorev That is a good question and it's something we should find out 
through experimenting. It's easy to do, just change that one line of CSS code 
and do some testing.

>For example, we got here believers in inverse+rotate. Why do they think that 
>it's the best option?

I don't think it's the best option, but it's usable. Option 4 would be the 
best. My proposal is just an easy to implement temporary workaround that could 
be used until we get something better.

>Even if you convince them that it doesn't work for all layers, they'll be able 
>to say that most of people use mostly the standard layer, therefore it makes 
>sense to pick the best filter for this case. This can be resolved by having 
>per-layer filter settings. That also makes sense if one of the options is an 
>alternative set of tiles, not every layer is going to have that.

There aren't that many layers. It's possible that the filter will be good for a 
few layers and for the rest we can use a different, slightly tweaked version of 
the filter that works best for them. No extra user settings needed.

@Nekzuris

>as well as performance issues

I'm not aware of any performance issues with CSS filter. If you're having them, 
please submit a bug report with your exact specs and system info. We can 
measure performance if needed.

>maybe a more complex filter can work while waiting for vector tiles or simply 
>keep the same as light mode for now.

That's the goal. To find the right filter that will give us something usable 
until option 4 is implemented. But we can't do that without discussing those 
specific filters and testing them. It will probably never be perfect, but 
hopefully together we can come up with something good enough. I think we might 
be pretty close to that already.




-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/5328#issuecomment-2480610264
You are receiving this because you are subscribed to this thread.

Message ID: 
___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


Re: [openstreetmap/openstreetmap-website] Dark Mode for maps (Issue #5328)

2024-11-16 Thread pkrasicki via rails-dev
> Have you tried a more complex filter like `brightness(0.6) invert(1) 
> contrast(3) hue-rotate(200deg) saturate(0.3) brightness(0.7)` on Firefox?

@Nekzuris Yes, you can test that specific filter [on this 
site](https://issviewer.com).

Here is how to easily test different filters yourself.
1. Go to [openstreetmap.org](https://openstreetmap.org).
2. Press F12 to open dev tools.
3. In the "search HTML" bar paste this and hit enter: `.leaflet-tile-container 
.leaflet-tile`. If you don't see the search bar, press CTRL+F.
4. In the styles section of the dev tools on the right side, scroll down until 
you see a filter attribute.
5. Click on the value and replace it by pasting one of ours:
Filter 1: `brightness(0.6) invert(1) contrast(3) hue-rotate(200deg) 
saturate(0.3) brightness(0.7);`
Filter 2: `invert(100%) hue-rotate(180deg) brightness(95%) 
contrast(90%);`
6. You can test different layers if you'd like.

![osm-dev-tools-filter](https://github.com/user-attachments/assets/ee1b39d4-b2cb-4092-b121-94eb3385f4eb)

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/5328#issuecomment-2480620937
You are receiving this because you are subscribed to this thread.

Message ID: 
___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


Re: [openstreetmap/openstreetmap-website] Dark Mode for maps (Issue #5328)

2024-11-24 Thread pkrasicki via rails-dev
In 6 months no one has noticed anything wrong with it or realized that a better 
proposal already exists? Crazy.

At this rate it will probably take us 6 more months to get that filter removed 
and 6 years to discuss the 2 filters we're proposing.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/5328#issuecomment-2496179241
You are receiving this because you are subscribed to this thread.

Message ID: 
___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


Re: [openstreetmap/openstreetmap-website] Dark Mode for maps (Issue #5328)

2024-12-19 Thread pkrasicki via rails-dev
No offense, but letting someone else decide is such a lazy solution. You are 
the developers, this is your app. So why can't you decide? Do you not have the 
time/energy or what is the reason?

>It is the choice of the cartographers.

Why? Why can't the users change the way the map is displayed in their browser? 
Why are we letting cartographers run our lives? We shall end their tyranny once 
and for all

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/5328#issuecomment-265894
You are receiving this because you are subscribed to this thread.

Message ID: 
___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


Re: [openstreetmap/openstreetmap-website] Dark Mode for maps (Issue #5328)

2024-11-21 Thread pkrasicki via rails-dev
>We can then revisit whether people want even further micro-control like 
>choosing their own filters (to override the decisions of the cartographers).

@gravitystorm So it seems that you're not against having filters. You're just 
against applying them by default (even if it can be turned off). In that case, 
why not implement [my UI 
proposal](https://github.com/openstreetmap/openstreetmap-website/issues/5324#issuecomment-2480755496),
 but have the map always by light by default (in every theme). And those who 
want a filter, they can enable it with 2 clicks. Of course, we would still need 
to discuss which filters to choose and test them. But isn't this way simpler 
than what you're proposing? We can even mark this as a beta feature, if you 
want.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/5328#issuecomment-2491551439
You are receiving this because you are subscribed to this thread.

Message ID: 
___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


Re: [openstreetmap/openstreetmap-website] Dark Mode for maps (Issue #5328)

2024-11-17 Thread pkrasicki via rails-dev
@hlfan Great work! I didn't even know there was a feature like that. And 
recently I've even thought of using WebGL shaders for a more advanced filter 
(there is a Leaflet plugin for that). Anyway, which of the options you've 
tested you think would be best? Gamma is already a big improvement over the 
current situation. Invert still seems better, but even with more control that 
we got here it might not be usable for all layers.

@Wilhem275 I'm not a map expert, but I don't think a map is like a photo at 
all. It's not satellite images, it's just a bunch of data that we want to 
display to the user in the most intuitive way possible. As long at the 
information is still visible and easy to understand, changing the colors **a 
little bit** isn't a big deal. Obviously nothing should be done without testing 
and discussion.

>Because the main purpouse of dark modes is not to alter colours altogether, 
>it's to avoid large fields of pure bright white. As you'll find in Wikipedia 
>or default Gmail's backgrounds (or Github, now that I see it).

And in order to do that, you have to alter colors. You change the background 
color and then you change other colors too, because colors that work well on a 
white background usually don't work well on a dark background. Developing a 
dark theme requires changing colors.

>This was done so well that, I think, a toggle switch is NOT needed at all. I 
>don't think you'll find any dark mode user wishing to keep OSM non-map 
>elements white.

There might be people who want to enjoy dark/light theme without changing their 
system settings.

>Also, @pkrasicki examples with filtering are actually quite good for night 
>reading, but again I wouldn't like to have them forced on my permanently 
>dark-set browser. I understand they operate at site level, but is there a way 
>to channel them as a layer choice instead of forcing them upon any layer?

[This 
proposal](https://github.com/openstreetmap/openstreetmap-website/issues/5324#issuecomment-2480755496)
 would let you easily disable the filters by changing the map theme to light.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/5328#issuecomment-2481319542
You are receiving this because you are subscribed to this thread.

Message ID: 
___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


Re: [openstreetmap/openstreetmap-website] Dark Mode for maps (Issue #5328)

2024-11-23 Thread pkrasicki via rails-dev
>The main issue I see is that your proposal adds a 'theme' to a layer.

It adds a theme to the whole map. The user can turn it on or off, but they have 
no control over specific layers.

>A 'dark mode' (as this issue calls it) is from a user perspective a layer.

No, this is what I'm proposing:

![image](https://github.com/user-attachments/assets/d5149900-8e82-4ff1-970b-88a1f5396a2b)

>A layer has exectly one set of colors today. We can't rush making a second set 
>for each. Which is exactly what would be needed if a layer is to have a 
>dark/light mode toggle.

We can easily to change that with 
[filters](https://github.com/openstreetmap/openstreetmap-website/issues/5328#issuecomment-2481193144).
 There is no need to rush anything, we can test them for as long as we need. 
They don't have to be enabled by default if people really don't want to and we 
can even mark it as a beta feature if people want.

>The default map layer has practically no large areas of light. Most dark theme 
>users will not find a need to change.

Compare it to other map applications that have dark theme and you will see that 
it's too bright. Here is GNOME Maps for example:
![gnome-maps-dark](https://github.com/user-attachments/assets/3ef56089-d846-4702-8017-bae7baf0989b)

OSM in light theme for comparison:
![osm-light](https://github.com/user-attachments/assets/f176a7e1-c12b-47e1-b762-5abd1a3e3723)

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/5328#issuecomment-2495529740
You are receiving this because you are subscribed to this thread.

Message ID: 
___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev