[openstreetmap/openstreetmap-website] Make preferences page editable without clicking 'Edit Preferences' (PR #5449)
Andy Allan
notifications at github.com
Wed Jan 8 19:03:10 UTC 2025
> Does anyone need the `#show` page?
No, I guess not.
I've done a small amount of research into this, to see what other similar applications do - just to see if there's any conventions. Github, Mastodon and Discourse all show forms and don't appear to have a show/edit split. Mastodon has its source code available, and they use show+update actions, with the form on the show page. This avoids the whole issue around the path changing when forms are redisplayed and therefore breaking refresh.
https://github.com/mastodon/mastodon/tree/3c7f3b190cbaf6b6db25b15c16c8dc0bff599c00/app/controllers/settings/preferences (they've split their preferences into multiple pages, but BaseController#update shows the logic).
So maybe our convention should be that where it isn't useful to have separate show and edit pages, then we put the form on the show page.
I'd be happy to hear from anyone who has advice based on other similar rails projects!
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5449#issuecomment-2578415862
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/5449/c2578415862 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250108/704dfcb0/attachment.htm>
More information about the rails-dev
mailing list