Skip to content
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

web: show options forms on uibuttons w/ inputs #4879

Merged
merged 4 commits into from
Aug 25, 2021

Conversation

landism
Copy link
Member

@landism landism commented Aug 23, 2021

When a UIButton's spec defines one or more inputs:

  1. Attach a little arrow next to the button in the UI, which pops up a form allowing the user to set those inputs' values.
  2. Include those inputs' values in the UIButtonStatus when the button is clicked.

The design/flow is currently a bit awkward but probably good enough to have people play around with it. The main goal was to come up one design that'd work for all button locations for now.

Here's how it looks in the nav bar:

In table view:

In overview action bar (on resource pane):

In action:

@shortcut-integration
Copy link

This pull request has been linked to Clubhouse Story #12538: UI: allow user to see/edit text inputs.

web/src/promise.ts Show resolved Hide resolved

type ApiButtonProps = { className?: string; button: UIButton }

type ApiIconProps = { iconName?: string; iconSVG?: string }

export const ApiButtonInputsToggleButton = styled(InstrumentedButton)`
&&&& {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://styled-components.com/docs/faqs#how-can-i-override-styles-with-higher-specificity

I was on the fence about whether to comment this or relying on people learning styled components.

web/src/ApiButton.tsx Show resolved Hide resolved
web/src/ApiButton.tsx Show resolved Hide resolved
@landism landism merged commit 9f28d50 into master Aug 25, 2021
@landism landism deleted the mlandis/ch12538/ui-allow-user-to-see-edit-text-inputs branch August 25, 2021 17:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants