benwbrum / fromthepage

FromThePage is a wiki-like application for crowdsourcing transcription of handwritten documents.
http://fromthepage.com
GNU Affero General Public License v3.0
171 stars 51 forks source link

Rethink routes (i.e. URLs) for collections and document sets #4411

Open bencomp opened 1 week ago

bencomp commented 1 week ago

This is a big issue with more implications than I probably see, but I would like to humbly suggest to rethink and update the URLs for collections and document sets (and maybe other resources too). The current situation appears to cause issues for users and it makes understanding and developing the application harder.

I know that FromThePage has a long history and understand that Rails has evolved too. This issue comes from me finding it hard to understand why some issues exist or even seem to return. I don't expect that I have time to help implement (all) the suggestions below or that you will prioritise this.

Some observations about routing:

Some of these issues were already addressed. But not having a clear structure may require increasingly complex logic to maintain integrity (force unique slugs, force slugs to not be numbers only, make routes.rb longer, etc.) when adding features.

The Rails guide on routing makes it all look easy, if your controller actions match the Rails defaults.

Let me provide some suggestions for discussion:

Thanks!