Description
In order to update color formats for files of different extensions the user gets prompted with the File extensions to convert
multiple times until --
option is selected.
Improvement
Instead of getting multiple prompts to select file extensions, the user should be able to select file extensions in a single session.
In order to escape this session a key press ( like a ESC key ) has to be kept in place rather than selecting --
which doesn't give much information to the user on this option being the end point for this session.
For the ESC key scenario a text message similar to [Press ESC key to end session]
can be placed at the bottom of extensions options.
Existing Flow
$ npx unhex@latest
? File extensions to convert .css
Extensions selected: .css
? File extensions to convert .jsx
Extensions selected: .css, .jsx
? File extensions to convert .scss
Extensions selected: .css, .jsx, .scss
? File extensions to convert --
Extensions selected: .css, .jsx, .scss
Proposed Flow
Case 1:
$ npx unhex@latest
? File extensions to convert
❯ *
.css
.jsx
.tsx
.scss
.svelte
.vue
[Press ESC key to end session]
Case 2:
Iteration 1: Select 1st extension
$ npx unhex@latest
? File extensions to convert
*
❯ .css
.jsx
.tsx
.scss
.svelte
.vue
Extensions selected: .css
[Press ESC key to end session]
Iteration 2: Select 2nd extension
$ npx unhex@latest
? File extensions to convert
*
.css
.jsx
❯ .tsx
.scss
.svelte
.vue
Extensions selected: .css, .tsx
[Press ESC key to end session]
Iteration 3: Press ESC key
$ npx unhex@latest
? File extensions to convert
Extensions selected: .css, .tsx
Note: I can be the assignee for this update as I find this package very useful for color scheme refactors.
enhancement good first issue