-
Notifications
You must be signed in to change notification settings - Fork 134
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
NewFilePicker().Height seems to be ignored and filepicker overtakes containing form #470
Comments
EDIT: Sorry, just noticed this might be related to 9eaf750. The bug report above is for the latest source code (not the latest binary), which includes the commit above. I realize now that this feature might still be WIP, but I'll leave the bug report here in case it's helpful. (This might also be why I thought it was working differently a few days ago.) |
Just an update on this - the issue here is that when the filepicker's "open" command is used, the field is zoomed which ignores manual height settings. Here's a patch that fixes your issue while maintaining compatibility for auto-sizing if there is no height set (key for Gum). Only thing is that for some reason the number of items shown is off by one from the provided height... Can debug that one more. Wasn't an issue with custom heights in the latest release of Gum 🤔 To explain the change in english:
|
Describe the bug
NewFilePicker().Picking(false).Height(*someInt*)
orNewFilePicker().Picking(false)
(no height set) orNewFilePicker().Height(*someInt*)
, the file picker expands (when activated) to the height of its container group or form. It also opens in a "new screen" rather than existing in place in its containing form. See screenshot below.NewFilePicker().Picking(true).Height(*someInt*) or
NewFilePicker().Picking(true)` (no height set), the returned height is always the full terminal height. It also opens in a "new screen" rather than existing in place in its containing form. See screenshot below.To Reproduce
Steps to reproduce the behavior:
Picking
is false:Picking
is true:(Code is same as above but with the addition of
Picking(true).
afterhuh.NewFilePicker().
.)Screenshots
Picking
is false:When activated, the filepicker is displayed in a new screen that is the same height as its containing form or group.
Picking
is true:When the form is displayed, the filepicker automatically overtakes the form and displays in a new screen that is the entire height of the terminal.
Expected behavior
Select
. This would be my preference.Height()
to impact the rendering height of the filepicker (again, in place on the form if possible).Desktop (please complete the following information):
Additional context
I feel like I've seen the filepicker work as expected in this version of
huh
, so I wonder if there's some additional aspect that's causing this behavior such its containing group or form.The text was updated successfully, but these errors were encountered: