adr-manager icon indicating copy to clipboard operation
adr-manager copied to clipboard

What is the expected behaviour when routing to an unadded repository?

Open KLBa opened this issue 5 years ago • 1 comments

I'm currently working on #74, i.e. reworking the routing, and ran into this question. I'm hoping to get some input on the expected behaviour.

Context (referring to the branch "routing-fix"):

  • Currently URLs look like .../#/manager/repo-owner/repo-name/branch/file/adr-name, e. g. grafik (This may change, if I find a layout that I like better.)
  • All changes in the URL lead to a new entry in the browser history. grafik

Question

How should the manager react, when repo-owner/repo-name in the URL does not refer to any added repository?

Use Cases that may lead to this problem:

  • The user removes a repository, then goes back in browser history.
  • User A sends user B a link, but user B has not added the repository.

So far I was thinking about these behaviours:

  • Do nothing in particular. Just show the Editor as if that part of the URL was not there.
  • Show an error or warning dialog.
    • Good, because user is informed.
    • Bad, because extra click to click it away.
  • Add the repository automatically, if the user has write access to it.
    • Good, because increases efficiency in the second use case.
    • Bad, because might be surprising behaviour.
    • I'm not sure how complicated the implementation would be.

Besides that, I'm also not sure if there should be an history entry for each opened ADR.. I think it's possible to just overwrite the last entry. This would decrease spam in the browser history and solve the first use case.

It would be nice to get some opinions on this. :)

KLBa avatar Jan 11 '21 16:01 KLBa

I ran into this earlier today and was expecting "Add the repository automatically".

I would have also accepted...

  • Add the repository as a read-only repository that then requires a positive user action.
    • e.g., click a ➕ button to change it from read-only to read-write.
    • e.g., drag it from a "read-only" area to my list of subscribed read-write repositories.
  • Pop up a dialog that says "Do you want to add this repository?"

docwhat avatar Feb 02 '23 22:02 docwhat