OpenSourceBrain / OSBv2

An updated version of the Open Source Brain platform
https://www.v2.opensourcebrain.org/
Other
11 stars 6 forks source link

Allow more permanent URL for workspaces page #887

Closed pgleeson closed 4 months ago

pgleeson commented 8 months ago

Would be good if https://v2.opensourcebrain.org/workspaces was a valid URL, which shows a view the same as currently on the v2 homepage. It's possible that the v2 homepage could evolve to be a view of featured workspces and repos... So would be good to get the new URL working and point existing docs, etc. to it.

Note: https://v2.opensourcebrain.org/repositories/2232 https://v2.opensourcebrain.org/workspace/1207

so https://v2.opensourcebrain.org/workspaces/1207 (i.e. plural) should also point to the identified ws...

pgleeson commented 5 months ago

The latest version on live has broken the old version of the links: https://v2.opensourcebrain.org/workspace/1207 - used to work, now fails https://v2.opensourcebrain.org/workspaces/1207 - works now Could you check if there is a quick fix to make both work @filippomc?

filippomc commented 5 months ago

@pgleeson do you only need /workspace/:workspaceId or also /workspace/open/:workspaceId and /workspace/open/:workspaceId/:app?

pgleeson commented 5 months ago

If the other (singular) version works too it would be great, as there may be old deep links. I guess the preferred/default version should be the singular (so https://v2.opensourcebrain.org/workspace/open/1207/nwbexplorer etc is preferred), as it's a single workspace being acted on.

filippomc commented 4 months ago

The plural is the widely accepted option for REST so that paths are consistent with a resource navigation kind of style, so that removing one part of the path still gives working paths, with the idea /workspaces/X is showing the workspace X among all workspaces. A single path just like workspace wouldn't sound as meaningful instead. But also true that the path like /workspaces/open/1207/nwbexplorer is not fully consistent with that idea, as should be like /workspaces/1207/open/nwbexplorer instead. I'd support both versions but keep the plural as the default if you agree.

pgleeson commented 4 months ago

Happy with the plural being the default, as long as both forms still work. Thanks!