Comments (7)
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.
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)
- Improvement: Raspberry Pi OS support HOT 1
- Mention the docs folder in the readme HOT 2
- Docs: mention mount-helper
- Installation errors in supported shell in host shells in Termux and within guest shells within proot-distro aliases in Termux HOT 2
- 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
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.