[openstreetmap/openstreetmap-website] Add unsaved changes warning to message and diary forms (PR #7076)

Andy Allan notifications at github.com
Wed May 13 17:26:45 UTC 2026


@gravitystorm commented on this pull request.

I'd like to see a clear discussion about alternative approaches. I'm concerned that this is a lot of hard-to-test code and hard to maintain code.

* Does rails (or hotwire, stimulus etc) offer anything similar?
* Is there a ruby gem or standard javascript library that offers anything similar?
* If this is available in other text editors (e.g. Trix) or similar situations (e.g. iD) can we re-use code from there?
* Is there something 

It might be that what is presented here is the best approach, but I would like to see it reasoned out.

---

Also, I'd like to see some reasoning as to which forms should get this warning, and which ones should not. That helps decide whether this PR covers enough of them, or if we can make it enabled by default (since someone adding a new form on the website might not be aware this exists).



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

Message ID: <openstreetmap/openstreetmap-website/pull/7076/review/4283965108 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20260513/e7b29ae3/attachment.htm>


More information about the rails-dev mailing list