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

Add prompts for the whole story #10

Open
Phoscur opened this issue May 13, 2023 · 0 comments
Open

Add prompts for the whole story #10

Phoscur opened this issue May 13, 2023 · 0 comments
Assignees

Comments

@Phoscur
Copy link
Owner

Phoscur commented May 13, 2023

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?

@Phoscur Phoscur mentioned this issue May 13, 2023
@Phoscur Phoscur self-assigned this May 13, 2023
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

1 participant