cursorless
cursorless copied to clipboard
Cursorless tutorial units 1 & 2
Initial content for a cursorless tutorial
- [ ] Properly support custom actions and other necessary custom spoken forms
- [ ] 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
- [ ] Make hat forcing more robust?
- [ ] Show pop-up on install prompting them to do the tutorial. Prob should show pop-up even not on first install?
- [ ] I have updated the docs and cheatsheet
- [ ] I have not broken the cheatsheet
- [ ] Change title of tutorial tab to something other than 'Untitled-7'
- [ ] Make it so that closing the tab doesn't result in a save dialog
- [ ] Have "tutorial exit" command and corresponding button
- [ ] Add other buttons like next/prev/list
- [ ] Make it more obvious that the tutorial list is a list of all tutorials
- [ ] Make color of commands stand out more
- [ ] 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
- [ ] Point out that we're using highlights for marks in first tutorial step
- [ ] Look into removing highlight when the tutorial prereqs no longer met
- [ ] Change what we show when tutorial prereqs no longer met, eg "prereqs not met, feel free to keep playing, and say resume to resume"
- [ ] Point out early in tutorial that you can play around and easily resume the tutorial
- [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
- [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
- [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 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 https://github.com/pokey/cursorless-talon/pull/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"
- [ ] "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
- [ ] 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
- 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
Closing until this becomes an active priority again
ok @saidelike this PR is now rebased onto latest main branch, and I removed the unnecessary generate_spoken_forms stuff. having a look at talon_hud side now. CI is failing in Python because I left the references to the functions that no longer exist; we'll want to remove those in favour of calling over to VSCode extension
Ok looks like all of the lazy walkthrough stuff from https://github.com/chaosparrot/talon_hud/compare/d2f576026a615f00ff7bc2f4e1d0d3a0d0be3158...pokey:talon_hud:lazy-walkthroughs has actually made it into the master branch on talon_hud so you should be able to just develop against that 👍
I'll let you pick it up from here, but feel free to reach out to do a pairing session / raise a flag if you get stuck
I will say, the VSCode walkthroughs thing looks kinda nice. Might be worth looking into
We should also have a quick look at Serenade tutorial, as I've heard it's one of their strongpoints
I'm really excited for this :)