Skip to content

Conversation

pokey
Copy link
Member

@pokey pokey commented Dec 5, 2021

image

Todo

  • Install locally and try everything out
  • Try "cursorless docs" both inside and outside of VSCode
  • I have not broken the cheatsheet
  • Make it more obvious that the tutorial list is a list of all tutorials
  • Change what we show when tutorial prereqs no longer met, eg "prereqs not met, feel free to keep playing, and say resume to resume"
  • Add note at end of unit 1 suggesting they continue to play with the document
  • Tune tutorial content. Move / add docs tip to end of first tutorial. More stuff maybe better for follow-up PR
  • Point out that we're using highlights for marks in first tutorial step
  • Have "tutorial exit" command and corresponding button
  • Add paragraph break between sentences in step
  • Workshop the actual text in the editor itself so that it indicates they should look at the side bar
  • Make color of commands stand out more
  • Properly support custom actions and other necessary custom spoken forms
  • Store current progress in local storage (and sync it)
  • Properly support custom symbol spoken forms (eg alphabet)
  • Add "tutorial restart"
  • I have added tests
  • Fix scope tree view
  • How to handle disabled hat color?
  • Figure out unicode for emoji
  • Figure out what "cursorless tutorial" should actually do. Currently starts second tutorial, which is obv not what we want
  • Figure out how to advance from last step of initial tutorial, as it has no action to perform
  • Add "tutorial next" / "tutorial previous" commands
  • Add tutorial step saying to use "cursorless help" cheatsheat
  • Fix broken references to css eg reset
  • Invalidate state if custom spoken forms change
  • Change view when we detect that prereqs are no longer met (eg cursor in wrong place, etc). Indicate they should say "tutorial continue" / "tutorial restore" / "cursorless tutorial" to reset the prereqs
  • Merge HUD changes
  • Figure out how to properly detect VSCode focused
  • Highlight marks that need to be targeted, so user doesn't have to search for them
  • Remove print statements and commented out code from tutorial.py
  • Figure out how to only run step preparation when you have the right window focused. Some of the time @pokey gets error message after "cursorles help" step
    image
  • Open new window on start?
  • Ensure you're in the right window / editor before restoring state, so we don't accidentally clobber something
  • Get it to work with mainline Talon HUD
  • Finish constructing spoken forms from commands
  • Use app name for VSCode that works cross-platform
  • Figure out what todo with the fact that the cheatsheet clobbers the entire screen and you can't even see the close button (Reimplement cheatsheet using html #619)

See also cursorless-dev/cursorless-talon#143

Unit 2

  • Python
  • Have an action class?

To cover:

  • New scope types
  • New actions, including
    • single argument "bring"
    • multiple argument "bring"
    • "move"
    • "swap"
  • Simple inference in the context of multiple target actions such as swap or bring

Extra unit

  • Probably want to move this into a new pull request
  • Create a json script for it
  • Don't forget to add the intermediate steps where it was not a cursorless command and so isn't recorded

Links

Helpful places in our code base

In case we decided to look into VSCode walkthroughs rather than Talon hud

@pokey pokey force-pushed the cursorless-tutorial branch 3 times, most recently from ab8e8a3 to b366fa1 Compare December 12, 2021 17:20
@pokey pokey self-assigned this Dec 24, 2021
@pokey pokey added the documentation Improvements or additions to documentation label Dec 24, 2021
@pokey pokey changed the title Cursorless tutorial Cursorless tutorial units 1 & 2 Dec 24, 2021
@pokey pokey force-pushed the cursorless-tutorial branch from acbcdf7 to 8429c66 Compare January 2, 2022 15:18
@pokey pokey mentioned this pull request Jan 8, 2022
7 tasks
@pokey pokey force-pushed the cursorless-tutorial branch from 8429c66 to 46e1344 Compare January 9, 2022 14:27
@pokey pokey force-pushed the cursorless-tutorial branch 2 times, most recently from bc3df21 to 59175ca Compare January 27, 2022 14:19
@pokey pokey force-pushed the cursorless-tutorial branch 3 times, most recently from c0a98ad to 3af06b5 Compare April 27, 2022 13:10
@pokey pokey added this to the 0.27.0 milestone May 16, 2022
@pokey pokey force-pushed the cursorless-tutorial branch from 3af06b5 to 1b9a97b Compare June 11, 2022 13:17
@pokey pokey force-pushed the cursorless-tutorial branch from ae46167 to 9c1e680 Compare June 24, 2022 10:45
@pokey pokey force-pushed the cursorless-tutorial branch 2 times, most recently from e05c437 to b3504a6 Compare July 9, 2022 14:22
@pokey pokey removed this from the 0.27.0 milestone Sep 6, 2022
@pokey pokey linked an issue Sep 6, 2022 that may be closed by this pull request
@pokey
Copy link
Member Author

