openstreetmap / openstreetmap-website

The Rails application that powers OpenStreetMap
https://www.openstreetmap.org/
GNU General Public License v2.0
2.16k stars 908 forks source link

Ajaxify Diary forms #2091

Open loleg opened 5 years ago

loleg commented 5 years ago

Currently new or edited Diary entries are submitted via old fashioned POST of the form. It should be relatively straightforward to AJAX-ify this (e.g. here is one tutorial, or see other parts of the application like message_summary).

Doing this will slightly reduce the load on the server, and improve the user experience in one key area: disconnections that lead to data loss will be more manageable - the user can see their content and save it offline if there is an issue, and this will make implementing Auto-Save easier as a next step.

tomhughes commented 5 years ago

This is mostly a question of history, but there is also some disagreement among the main developers about how much we should move to the client side.

loleg commented 5 years ago

Like Wikipedia's Talk pages, I understand that the Diary has the important function of letting people explain their thinking and concerns. It would be good to upgrade this functionality for the next decade.

Have there been any suggestions yet of letting people aggregate rather than add content?

pnorman commented 5 years ago

Like Wikipedia's Talk pages, I understand that the Diary has the important function of letting people explain their thinking and concerns. It would be good to upgrade this functionality for the next decade.

It's got a different purpose. The issue if we want to move this to the client side or not, and there's not a consensus about that.

Have there been any suggestions yet of letting people aggregate rather than add content?

That sounds like a separate issue. Could you open one, adding more information about what you mean?

ferdi2005 commented 5 years ago

That is an old tutorial, you need only to set remote: true. Do we have rails-ujs, right?

loleg commented 5 years ago

@pnorman I'll think about making a proposal to the community, ideally after brainstorming the idea a little with someone in the local community.

@ferdi2005 sorry, no idea.