Comments (8)
Current preview of latest functionality in this WIP:
- fuzzy defaults, selections, multi-select
- paging header, footer, and visible bars
- confirm menu and cancel menu
- page up and down, home and end
CleanShot.2024-06-12.at.19.51.49.mp4
from dorothy.
Today's changes also:
- hides cursor while the menu is showing, so it doesn't look like a key
- renders keys incrementally until no more would fit, and if none fit, no legend
- will work with no color mode
- echo-style no longer fails if a style wasn't defined, unless --debug
Remaining todos:
- Trigger a bell when render menu sanity check fails
- Experiment with line breaking multiline legend
- Fix pr ci, seems it needs a fetch before the checkout
- Move echo-segment and echo-element to beta commands now that they are deprecated and their changesets published
- Check the menu title still is correct
- Check single mode has sensible bar and title hints
- Run linting
- Integration tests
- Update unit tests
- Update all documentation references
- Document all changes and do a video
- Merge to master
- Resume work on dorothy-new
from dorothy.
So this was done during my trip to Bali in April, and I'm now fixing up the tests. Updates were posted to the discord server.
One issue is that I removed filter functionality in favour of a new --default-fuzzy=
option, however that causes echo-checksum --algorithm=sha
to fail currently as it does not support multiple defaults with the default --no-multi
behaviour.
As such, after some prototyping and discussion with @molleweide I'll go with the last option in this brainstorm below, which introduces the idea of preferences:
Which ones?
▣ a
▣ aa
> ▣ aaa
□ b
SELECT [SPACE] CONFIRM [ENTER] [E] CANCEL [ESC] [Q] UP [↑] [W] [K] DOWN [↓] [S] [J] FIRST [HOME] [A] LAST [END] [D] ALL/NONE [T]
4 ITEMS, 4 SELECTED, 3 PREFERENCES | NEXT [A] PRIOR [D] RESET [Z] NONE [T]
Which one?
> ◉ a
☉ aa
○ b
○ b
○ b
○ b
☉ aaa
○ b
SELECT [SPACE] [ENTER] [E] CANCEL [ESC] [Q] UP [↑] [W] [K] DOWN [↓] [S] [J] FIRST [HOME] [A] LAST [END] [D] SEARCH [/]
9 ITEMS, 1 SELECTED, 3 PREFERENCES, 5 CONCEALED | NEXT [A] PRIOR [D] RESET [Z] ALL/NONE [T]
/ SEARCHING FOR: > sha
Which one?
[ 5 items above ]
> ◉ a
☉ aa
○ b
○ b
○ b
○ b
☉ aaa
○ b
[ 1 item below ]
SELECT [SPACE] [ENTER] [E] CANCEL [ESC] [Q] UP [↑] [W] [K] DOWN [↓] [S] [J] FIRST [HOME] [A] LAST [END] [D] NEXT [A] PRIOR [D] RESET [Z]
from dorothy.
Progress is going well. There's a lot of new functionality added and I believe it will be significantly more usable now. Nearly there.
from dorothy.
Verified the new styling makes sense with @molleweide, who also gave a good suggestion that I'll experiment with: a complete legend toggle.
The remaining todos are:
- fix a paging edge case (yes it has support for page jumping now)
- implement the new confirm styling (the interactions are already done)
- experiment with the legend suggestion
- implement a smart confirm default if a selection is on another page
- consider a confirm hotkey to enforce a confirm
All up, I think everyone is going to be really ecstatic with the new choose
command.
from dorothy.
Made great progress on this with @molleweide, only trivial things remaining.
from dorothy.
Preview of the upcoming styles for:
choose-path 'Which one?' 'Your selection is important' --confirm --multi --default-fuzzy=echo -- "$DOROTHY/commands/"*
The prior version of this:
choose-path --question=$'Which one?\nIt is important' --multi --confirm --filter=echo- -- "$DOROTHY/commands/"*
Doesn't actually support fuzzy default matching, and is so slow on my macbook pro 2017 model that it takes about a minute to load... with the confirm and filter functionality being an unintuitive mess...
edit: more improvements have been made since above screenshots
from dorothy.
Remaining todos:
- improve paging iteration
- light mode theme compat
- tests for the changes
- as the legend size will always be the same as the content is always the same, cache each legend item size, and keep adding until fill - extras still needed as need to seperate from essentials that will go on multiple lines if not enough horizontal space - however not sure what happens if also not enough vertical space - should it truncate, or hide
- disable page header and footer if not enough vertical size
- Truncate page header and footer if not enough horizontal size, to keep it to a single line
- Consider truncating legend
- cancel menu different than confirm menu
- "Choose one of" for non-multi
from dorothy.
Related Issues (20)
- Install error command not found on Intel Mac HOT 4
- mount-helper: fail if doing user mount on root target
- Question: Dorothy and Dotly integration? HOT 6
- Bug: `sources/ssh.nu` syntax error HOT 1
- Trouble installing dorothy on Ubuntu 22.04.3 LTS HOT 5
- Login shell restriction HOT 6
- Suggestion: simplify setup-dns
- Bug: `interactive.sh` is loaded even when `interactive.fish` exists HOT 4
- Suggestion: setup-util support for streamlined {bin,man,lib,etc} extraction HOT 4
- Bug: Dorothy sets CC to '' HOT 1
- Suggestion: Use the GitHub or GitLab CLI to setup the user repository
- Suggestion: Cross-shell aliases HOT 2
- Suggestion: ask: `--password` should use `read --silent` with a confirm password prompt HOT 2
- syntax error near unexpected token `) HOT 2
- Suggestion: choose: inline rendering by default
- Suggestion: have tty.bash trigger tty_clear on alt tty establishment
- Suggestion: merge `echo-element` and `echo-segment` into `echo-style` HOT 3
- Non-root install process could be improved HOT 8
- Improvement: install Homebrew fallback is noisey, needs to be in an alt TTY
- Bug: crashes in `setup-environment-commands` due to misbehaving ecosystems causes `sources/environment.*` to be empty HOT 11
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dorothy.