NCEAS / metacatui

MetacatUI: A client-side web interface for DataONE data repositories
https://nceas.github.io/metacatui
Apache License 2.0
42 stars 27 forks source link

Change the URL when navigating between user profile sections #74

Closed amoeba closed 4 years ago

amoeba commented 7 years ago

Right now, if you want to send a user to the right page to get their token you have to say:

  1. Log in
  2. Hover over your name
  3. Click My Profile
  4. Click the Settings tab
  5. Click the Authentication Token tab

It would be really nice if each of the tabs and sub-tabs (?) could be linked directly, such as: https://arcticdata.io/catalog/#profile/http://orcid.org/0000-0002-0381-3766/settings/token

This isn't a deal breaker for anyone or a blocker but it would be really nice to when writing documentation or providing user support.

mbjones commented 7 years ago

I'll go one further, and say it would be great to have a syntax to link to the current user profile sections, without knowing their user ORCID or other ID. For example:

https://arcticdata.io/catalog/#profile/settings/token

If no user is logged in, it would redirect them to sign in, then bring them to that page. Not sure what the route really should be -- could just be a custom route.

laurenwalker commented 7 years ago

Sections of the user profile can already be linked to with current functionality. For example, you can link to the groups section this way:

http://arcticdata.io/catalog/#profile/http://orcid.org/0000-0003-2192-431X/s=settings/s=groups

We need to have some kind of unique syntax such as "/s=" to break up the URL parts (instead of only a slash) since user ids can have slashes and Backbone needs to be able to tell what is a user id and what is a URL part.

These URLs are not exposed when you navigate through the profile sections, so we could change the URL as the user clicks between sections.

I like the idea of a general profile link without the user id, but I don't like using #profile since that is already reserved for the repository profile. I think it would be confusing to have #profile link to a repository profile, while #profile/settings links to the user settings. But we could do #myprofile.

laurenwalker commented 7 years ago

Added an issue for a general user profile route: https://github.com/NCEAS/metacatui/issues/76

amoeba commented 7 years ago

Thanks @laurenwalker that's great.