microsoft / codetour

VS Code extension that allows you to record and play back guided tours of codebases, directly within the editor.
https://aka.ms/codetour
MIT License
4.34k stars 109 forks source link

Disable "Start Discussion" window #235

Open pepeu93 opened 2 years ago

pepeu93 commented 2 years ago

Is possible to add an option to disable this window from popping when you click on a Step? image

Sometimes I create tours just to quickly navigate between the code/files, would be nice having an option to don't open this window and just jump to the line silently.

lostintangent commented 2 years ago

So you're looking to create a tour simply as a series of file locations? But without any descriptions at all?

I wonder if the solution is to leave the description blank when you record the tour, and upon playback, CodeTour could detect empty steps and hide the comment popular?

pepeu93 commented 2 years ago

I wonder if the solution is to leave the description blank when you record the tour

Not really, as I could still want to leave any description in the tour, I mean an option to just don't open the start discussion when jumping to the tour line.

Maybe an option in the .tour file? "silent": true (jump to step line without opening any window)

Anyway, people would still be able to read the description by hovering over the tour at the explorer panel.

lostintangent commented 2 years ago

Yep this seems like a pretty straight forward change.

pepeu93 commented 2 years ago

So can I expect it to be implemented?

pepeu93 commented 2 years ago

@lostintangent could you answer? you're not supporting the extension anymore?

lostintangent commented 2 years ago

If you'd be down to submit a PR, that would be great, and I could help review it. At the moment, I have a few other priorities across this extension, and my others, and so it would be a huge help to get some community assistance. Otherwise, I can try to get to this in a couple weeks.

pepeu93 commented 2 years ago

If you'd be down to submit a PR

I would like to, but I have never worked in any extension, I'm a beginner in programming, and while I was searching for some extensions to help in this process, I have found Codetour and I like it a lot, great extension!

Otherwise, I can try to get to this in a couple weeks.

Thank you, I will wait for you to get some time for it!

lostintangent commented 2 years ago

Sounds good! I'll use this issue to report any progress in the next couple weeks.

Regarding the design: in addition to attaching a step to a line of code in a file, a tour can also have steps that are associated with a directory, and also, "content-only steps", which aren't associated with either a file or directory (e.g. providing an intro to the tour, or summarizing some content in the middle of a tour). In these two cases, we need to think about how they'd behave in "silent" mode.

For directory-based steps, the directory is auto-focused in the file tree when it's navigate to, but that's pretty subtle. And so I'd worry that a user might be confused if they navigate to a directory step, and we didn't display the step description UI. Furthermore, the content-only step wouldn't have anything else to show besides its description, and therefore, you'd either need to choose between 1) showing these steps, which might feel inconsistent, or 2) skipping these steps entirely, which might seem confusing.

Since the request for "silent" tours hasn't come up before, I'm not entirely sure what the expected behavior here is. In your case, I'm not sure if you're using directory or content steps, but we'll need to design this feature in a way that works for them, since this needs to be a general-purpose feature of CodeTour.

I'd love your thoughts on this 👍

pepeu93 commented 2 years ago

@lostintangent I'm using regex to match the steps, the other options you mentioned I don't know how they work

pepeu93 commented 2 years ago

Why not make all options behave the same? Click goes to the line without opening anything? I could not understand your doubt (sorry English is not my main language)

lostintangent commented 2 years ago

In the case of "directory steps" we could do this, but there isn't a line of code to navigate to. CodeTour is simply selecting the associated directory in the file tree (as if you single-clicked it yourself). Since this is a subtle UX gesture, I'd worry that without displaying the step description, people might get confused and think it's broken. That said, I suppose the status bar and CodeTour tree would indicate what the step represents, and so maybe this behavior is OK.

But for "content only steps", they aren't associated with a file or folder, and so if we didn't show their descriptions, then they'd be effectively skipped. So I think to start, we should make "content only steps" effectively ignore the silent setting, and behave normally.

pepeu93 commented 2 years ago

I'd worry that without displaying the step description, people might get confused and think it's broken

But people would need first to activate this specific option and after reading the option description, he would know that not opening the step description window is the desired behavior for such option, don't?

pepeu93 commented 2 years ago

@lostintangent I got it, now the window doesn't open anymore and everything else still working correctly

I needed just to comment on this line: https://github.com/microsoft/codetour/blob/e7018e228c64f9dde061af56217927159cd42950/src/player/index.ts#L363

any idea how I could also hide this mark? image