-
Notifications
You must be signed in to change notification settings - Fork 445
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
Rethink [confirm]
component theme configuration
#2034
Comments
If the user wants to cancel the confirmation, i.e. choose This requires two steps. Why not just press What's the point of adding an activation state switch? What problem does it solve?
You're right, it should be in |
I think the primary point of confusion is that the confirm component seems to be doing two things. It's acting like a y/n prompt, while looking like it has multiple options. For example, if I change the button labels to True and False, I assume I would still need to do y/n, despite that not matching the labels. Especially with the default theme styling which inverts the yes option, it looks like it should be toggleable. Maybe removing the invert would help clarify? |
If you change the button labels to True and False, then you should also change the keys to t and f; it's entirely up to you: yazi/yazi-config/preset/keymap-default.toml Lines 304 to 305 in c78f39b
The inversion was added to let the user know what the default behavior is. It's more of a safety measure, not necessarily indicating that it can actually be toggled. |
Gotcha. Maybe make it bold then so it looks less like a button? |
I thought about it again, and I think it's fine for For example, users can remove spaces from the default content to make the button more compact: yazi/yazi-config/preset/theme-light.toml Line 126 in c78f39b
That means the existing yazi/yazi-config/preset/yazi-default.toml Lines 146 to 210 in c78f39b
The reason they were previously placed in If they added custom styles for these components in |
Added to v0.5 todo list since it requires breaking changes |
Please describe the problem you're trying to solve
Rename
btn_yes
andbtn_no
tobtn_active
andbtn_inactive
, and support toggling between the confirm actions ("yes" and "no") with the Tab key or arrows keys.btn_labels
option also probably shouldn't be at the theme level, as it doesn't have much to do with colors and such. Looks like there is already a[confirm]
section in yazi.toml that it can go under.Checklist
The text was updated successfully, but these errors were encountered: