Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Record relative paths for files in parent/sibling directories #39

Closed
BrianRosamilia opened this issue Mar 23, 2020 · 6 comments
Closed
Labels
area: recording enhancement New feature or request

Comments

@BrianRosamilia
Copy link

BrianRosamilia commented Mar 23, 2020

If you add a reference to a file in a parent directory, it will resolve as the full path to the file (ex If I have a tour in C:\brianrosamilia\parent\NewThing\, then adding C:\brianrosamilia\parent\my.Config should resolve as ..\my.Config and not the full path).

What happens when I add a tour step like that: it resolves as C:\brianrosamilia\parent\my.Config and clicking on the tour step will not work

What I'm expecting: it resolves as ..\my.Config and clicking on the tour step will work

The nice thing is you can actually just convert the path to relative yourself in the tour JSON as a workaround and everything will work. It even works if you subsequently add steps to that tour in the same file.

I'm assuming you agree with this on a technical level but, in my opinion, relative paths are great for things checked into source control so I feel this is the preferred behavior.

Btw I really appreciate this project. I am using it in a presentation tomorrow (wish me luck :) )

@lostintangent
Copy link
Member

Hey! Yep I totally agree with you on this, this is just a bug :) I'll try to get this fixed in the next couple of days. In the meantime, I'd love to hear how your presentation goes tomorrow 👍

@BrianRosamilia
Copy link
Author

Hey @lostintangent. Didn't see anywhere else to give feedback so I'll do it here

I think everyone really enjoyed the code tour! And it helped me stay focused and made it so I didn't miss anything while presenting code (maybe even more important).

One suggestion that would have really helped me and I think would be amazing and really set this project ahead of traditional presentation tools :

I was glad to see the tour steps support markdown.

So when I type npm run storybook it shows how I expect it and how another developer would like to read it.

But it would be even cooler if typing that was translated to

▶️ npm run storybook

And clicking the play button would actually run the task. It was slightly cumbersome to use my (extremely loud) mechanical keyboard to show a few new npm tasks. It would've been great to just click a button and show them running. Anyway, not sure if you are thinking about adding language/platform specific tools, but I hope you do so that things like this are possible. Thanks again for this project 😄

@lostintangent
Copy link
Member

@BrianRosamilia Yeah I definitely think this feature enhancement would make sense. Would you mind creating a new issue to track that seperately?

Also regarding your original request: is the parent folder a git repo? And NewThing and My.Config are child directories of it?

@lostintangent lostintangent changed the title Parent directory not resolving via relative path? Record relative paths for files in parent/sibling directories Mar 30, 2020
@lostintangent lostintangent added area: recording enhancement New feature or request labels Mar 30, 2020
@BrianRosamilia
Copy link
Author

BrianRosamilia commented Apr 3, 2020

In my original example, the parent directory was the root of the git repository and the code tour was a couple of folders deeper in that project (because it was an introduction to react for a focused part of the codebase)

The same thing happens on my mac, with the latest version as well fyi. If I am in an azure function app deep in my repo and I create a code tour there and I add a step to something like my license or readme, it's an absolute path.

IMO, I don't think it should be assumed that our .vscode folder is always in the root of the git repo. There are a lot of monorepos out there!

@lostintangent
Copy link
Member

@BrianRosamilia Yep, I completely agree! I just wanted to verify that the tour was a sub-directory of the repo, since that would ensure that the relative path would be "stable" for other people when they clone the repo and try to play the tour back. I'll tackle this item ASAP 👍

@lostintangent
Copy link
Member

The fix for this was just checked in and will be shipped later this afternoon 👍 Let me know if it works as expected. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: recording enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants