bxantus / mdoc

Markdown documentation viewer for Visual Studio Code
MIT License
4 stars 0 forks source link

Copy url is not useful for local files #8

Open thany opened 3 years ago

thany commented 3 years ago

The extension can know the url to a local file if there's a Github-repo associated with it, which in our case, there is.

However, the "copy url" function produces the following url for any given local file:

vscode://bxantus.mdoc/open/https/github.com/<organization>/<project>.git/./Getting-Started/Sitecore-Install.md

Probably this opens the correct file in VScode, I haven't checked. But regardless, it's not useful. It's not a url to the file, it's a url to opening the file in VScode, if that.

Clearly, it kind of knows where to go (i.e. Github) but it's unable to produce a url that is useful as-is. Instead, I'd expect it to produce a url more along the lines of:

https://github.com/<organization>/<project>/tree/master/Documentation/Getting-Started/Sitecore-Install.md

Because that, in this case, is where the associated git repo says this file is located.

On a sidenote, I also don't understand why the "copy url" button has to be so visually prominent in the breadcrumbs bar. Do you expect folks to use this button quite a lot?

bxantus commented 3 years ago

Thanks for the feedback! This links are meant to be shared with other vscode users having cloned the same documentation project (Maybe I should provide a better description for this functionality). I try to explain better in a few points below:

In a future update the UX design may change, based on feedbacks like yours. Currently I'm not planning to change it.

Hope this clarifies this functionality. Please let me know if this still doesn't help.

thany commented 3 years ago

Thanks for the explanation. Makes sense.

My point is mainly on sharing the link to a file with someone who, for any reason, doesn't (or cannot) have mdoc configured in their editor.

This only leaves the copy url button. I think it's a bit too prominent. I feel it serves better as a subtle clickable icon (perhaps a clipboard icon).