Re: [openstreetmap/openstreetmap-website] OAuth2 login flow returns error 500 (Issue #5400)

2024-12-16 Thread Tom Hughes via rails-dev
Creating new OAuth logins requires creating records in the oauth tables in the 
database. Existing tokens should work fine I think but you won't be able to 
create new ones.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/5400#issuecomment-2545032747
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


[openstreetmap/openstreetmap-website] Update nominatim terms (PR #5401)

2024-12-16 Thread Sarah Hoffmann via rails-dev
### Description

I'm planning to introduce three new categories for Nominatim classes: lock, 
water and information. These are the main terms for it.

### How has this been tested?

Only made sure the CI runs successfully.

You can view, comment on, or merge this pull request online at:

  https://github.com/openstreetmap/openstreetmap-website/pull/5401

-- Commit Summary --

  * add lock, information and water classes for nominatim terms

-- File Changes --

M config/locales/en.yml (21)

-- Patch Links --

https://github.com/openstreetmap/openstreetmap-website/pull/5401.patch
https://github.com/openstreetmap/openstreetmap-website/pull/5401.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5401
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


[openstreetmap/openstreetmap-website] Add date and url settings for offline message (PR #5403)

2024-12-16 Thread Anton Khorev via rails-dev
The current message doesn't say much about how long the api/db is expected 
to stay down.

on map layout:
![image](https://github.com/user-attachments/assets/47f12f55-f483-4d8e-9cf7-3cee3a77663b)

on site layout:
![image](https://github.com/user-attachments/assets/3180b074-4ff5-4189-bd99-79d9e13647b9)

You can view, comment on, or merge this pull request online at:

  https://github.com/openstreetmap/openstreetmap-website/pull/5403

-- Commit Summary --

  * Move map offline flash to partial
  * Use offline flash partial on edit page
  * Use offline flash partial on offline redirect target page
  * Change scope of offline flash messages
  * Add offline announcement setting
  * Add expected restoration date setting

-- File Changes --

M app/controllers/application_controller.rb (11)
M app/controllers/site_controller.rb (14)
A app/views/layouts/_offline_flash.erb (26)
A app/views/site/_not_public_flash.erb (3)
M app/views/site/edit.html.erb (14)
M config/locales/en.yml (12)
M config/settings.yml (4)

-- Patch Links --

https://github.com/openstreetmap/openstreetmap-website/pull/5403.patch
https://github.com/openstreetmap/openstreetmap-website/pull/5403.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5403
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 date and url settings for offline message (PR #5403)

2024-12-16 Thread Anton Khorev via rails-dev
@AntonKhorev pushed 5 commits.

ad862c2179a20a981a35798d1af829ffe74393c3  Use offline flash partial on edit page
985032b6a447367c5d5077aed7a3a724322d302f  Use offline flash partial on offline 
redirect target page
ef2035877ec16641af31ac986a1e5de9c9536d73  Change scope of offline flash messages
f6865a342aaadbdad8ce36552dbbcf881a5664f3  Add offline announcement setting
3fbbe8276f9448e5dee98d3ca9e999defd34606b  Add expected restoration date setting

-- 
View it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5403/files/0807cb5714aba822ee22d1e3e54c437e57fe966c..3fbbe8276f9448e5dee98d3ca9e999defd34606b
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] White grid around map tiles when page zoom set to 33%, 67%, 80%, 85%, 90% or 115% (Issue #5109)

2024-12-16 Thread Nekzuris via rails-dev
Okay, I don’t have a Mac to test with Safari, but I found an extension to 
precisely change zoom levels on Chrome and it looks like _mix-blend-mode: 
plus-lighter_ creates problems more often than not, so it should only be 
applied to specific pixel ratios where it’s been confirmed to work.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/5109#issuecomment-2546649393
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


[openstreetmap/openstreetmap-website] Bump osm-community-index from 5.8.0 to 5.9.0 (PR #5405)

2024-12-16 Thread dependabot[bot] via rails-dev
Bumps [osm-community-index](https://github.com/osmlab/osm-community-index) from 
5.8.0 to 5.9.0.
Release notes

Sourced from osm-community-index's releases.

v5.9.0

https://github.com/osmlab/osm-community-index/blob/main/CHANGELOG.md#590

;

v5.8.1

https://github.com/osmlab/osm-community-index/blob/main/CHANGELOG.md#581

;
Changelog

Sourced from osm-community-index's changelog.

5.9.0

2024-Dec-16
  • Updated dependencies, bump to location-conflation v1.4.1 / country-coder v5.3.1
  • Support new resource type: bluesky
  • Added:
    • Many community forum links (#741;, #742;, #743;, #744;, #745;, #746;, #747;, #748;, #752;):
      • Africa, Austria, Bangladesh, Canada, Croatia, Estonia, Finland, Hungary, Indonesia, Malaysia, Mexico, Nepal, Russia, Sweden, Ukraine, Venezuela
    • Social networks for OSM Colombia (#749;)
    • Social networks for TadeoMappers (#754;)
    • Nelson, New Zealand mapping group (#755;)
    • Georgia Matrix (#760;)
    • Croatia resources and remove IRC (#762;)
    • Bulgaria Matrix (#766;)
  • Updated:
    • Switch OSM Berlin from Telegram to Mastodon (#740;)
    • Many sort orders updated (#750;, #751;, #753;):
      • India, Ireland, Italy, Serbia, Thailand
  • Removed:
    • Ireland Meetup (#750;)
    • Indonesia mailing list
    • Many groups with dead links (#757;)
    • MapABQ (#759;)

#740: osmlab/osm-community-index#740; #741: osmlab/osm-community-index#741; #742: osmlab/osm-community-index#742; #743: osmlab/osm-community-index#743; #744: osmlab/osm-community-index#744; #745: osmlab/osm-community-index#


[openstreetmap/openstreetmap-website] Notes UI is still presented, despite being "read-only" (Issue #5404)

2024-12-16 Thread Pieter Vander Vennet via rails-dev
### URL

https://www.openstreetmap.org/note/new#map=17/51.060265/3.721265&layers=N

### How to reproduce the issue?

0. Get OSM.org to be in "read-only" mode. (For example, sabotage the upstream 
router)
1. Go to OSM.org
2. Click the "new note button"
3. The new-note UI will still happily popup, as if nothing is wrong
4. Write a comment and click "Create new note"
5. Nothing happens

It would be nice if no form popped up, but a small "sorry, we cannot add notes 
right now" would be shown instead.

### Screenshot(s) or anything else?

_No response_

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/5404
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


[openstreetmap/openstreetmap-website] Check if db is writable on oauth authorization pages (PR #5406)

2024-12-16 Thread Anton Khorev via rails-dev
Redirect to `/offline` from `/oauth2/authorize` if the database is offline.

Instead of this:
![image](https://github.com/user-attachments/assets/7b9511c5-459b-4b6b-aadf-c45fdb038e87)

users will see this:
![image](https://github.com/user-attachments/assets/b1464660-eb53-4575-83ac-63b54720480f)

Fixes #5400
You can view, comment on, or merge this pull request online at:

  https://github.com/openstreetmap/openstreetmap-website/pull/5406

-- Commit Summary --

  * Check if db is writable on oauth authorization pages

-- File Changes --

M app/controllers/oauth2_authorizations_controller.rb (2)
M test/controllers/oauth2_authorizations_controller_test.rb (14)

-- Patch Links --

https://github.com/openstreetmap/openstreetmap-website/pull/5406.patch
https://github.com/openstreetmap/openstreetmap-website/pull/5406.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5406
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] OAuth2 login flow returns error 500 (Issue #5400)

2024-12-16 Thread Harel M via rails-dev
Thanks for the link @HolgerJeromin! I thought that the fact that I can see the 
openstreetmap.org site means the failure was resolved, but I now learned that 
it's in read-only mode.
I'll wait patiently for the resolution.
Thanks for all the hard work around OSM, it is very much appreciated! Keep it 
up.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/5400#issuecomment-2545810987
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] Proposal for adding support for map notes tags (Issue #5294)

2024-12-16 Thread Nenad Vujicic via rails-dev
OK, thanks, I think I got it, but, I'm far from having a solution code in my 
head honestly.

What would be the ideal way for doing this for you (maintainers)? Should I 
close #5344 and #5323 and start with fresh PR(s) (perhaps the cleanest / safest 
option) or to extend #5344 or to create additional PR(s) that build on #5344?

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/5294#issuecomment-2545895332
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] White grid around map tiles when page zoom set to 33%, 67%, 80%, 85%, 90% or 115% (Issue #5109)

2024-12-16 Thread Boris Verkhovskiy via rails-dev
@Nekzuris they're just zoom levels on Safari.

https://github.com/user-attachments/assets/bcd41dd3-46dc-4478-942f-611e189cb406";
 />


-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/5109#issuecomment-2545803584
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


[openstreetmap/openstreetmap-website] Add user profile heatmap visualization for contributions (PR #5402)

2024-12-16 Thread Emin Kocan via rails-dev
### Description
This PR introduces a heatmap visualization on user profile pages to display 
daily contribution activity over the past year. 

**Key changes include:**
- Added a heatmap container in the user profile view (`users/show.html.erb`).
- Implemented JavaScript logic (`heatmap.js`) using CalHeatmap to render the 
heatmap dynamically based on contribution data.
- Updated localization (`config/locales/en.yml`) to include tooltips and 
month/weekday labels for the heatmap.
- Added tests in `users_controller_test.rb` to validate heatmap data handling.

Screenshots:
Screenshot 2024-12-16 at 16 35 58
Screenshot 2024-12-16 at 16 37 14
Screenshot 2024-12-16 at 16 36 25

### How has this been tested?
- Verified heatmap rendering with mock data for different users and activity 
levels.
- Tested responsiveness and theme support (light/dark mode).
- Checked correct localization of tooltips, month names, and weekday labels.
- Ran automated tests to ensure proper heatmap data handling in the controller.

Let me know if you need further tweaks or enhancements!
You can view, comment on, or merge this pull request online at:

  https://github.com/openstreetmap/openstreetmap-website/pull/5402

-- Commit Summary --

  * Add cal-heatmap lib with plugins and dependencies to 
vendor/assets/javascripts
  * Add manifest and application JS updates for asset linking and heatmap 
functionality
  * Add heatmap data caching and query for user contributions
  * Add heatmap container to user profile view
  * Add heatmap javascript logic, styles and localization
  * Add tests for heatmap data in UsersController

-- File Changes --

M app/assets/config/manifest.js (5)
M app/assets/javascripts/application.js (5)
A app/assets/javascripts/heatmap.js (116)
A app/assets/stylesheets/heatmap.css (3)
M app/controllers/users_controller.rb (17)
M app/views/users/show.html.erb (10)
M config/locales/en.yml (4)
M test/controllers/users_controller_test.rb (93)
A vendor/assets/cal-heatmap/cal-heatmap.css (1)
A vendor/assets/cal-heatmap/cal-heatmap.js (1)
A vendor/assets/cal-heatmap/calendar-label.js (1)
A vendor/assets/cal-heatmap/popper.js (6)
A vendor/assets/cal-heatmap/tooltip.js (1)
A vendor/assets/d3/d3.js (2)

-- Patch Links --

https://github.com/openstreetmap/openstreetmap-website/pull/5402.patch
https://github.com/openstreetmap/openstreetmap-website/pull/5402.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5402
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] OAuth2 login flow returns error 500 (Issue #5400)

2024-12-16 Thread Tobias via rails-dev
We are seeing the same issue.

OSM is in Readonly-Mode https://en.osm.town/@osm_tech/113656639378201391 but 
since I can log into the website, the readonly has to be only for certain parts 
of the website. I assumed the Rails parts would work but the editing part 
wouldn't. But then again commenting on notes is also prohibited so maybe only 
the user sessions are "allowed" since those can be deleted when switching back 
to Amsterdam as primary (or maybe they are not stored in the DB at all)…


-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/5400#issuecomment-2544919212
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] Calendar heatmap of user contributions on user profile (Issue #5373)

2024-12-16 Thread Tobias via rails-dev
Ping https://github.com/openstreetmap/openstreetmap-website/issues/5356 which 
looks like the ambrella issue for this.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/5373#issuecomment-2544945799
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] OAuth2 login flow returns error 500 (Issue #5400)

2024-12-16 Thread BDVGitHub via rails-dev
I think it has to do with the following:
The OpenStreetMap database cannot be modified at the moment due to maintenance 
work being carried out.

Does anyone know how long this maintenance work will last?

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/5400#issuecomment-2545394044
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] OAuth2 login flow returns error 500 (Issue #5400)

2024-12-16 Thread Tobias via rails-dev
@tomhughes Thanks. Is there capacity to improve the handing of this error case 
by showing the "we are in readonly" message in step 1 of the oAuth process so 
users don't run into the uncaught 500?

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/5400#issuecomment-2545240486
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] OAuth2 login flow returns error 500 (Issue #5400)

2024-12-16 Thread Holger Jeromin via rails-dev
> Does anyone know how long this maintenance work will last?

https://community.openstreetmap.org/t/openstreetmap-org-currently-offline-operations-team-are-working-to-restore-15-december-2024/122930

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/5400#issuecomment-2545408116
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 date and url settings for offline message (PR #5403)

2024-12-16 Thread Anton Khorev via rails-dev
@AntonKhorev pushed 5 commits.

bc83501b52933d56153c843c55c3bf3fabcd07e4  Use offline flash partial on edit page
fbe887124451231887e5b4a9dcedb484c11795de  Use offline flash partial on offline 
redirect target page
06952ca16b5af492968cf3ea9d579e95d0b2d888  Change scope of offline flash messages
7cd5ba1975fd87948966222e55e9ee9f17926483  Add offline announcement setting
c47b46d2a259b8909f285bb0a3d12805bc1e8900  Add expected restoration date setting

-- 
View it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5403/files/3fbbe8276f9448e5dee98d3ca9e999defd34606b..c47b46d2a259b8909f285bb0a3d12805bc1e8900
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] Help with documentation for translations (Issue #5399)

2024-12-16 Thread Anton Khorev via rails-dev
Those are model names for use outside of sentences. If the language has 
grammatical cases, use nominative case.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/5399#issuecomment-2546425837
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] Authenticating the maps desktop app fails (Issue #5409)

2024-12-16 Thread Alexander Lazarević via rails-dev
Is probably the same as #5400

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/5409#issuecomment-2547525944
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] Authenticating the maps desktop app fails (Issue #5409)

2024-12-16 Thread Alexander Lazarević via rails-dev
Is probably the same as #5400 

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/5409#issuecomment-2547533092
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] Authenticating the maps desktop app fails (Issue #5409)

2024-12-16 Thread Alexander Lazarević via rails-dev
same as #5400 

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/5409#issuecomment-2547534259
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


[openstreetmap/openstreetmap-website] Authenticating the maps desktop app fails (Issue #5409)

2024-12-16 Thread Alexander Lazarević via rails-dev
### URL

_No response_

### How to reproduce the issue?

1. Open maps on the desktop (manjaro, gnome). Select "Setup OpenStreetMap 
Account..." In the "three dots menu" 
2. Select to sign in on OpenStreetMap
3. Authorize the access (my account is in German, so the dialog language is 
that)
4. This yields in an Application error 

### Screenshot(s) or anything else?

![Screenshot From 2024-12-17 
11-54-42](https://github.com/user-attachments/assets/7d52caa0-1bc7-4bab-9c0e-92d471c29e3c)

![Screenshot From 2024-12-17 
11-51-18](https://github.com/user-attachments/assets/3253c3c8-d548-43ec-bfad-c17a36cfd032)

![Screenshot From 2024-12-17 
11-51-40](https://github.com/user-attachments/assets/f32233e0-6307-4279-ad7c-0ea18100e11e)

![Screenshot From 2024-12-17 
11-52-10](https://github.com/user-attachments/assets/11b1d54c-f8cf-4a75-8b20-025edf195987)

![Screenshot From 2024-12-17 
11-53-02](https://github.com/user-attachments/assets/2ed65d20-e06f-4673-aecc-c881c727c268)

![Screenshot From 2024-12-17 
12-02-37](https://github.com/user-attachments/assets/1cb765ca-2a7a-47de-ac69-6aed52c49036)

```
POST /oauth2/authorize HTTP/2
Host: www.openstreetmap.org
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:133.0) Gecko/20100101 
Firefox/133.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate, br, zstd
Referer: 
https://www.openstreetmap.org/oauth2/authorize?scope=read_prefs+write_api&code_challenge_method=S256&redirect_uri=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob&client_id=ATOMKAKOXQuAJYpFxkm__nDVRlJLXXmP-0P54UfDnZI&state=pNsj%7EQ%7EclM&response_type=code&code_challenge=m9aesZKh1NAMELUL9fTwM3B4z_3DkNEYPGg456GL7KE
Content-Type: application/x-www-form-urlencoded
Content-Length: 388
Origin: https://www.openstreetmap.org
DNT: 1
Sec-GPC: 1
Connection: keep-alive
Cookie: 
Upgrade-Insecure-Requests: 1
Sec-Fetch-Dest: document
Sec-Fetch-Mode: navigate
Sec-Fetch-Site: same-origin
Sec-Fetch-User: ?1
Priority: u=0, i
```


-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/5409
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 preference not respected after OAuth expiry (Issue #5407)

2024-12-16 Thread Holger Jeromin via rails-dev
It is an known issue that not-logged-in users have no settings to change that.
So this is a duplicate to one of the open issues

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/5407#issuecomment-2547576757
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


[openstreetmap/openstreetmap-website] Dark mode preference not respected after OAuth expiry (Issue #5407)

2024-12-16 Thread Marwin Hochfelsner via rails-dev
### URL

_No response_

### How to reproduce the issue?

1. Have color scheme preference set.
2. Have login expire.
3. Website doesn't respect color scheme preference anymore.

### Screenshot(s) or anything else?

Could be fixed by not relying on inserting the data-bs/map-theme flags on the 
server side and check against a cookie/localStorage

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/5407
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 date and url settings for offline message (PR #5403)

2024-12-16 Thread Anton Khorev via rails-dev
@AntonKhorev pushed 6 commits.

93c122dcb163c3cdf2e4a258729595382b471189  Move map offline flash to partial
89fa8d5015b9c9a54ab5f60e644e13f67b735492  Use offline flash partial on edit page
1c1ca02b14a995fef3fd7447b21f77f1cc69ca77  Use offline flash partial on offline 
redirect target page
25755f69760579c0c640e283d193d12cda88f50a  Change scope of offline flash messages
a42de32e15ee60f0bdc5b7e7ffa0933646ee2998  Add offline announcement setting
d231d5d3757523c2fb77559dc512420183d76c0b  Add expected restoration date setting

-- 
View it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5403/files/c47b46d2a259b8909f285bb0a3d12805bc1e8900..d231d5d3757523c2fb77559dc512420183d76c0b
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 date and url settings for offline message (PR #5403)

2024-12-16 Thread Anton Khorev via rails-dev
@AntonKhorev pushed 5 commits.

2f01c9472aa9b692a4678e19abb37cfc4f0855b7  Use offline flash partial on edit page
2287bf044af084667f0c6ddbe205ff08f3b9cf5c  Use offline flash partial on offline 
redirect target page
d7beb6ffedf2f87ecc1c8639579d197c95a2bc18  Change scope of offline flash messages
86035db1f44832c551cc4acff7cbf422b54fa239  Add offline announcement setting
337af7b299f49bac56f9d924e10acda600fba534  Add expected restoration date setting

-- 
View it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5403/files/d231d5d3757523c2fb77559dc512420183d76c0b..337af7b299f49bac56f9d924e10acda600fba534
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


[openstreetmap/openstreetmap-website] Show 'api offline' message on new note page (PR #5408)

2024-12-16 Thread Anton Khorev via rails-dev
Show this on `/note/new` if the api is not online:
![image](https://github.com/user-attachments/assets/1c1bb942-28ed-423a-a0cd-2944cbd40410)

Fixes #5404.
You can view, comment on, or merge this pull request online at:

  https://github.com/openstreetmap/openstreetmap-website/pull/5408

-- Commit Summary --

  * Show 'api offline' message on new note page

-- File Changes --

M app/controllers/notes_controller.rb (4)
A app/views/notes/new_readonly.html.erb (7)
M config/locales/en.yml (3)
A test/system/create_note_test.rb (23)

-- Patch Links --

https://github.com/openstreetmap/openstreetmap-website/pull/5408.patch
https://github.com/openstreetmap/openstreetmap-website/pull/5408.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5408
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 user profile heatmap visualization for contributions (PR #5402)

2024-12-16 Thread Holger Jeromin via rails-dev
@HolgerJeromin commented on this pull request.



> +  [CalendarLabel, {
+position: "left",
+key: "left",
+text: () => weekdays,
+textAlign: "end",
+width: 30,
+padding: [23, 10, 0, 0]
+  }],
+  [Tooltip, {
+text: (date, value) => getTooltipText(date, value, locale)
+  }]
+]);
+  } catch (error) {
+console.error("Error during Cal-Heatmap initialization:", error);
+  }
+});

```suggestion
}, {once: true});
```


-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5402#pullrequestreview-2508046543
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 user profile heatmap visualization for contributions (PR #5402)

2024-12-16 Thread Holger Jeromin via rails-dev
@HolgerJeromin commented on this pull request.



> +  const heatmapElement = document.querySelector("#cal-heatmap");
+
+  if (!heatmapElement) {
+console.warn("Heatmap element not found in the DOM.");
+return;
+  }
+
+
+  const heatmapData = heatmapElement.dataset.heatmap ? 
JSON.parse(heatmapElement.dataset.heatmap) : [];
+
+  try {
+// eslint-disable-line no-undef
+const cal = new CalHeatmap();
+const applicationData = $("head").data();
+const locale = applicationData.locale;
+const theme = getTheme();

We can watch for change of color theme with 
https://developer.mozilla.org/en-US/docs/Web/API/MediaQueryList/change_event

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5402#pullrequestreview-2508058564
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