DataONEorg / collections-portals-schemas

Enabling project and data paper views via MetacatUI, Metacat, and EML
Apache License 2.0
3 stars 3 forks source link

design readable URLs for project navigation #65

Closed mbjones closed 5 years ago

mbjones commented 5 years ago

Most URLs in MetacatUI use an identifier for routing in the URL, but these identifiers are often opaque and hard to remember and type. For the Project pages, a design goal would be to have easily-remembered, and easily-typed short-names or aliases that would route to the appropriate project page. We already do this for These would still be associated with a permanent PID, but the short-name would also be unique and routable.

We should also discuss the URL path and whether projects or some other keyword would be best for these URIs. We should also consider whether these are like GitHub Organizations, or some other metaphor. I think we might also benefit from using these new customizable pages for user profiles and node profiles as well (node profiles already allow for use of short names like KNB in the URL).

For example:

https://knb.ecoinformatics.org/knb/projects/sasap https://arcticdata.io/catalog/projects/DBO https://knb.ecoinformatics.org/knb/groups/seabloom-lab https://search.dataone.org/people/metamattj https://search.dataone.org/repos/KNB

These choices will impact indexing, as described in #59 .

csjx commented 5 years ago

In https://github.com/NCEAS/metacatui/commit/794447f47a81b7ea3e59ddbe8b4626b1861c168c, I've changed the router to now support the following path pattern/projects(/:projectId)(/:projectSection). Note the change from /project to /projects. While both projectId and projectSection are optional, for now, we need a projectId because we don't have a ProjectsView (which is the equivalent of searching for Datasets, but for indexed Projects in Solr). This pattern supports the following examples:

As a stopgap and until we index project definition documents server-side, I've added a AppModel.projectsMap attribute. This maps the projectName with the seriesId of the project definition document on the server. This map gets manually set in each theme based on which projects we currently support. This map will eventually be deprecated as we move to server-side indexing of project definition documents.