Skip to content

Add prompts for the whole story #10

@Phoscur

Description

@Phoscur

Following up on #7 and some experiments in oryx-layer-inserter I created #8 with yargs, prompts & node-persist, this covers a base for better UX, adding more commands & caches, as well as merging the repos.

Combined Commandlist:

*unauthorized mode - auth is actually not needed (only layoutID)

The last three commands and potentially essential parts of the wizard cannot be run inside the browser, but they could also generate a browser snippet to set the macro key, for example. I might explore this later, so the layer-inserter will become a playground for tamper monkey scripts.

Automation as console prompts for Node.JS, initial flow:
  1. auth - prompt to get the auth token is a messy manual task, description: localStorage.getItem('jwtToken')
  2. data - provides layout & layer IDs (a bit slow for many layouts)
  3. open - create a new revision, required if the layout is to be modified (insert, set key) - manual for now
  4. wizard - guide through macro creation TODO Macro Wizard #11
  5. get (download-src) - get & unzip the keymap source TODO check open
  6. process - apply macros expansion, add stuff to the keymap.c file
  7. compile - call qmk locally
  8. flash - call or at least open Wally (Flash Command: Call Wally #12)
Most interesting "everyday" usage flow
  1. auth - needs just to be checked, the token is quite long-lived, if it timed out fall back to caches & prompts in "unauthorized" mode
  2. wizard - just skip to change a typo in a macro, or add one from a blueprint... Macro Wizard #11
  3. open - don't, just check that no open revision exists, to be ready to download - recognize unchanged
  4. download - only if the layout changed
  5. process, compile, flash & data - meanwhile processing update caches

I'd like to implement the fast path first: "new but closed revision found" - download & process - no prompts.
How important is this "unauthorized mode"? Likely depends on the usefulness of the wizard (#11) and the potential selection of new macros from a yet-to-be-created macro and layer library... (#6)

What are your thoughts about this?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions