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

Sticky steps? #126

Closed
SeanDez opened this issue Feb 1, 2021 · 3 comments
Closed

Sticky steps? #126

SeanDez opened this issue Feb 1, 2021 · 3 comments

Comments

@SeanDez
Copy link

SeanDez commented Feb 1, 2021

Hi, first of all I wanted to say I love the plugin! I use CodeTour for private commenting, to help me personally explain bits of code without cluttering the repo with comments.(In my use case I don't commit the .tour folder. I also don't "run" tours, I just use them as hidden/popout comments)

What would you say is the best way to make a step "sticky" so that file changes won't drift a tour step from its associated code block? I have mostly used line based steps but now see that maybe selecting a code block first will better connect the step to it. Is that true?

If the code block is modified is there potential for the step to still drift? What type or level of modification would cause that?

Thanks!

@lostintangent
Copy link
Member

lostintangent commented Feb 1, 2021

Hey! Thanks for reaching out 👋 So are you creating a bunch of single step tours? Or are you creating tours as a series of comments for a single codebase?

Also, how are you storing/persisting the tours if you don't commit them? Do you record the tours, and then move the files someone else? I just ask since you can export tours, and CodeTour allows storing tours in GitHub Gists, and I'd be curious to hear if that's helpful for your workflow 👍

Regarding making the steps sticky, there are a few options currently:

  1. You can export a tour, which will include the associated code in the tour file itself, and therefore, can always be replayed, even if the annotated code changes.

  2. Additionally, when you record a tour, you can choose to associate it with a specific commit, and whenever you replay the tour, it will use the version of the files in the original commit.

Would either of those work for your workflow? Both of these options rely on "snapping" the tour to a specific version of the codebase, and therefore, might not be great if you want to have your tours be "sticky" to the codebase. But they have the benefit of not requiring the codebase itself to be modified for your personal notes.

In order to allow a tour to remain in sync with the latest codebase changes, we're exploring two options:

  1. Injecting a comment "marker" into the codebase, so that the step can be associated with the code block, not a specific line. This might not work for you, since you don't want to include any changes into the codebase?

  2. Associating the step with a line of code via a regular expression. That way, if the line number changes, then the tour would remain "sticky" to it.

In both of these cases, we'd need to make the recorder allow authoring tours easily, but I think we could address that challenge.

In general, I'd love to hear your thoughts, since this is an area where we need a ton of great feedback on. I'd also like to improve the workflow for creating personal notes, and so learning more about your use case would be very helpful. Thanks! 😁

@SeanDez
Copy link
Author

SeanDez commented Feb 1, 2021 via email

@lostintangent
Copy link
Member

Closing this in favor of #135 and #141, which are discussing various options for this problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants