-
Notifications
You must be signed in to change notification settings - Fork 586
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
feat: [draft] add split button spec #4083
Conversation
Can we take the w3c naming |
Slight nuance here. Split button includes a menu button but is not exclusively a menu button. Split button has essentially two buttons, one being a menu button and one being a standard button. |
I think if the menu always has to be included and is a w3c spec, we can make the "standard" button optional, that way we can rename this to |
I like this idea - thoughts @brookdozer ? |
@chrisdholt and @janechu, I'd be more inclined to create a separate Do folks already use |
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Just checking in to see if you are ready for another round of reviews @brookdozer or if you are still in process on the current feedback. Thanks! |
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.
Overall I wonder about the general composition of the component dependencies as well as the conveyance of the properties when composed. Somethings come to mind when using the Github review UI:
Would there ever be a circumstance where we'd have a much more complex pop-over? If so, we should consider how can provide support for this level of complex UI.
@@ -0,0 +1,220 @@ | |||
# Split Button | |||
|
|||
This is the working branch for the `split-button` component spec. It is still in development and implementation details are rough but should be ready for high-level feedback and discussion. |
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 think we can frame this to be more declarative and let the "draft" status communicate it being "WIP".
|
||
## Overview | ||
|
||
A `fast-split-button` is a primary action button and a collection of related action buttons. The primary button is shown and the related buttons are hidden in a menu. It takes takes two forms: |
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'm not sure if this pattern should inherently include a fly-out. The fly-out could be its own component altogether. If this is a pattern that always includes a fly-out, then perhaps it should be name something else.
- The menu should allow for horizontal or vertical layout | ||
- Works with mouse, touch or keyboard navigation | ||
- Mouse: | ||
- Hover on `split-button` container **may** show the related actions or may show a Down Arrow |
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.
How is this decided?
|
||
*Slots:* | ||
- `primary-button` - the primary action button | ||
- `expand-glyph` - glyph that indicates the select is expandable, often a downward chevron |
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.
Naming needs to be considered for this slot.
*Slots:* | ||
- `primary-button` - the primary action button | ||
- `expand-glyph` - glyph that indicates the select is expandable, often a downward chevron | ||
- `related-buttons` - collection of buttons that will be displayed in the popover menu |
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.
Will the pop-over only ever display buttons?
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.
Great question. It seems like it should only ever be buttons in a split button pop-over, but I could be wrong. Maybe a divider?
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.
|
||
![image of a split button from Microsoft Teams](images/split-button_example_Teams.png) | ||
|
||
2. **Stateful split button**: a button and popover as seen here in Facebook's "Like" button: |
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.
What do we technically mean by the component being "stateful".
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.
A stateful split button is one that stores state, similar to a "like" button. The opposite would be a similar to the email "Send | Send Later" button.
This one's very old. @chrisdholt What would you like to do with it? |
Per @janechu's comments above on "menu button", I think we'll close this and pick it up in coordination with that component, requested in #5469. My initial thought on accomplishing the split button would be slotting a button in the start or end slot. |
Description
Adds a specification for split button web component
Motivation & context
FAST needs a spec for a split button web component both for parity with Fluent and with other design systems.
ASKs:
Issue type checklist
Is this a breaking change?
Adding or modifying component(s) in
@microsoft/fast-components
checklistProcess & policy checklist