You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
There is no link between a document set's URL and its parent collection's URL
This makes it easy to have a public document set within a private collection appear as a collection
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:
if an object is always part of some other object, nest the URLs (e.g. articles should always be POSTed within a collection)
include the type of (nested) resource in the URL, to prevent potential conflicts when IDs for collections, works and pages overlap and to allow easier (mental) construction of URLs. For example, the /iiif/ path can be followed by collection, work or page IDs, or by fixed strings; while I don't think any of the IIIF routes could 'clash' currently, updating or adding routes requires carefully analysing whether that action introduces potential clashes. For collections and document sets, URLs did collide, but a different solution, unique slugs, was chosen.
refactor routes with verbs to resources with HTTP methods, e.g. POST document_sets/remove_set_collaborator with query params for the IDs of the document set and the collaborator could become DELETE document_sets/:document_set_id/collaborators/:collaborator_id.
Thanks!
The text was updated successfully, but these errors were encountered:
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:
POST
ed within a collection)/iiif/
path can be followed by collection, work or page IDs, or by fixed strings; while I don't think any of the IIIF routes could 'clash' currently, updating or adding routes requires carefully analysing whether that action introduces potential clashes. For collections and document sets, URLs did collide, but a different solution, unique slugs, was chosen.POST document_sets/remove_set_collaborator
with query params for the IDs of the document set and the collaborator could becomeDELETE document_sets/:document_set_id/collaborators/:collaborator_id
.Thanks!
The text was updated successfully, but these errors were encountered: