-
Notifications
You must be signed in to change notification settings - Fork 90
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
Context Menu improvements; Select menu, Edit menu #1102
Conversation
|
Another thing I noticed... it's very hard to distinguish required and optional settings. Required settings should come first and maybe even be distinct from optional ones (not sure how exactly). |
since the popup shows the entire message now
Such that user can specify paths to ghc or installed version not managed by ghcup
Ok, I have moved required fields to first. The simplest way to indicate the required fields is to mention them in the help message like this.
Fixed
I have included additional fields to input them, as the UI gets considerably complex to support it via custom widgets. |
Most HTML UI uses an asterisk (
I'm not too excited about additional fields UX wise, because now it's not clear that those are "either or". What does it take to implement a composite field that allows a drop-down + just a string? |
Ok makes sense. It is a bit complicated to do it the way other editable fields are handled, as the nesting of menu fields is tricky, but I did it the following style which avoids an additional overlay to edit the field's text. Does this look ok? |
Yeah. I'd actually make the input field the first and is it possible to have a "value" for it when it's not selected, which could indicate that it is a custom input field? |
…-ghc Plus some minor modifications of help / error text messages
Done.
In the case of compile GHC and HLS menus there is currently only one required field, so I think the current design where we show an error in red if the field is empty is a fine UI. Also note that the gif I generated above doesn't show the help messages properly, but on my terminal I can see them quite clearly. Like the "Required fields: bootstrap-ghc" text. |
to allow entering 'q', only handle Enter, Up and Down keys for navigation.
I have done more changes to address #1101
|
lib-tui/GHCup/Brick/App.hs
Outdated
|
||
-- | Passes all events to innerHandler if an overlay is opened | ||
-- else handles the exitKey and Enter key for the Menu's "OkButton" | ||
menuWithOverlayHandler |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have a lot of formatting requirements, but ::
on the next line is a no-no, because it breaks grepping.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
The PR is too big for me to review/digest in time, especially since I'm not familiar anymore with large parts of the TUI. The functionality is fine afais. |
This includes a number of improvements like
The help message an error message are also shown as the user types.
With this change it will be possible to use the user's keybindings in the advance popup's navigation. @lsmor