pokey commented Sep 6, 2022

Closing until this becomes an active priority again

@pokey pokey closed this Sep 6, 2022
@pokey pokey deleted the cursorless-tutorial branch February 16, 2023 15:26
@pokey pokey restored the cursorless-tutorial branch December 7, 2023 14:39
@pokey pokey reopened this Dec 7, 2023
@pokey pokey force-pushed the cursorless-tutorial branch from b3504a6 to 466fe64 Compare December 7, 2023 15:37
@pokey
Copy link
Member Author

pokey commented Jul 17, 2024

Okay this one is a quite large. I must admit I'm not a big fan of how much changes you need to do to the engine. The concept of "lean engine" is thoroughly trampled upon here :D I assume there are good reason why you couldn't do more of this in the composition route for vscode and that just shows that we need a much better plugin based system for the engine. I'm not against merging this, but I think we as soon as possible should try to move things out of the engine.

Note I haven't really had time to test it myself so that is left to do. This was just a first review of the code.

I'm not opposed to moving this into its own package, but I wouldn't want it in vscode as it's generic. Shall I move it into a tutorial package?

@AndreasArvidsson
Copy link
Member

Okay this one is a quite large. I must admit I'm not a big fan of how much changes you need to do to the engine. The concept of "lean engine" is thoroughly trampled upon here :D I assume there are good reason why you couldn't do more of this in the composition route for vscode and that just shows that we need a much better plugin based system for the engine. I'm not against merging this, but I think we as soon as possible should try to move things out of the engine.
Note I haven't really had time to test it myself so that is left to do. This was just a first review of the code.

I'm not opposed to moving this into its own package, but I wouldn't want it in vscode as it's generic. Shall I move it into a tutorial package?

Please do!

@pokey pokey requested a review from josharian as a code owner July 18, 2024 09:19
@pokey
Copy link
Member Author

pokey commented Jul 18, 2024

ok @AndreasArvidsson this is ready for another review and local test. Don't merge yet as I'm going to install it locally and give it one more whirl before shipping

@pokey
Copy link
Member Author

pokey commented Jul 18, 2024

ok I installed locally and it's working well. Give it a try for yourself and if you're happy merge away!

@AndreasArvidsson
Copy link
Member

AndreasArvidsson commented Jul 19, 2024

Works really well. Excellent work! :)

  • there is no information on how to go back to the previous step. tutorial previous is missing from ui.
  • Is there a way to get a progress counter as well as the progress bar?
  • say "take harp past drum" made my brain actually say say and just typed out the command :D
  • I think I remembered a discussion about the highlights going away when the tutorial was in a incorrect state? I assume you reverted that because it isn't active now
  • unit 1 I'm not sure if that is the right way to label the different tutorials. "tutorial 1" is probably better?
  • detent this would probably be more memorable on a line with actual text on it?

@pokey
Copy link
Member Author

pokey commented Jul 19, 2024

Works really well. Excellent work! :)

thanks :)

  • say "take harp past drum" made my brain actually say say and just typed out the command :D

Should I do something about this or is this just an anecdote? 😄

  • dedent this would probably be more memorable on a line with actual text on it?

Not sure I agree. How strongly do you feel?

All other feedback addressed. If you're happy, let's merge!

@AndreasArvidsson AndreasArvidsson added this pull request to the merge queue Jul 19, 2024
Merged via the queue into main with commit d72aec3 Jul 19, 2024
15 checks passed
@AndreasArvidsson AndreasArvidsson deleted the cursorless-tutorial branch July 19, 2024 15:01
cursorless-bot pushed a commit that referenced this pull request Jul 19, 2024
<img width="773" alt="image"
src="https://github.com/user-attachments/assets/ae0d024b-a810-4eab-add5-732f1171d9ef">



## Todo

- [x] Install locally and try everything out
- [x] Try "cursorless docs" both inside and outside of VSCode
- [x] I have not broken the cheatsheet
- [x] Make it more obvious that the tutorial list is a list of all
tutorials
- [x] Change what we show when tutorial prereqs no longer met, eg
"prereqs not met, feel free to keep playing, and say resume to resume"
- [x] Add note at end of unit 1 suggesting they continue to play with
the document
- [x] Tune tutorial content. Move / add docs tip to end of first
tutorial. More stuff maybe better for follow-up PR
- [x] Point out that we're using highlights for marks in first tutorial
step
- [x] Have "tutorial exit" command and corresponding button
- [x] Add paragraph break between sentences in step
- [x] Workshop the actual text in the editor itself so that it indicates
they should look at the side bar
- [x] Make color of commands stand out more
- [x] Properly support custom actions and other necessary custom spoken
forms
- [x] Store current progress in local storage (and sync it)
- [x] Properly support custom symbol spoken forms (eg alphabet)
- [x] Add "tutorial restart"
- [x] I have added
[tests](https://www.cursorless.org/docs/contributing/test-case-recorder/)
- [x] Fix scope tree view
- [x] How to handle disabled hat color?
- [x] Figure out unicode for emoji
- [x] Figure out what "cursorless tutorial" should actually do.
Currently starts second tutorial, which is obv not what we want
- [x] Figure out how to advance from last step of initial tutorial, as
it has no action to perform
- [x] Add "tutorial next" / "tutorial previous" commands
- [x] Add tutorial step saying to use "cursorless help" cheatsheat
- [x] Fix broken references to css eg reset
- [x] Invalidate state if custom spoken forms change
- [x] Change view when we detect that prereqs are no longer met (eg
cursor in wrong place, etc). Indicate they should say "tutorial
continue" / "tutorial restore" / "cursorless tutorial" to reset the
prereqs
- [x] Merge HUD changes
- [x] Figure out how to properly detect VSCode focused
- [x] Highlight marks that need to be targeted, so user doesn't have to
search for them
- [x] Remove print statements and commented out code from `tutorial.py`
- [x] Figure out how to only run step preparation when you have the
right window focused. Some of the time @pokey gets error message after
"cursorles help" step
<img width="385" alt="image"
src="https://github.com/cursorless-dev/cursorless/assets/755842/fc9bbcbd-111c-48e0-80b5-beeed8dafaea">
- [x] Open new window on start?
- [x] Ensure you're in the right window / editor before restoring state,
so we don't accidentally clobber something
- [x] Get it to work with mainline Talon HUD
- [x] Finish constructing spoken forms from commands
- [x] Use [app
name](https://github.com/pokey/cursorless-vscode/blob/a81dd0ce5f6359482fe9afc55a47ceb142cac17d/cursorless-talon/src/tutorial.py#L17)
for VSCode that works cross-platform
- [x] Figure out what todo with the fact that the cheatsheet clobbers
the entire screen and you can't even see the close button (#619)

See also cursorless-dev/cursorless-talon#143

### Unit 2

- Python
- Have an action class?

To cover:

- [x] New scope types
- [x] New actions, including
  - [x] single argument "bring"
  - [x] multiple argument "bring"
  - [x] "move"
  - [x] "swap"
- [x] Simple inference in the context of multiple target actions such as
swap or bring

### Extra unit

- [x] Probably want to move this into a new pull request
- [x] Create a json script for it
- [x] Don't forget to add the intermediate steps where it was not a
cursorless command and so isn't recorded

## Links

### Helpful places in our code base

-
https://github.com/cursorless-dev/cursorless/blob/main/packages/cursorless-vscode-e2e/src/suite/recorded.vscode.test.ts
sets up file to initial state of tutorial step
- to generate a spoken form from the command payload in the yaml:
https://github.com/cursorless-dev/cursorless/blob/a9cc79f287a0278faf1198f9775cef6932630800/packages/cursorless-engine/src/scopeProviders/ScopeInfoProvider.ts#L95
- this is where you'll send a command to cursorless requesting it to set
up initial tutorial step state and have it return generated spoken form:
https://github.com/cursorless-dev/cursorless/pull/360/files#diff-5c1cd9d422f7c8df0325fd0958446c90873fb338c462287ef5f57606a363658bR35-R37
- registering a new command extension-side
https://github.com/cursorless-dev/cursorless/blob/a9cc79f287a0278faf1198f9775cef6932630800/packages/cursorless-vscode/src/extension.ts#L125

### In case we decided to look into VSCode walkthroughs rather than
Talon hud

-
https://code.visualstudio.com/api/references/contribution-points#contributes.walkthroughs

---------

Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Cursorless tutorial units 1 & 2
3 participants