-
Notifications
You must be signed in to change notification settings - Fork 361
Fixes #5907: Add modal popup option for ui_button inputs #6620
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
base: master
Are you sure you want to change the base?
Conversation
Test Tiltfile
|
hello! thanks for the contribution! i have a high-level question -- should we just make the new dialog the default behavior? i'm not sure i see a strong case for making it an option if we think the dialog is better. |
My motivation in doing like this is because I'm a big fan of keeping backwards compatibility. |
Signed-off-by: Hector Garcia <[email protected]>
eb217fc
to
02a919e
Compare
I just forced push to fix my email and sign-off the commit message |
let's get rid of if we think the modal is the better UI, let's just replace the dropdown -- i don't see a good reason to make it an option |
Signed-off-by: Hector Garcia <[email protected]>
Ok. Done. Replaced dropdown with modal. Much simpler PR |
Summary
This PR adds support for displaying ui_button inputs in a modal dialog instead of the traditional dropdown by adding a new
show_inputs_as_modal
parameter tov1alpha1.ui_button()
.Fixes
Fixes #5907
Changes Made
Backend Changes
Added
ShowInputsAsModal
field topkg/apis/core/v1alpha1/uibutton_types.go
Updated Starlark API in
internal/tiltfile/v1alpha1/types.go
show_inputs_as_modal
parameter toui_button()
functionfalse
)Frontend Changes
New Modal Component (
web/src/ApiButtonInputModal.tsx
)Updated ApiButton Logic (
web/src/ApiButton.tsx
)showInputsAsModal
flag and displays modal instead of dropdownfalse
or unsetComprehensive Tests (
web/src/ApiButtonInputModal.test.tsx
)Auto-Generated Files
pkg/apis/core/v1alpha1/generated.proto
(viamake update-codegen-go
)make update-codegen-starlark
)Usage Example