-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Creates spec for fluent toolbar web component. #27703
Creates spec for fluent toolbar web component. #27703
Conversation
📊 Bundle size report🤖 This report was generated against cad93648a2ce28e99935d4ab36089d770fa06a53 |
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 913efdb:
|
Asset size changesSize Auditor did not detect a change in bundle size for any component! Baseline commit: cad93648a2ce28e99935d4ab36089d770fa06a53 (build) |
|
||
- [x] Fluent UI React V9 Storybook for implementation differences and document: | ||
|
||
- [Fluent React Toolbar](https://master--628d031b55e942004ac95df1.chromatic.com/?path=/docs/components-toolbar--default) has Overflow Items and corresponding More (ellipses) button. This aligns with the Fluent Toolbar spec. The FASTToolbar component however does not implement this. We could either work to include this feature or leave it up to the developer to implement. |
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.
This feature is already in the Fluent monorepo and is a vanilla JS package, there is no dependency on React at all, just simple DOM https://github.com/microsoft/fluentui/tree/master/packages/react-components/priority-overflow
That overflow feature already implements all the requirements for all Office and Teams
You can demo the feature set using the react docs, https://react.fluentui.dev/?path=/docs/components-overflow--default
Those examples are powered by the same vanilla js code, with react bindings on top https://github.com/microsoft/fluentui/tree/master/packages/react-components/react-overflow
From the feedback we have gotten from product, they see overflow as an integral feature of the toolbar component (and others) due to the fact that it is actually non-trivial to implement. We should cover this delta in the web component library, or users will see a noticeable difficulty if they ever want to move from React to web components
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.
@ling1726 Thanks for the added context! I agree. I think this should be added as part of the component.
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.
After talking about this topic with my team, I think it should be added but in a separate task. This is non-trivial and I want to do it right.
@chrisdholt Is this comprehensive enough to get started on the component? |
Create Spec for Toolbar Component
Toolbar
Component Description
A toolbar is a container for grouping a set of controls, such as buttons, menubuttons, or checkboxes.
When a set of controls is visually presented as a group, the toolbar role can be used to communicate the presence and purpose of the grouping to screen reader users. Grouping controls into toolbars can also be an effective way of reducing the number of tab stops in the keyboard interface.
Design Spec
Link to Design Spec in Figma
Link to Fluent 2 Storybook
Engineering Spec
Inputs
Outputs
Slots
CSS Variables
None
Interactions
Interactions are inherited from FAST Toolbar component.
clickHandler
focusinHandler
keydownHandler
Accessibility
Preparation
Find the base FAST Component
Check the Fluent UI React V9 Component Spec for differences and document:
Differences between FAST Toolbar component and Fluent Toolbar component spec:
ToolbarButton
,ToolbarDivider
,ToolbarGroup
,ToolbarRadioButton
,ToolbarRadioGroup
,ToolbarToggleButton
; whereas FASTToolbar does not.size
attribute that can be set to "small", "medium", or "large". FASTToolbar does not have this attribute.ToolbarItemGroup
. This looks like it is made to contain radio buttons and checkbox elements. FASTToolbar does not have this component.Fluent UI React V9 Storybook for implementation differences and document:
Fluent React Toolbar has Overflow Items and corresponding More (ellipses) button. This aligns with the Fluent Toolbar spec. The FASTToolbar component however does not implement this. We could either work to include this feature or leave it up to the developer to implement.
Open GitHub issues related to component
Component Spec authored