-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
fix (v8 MessageBar): Add showExpandButton prop to allow manual override to explicitly show the expand button #32884
base: master
Are you sure you want to change the base?
fix (v8 MessageBar): Add showExpandButton prop to allow manual override to explicitly show the expand button #32884
Conversation
📊 Bundle size reportUnchanged fixtures
|
packages/react-examples/src/react/MessageBar/MessageBar.Basic.Example.tsx
Show resolved
Hide resolved
Perf Analysis (
|
Scenario | Render type | Master Ticks | PR Ticks | Iterations | Status |
---|---|---|---|---|---|
BaseButton | mount | 634 | 614 | 5000 | |
Breadcrumb | mount | 1712 | 1688 | 1000 | |
Checkbox | mount | 1709 | 1743 | 5000 | |
CheckboxBase | mount | 1475 | 1504 | 5000 | |
ChoiceGroup | mount | 2969 | 2957 | 5000 | |
ComboBox | mount | 684 | 694 | 1000 | |
CommandBar | mount | 6661 | 6714 | 1000 | |
ContextualMenu | mount | 13878 | 14707 | 1000 | |
DefaultButton | mount | 812 | 793 | 5000 | |
DetailsRow | mount | 2205 | 2247 | 5000 | |
DetailsRowFast | mount | 2224 | 2213 | 5000 | |
DetailsRowNoStyles | mount | 2044 | 2039 | 5000 | |
Dialog | mount | 2854 | 2748 | 1000 | |
DocumentCardTitle | mount | 220 | 232 | 1000 | |
Dropdown | mount | 2012 | 2019 | 5000 | |
FocusTrapZone | mount | 1155 | 1166 | 5000 | |
FocusZone | mount | 1071 | 1083 | 5000 | |
GroupedList | mount | 43241 | 43479 | 2 | |
GroupedList | virtual-rerender | 20522 | 20710 | 2 | |
GroupedList | virtual-rerender-with-unmount | 52640 | 52694 | 2 | |
GroupedListV2 | mount | 234 | 239 | 2 | |
GroupedListV2 | virtual-rerender | 213 | 221 | 2 | |
GroupedListV2 | virtual-rerender-with-unmount | 247 | 237 | 2 | |
IconButton | mount | 1149 | 1163 | 5000 | |
Label | mount | 348 | 347 | 5000 | |
Layer | mount | 2773 | 2725 | 5000 | |
Link | mount | 405 | 393 | 5000 | |
MenuButton | mount | 967 | 1002 | 5000 | |
MessageBar | mount | 21491 | 21579 | 5000 | |
Nav | mount | 2061 | 2060 | 1000 | |
OverflowSet | mount | 842 | 790 | 5000 | |
Panel | mount | 1887 | 1843 | 1000 | |
Persona | mount | 724 | 762 | 1000 | |
Pivot | mount | 931 | 903 | 1000 | |
PrimaryButton | mount | 919 | 937 | 5000 | |
Rating | mount | 4622 | 4638 | 5000 | |
SearchBox | mount | 923 | 926 | 5000 | |
Shimmer | mount | 1860 | 1948 | 5000 | |
Slider | mount | 1346 | 1313 | 5000 | |
SpinButton | mount | 2982 | 2986 | 5000 | |
Spinner | mount | 401 | 411 | 5000 | |
SplitButton | mount | 1848 | 1873 | 5000 | |
Stack | mount | 429 | 417 | 5000 | |
StackWithIntrinsicChildren | mount | 876 | 866 | 5000 | |
StackWithTextChildren | mount | 2784 | 2736 | 5000 | |
SwatchColorPicker | mount | 6409 | 6318 | 5000 | |
TagPicker | mount | 1488 | 1444 | 5000 | |
Text | mount | 390 | 390 | 5000 | |
TextField | mount | 942 | 923 | 5000 | |
ThemeProvider | mount | 862 | 841 | 5000 | |
ThemeProvider | virtual-rerender | 590 | 584 | 5000 | |
ThemeProvider | virtual-rerender-with-unmount | 1301 | 1310 | 5000 | |
Toggle | mount | 604 | 605 | 5000 | |
buttonNative | mount | 195 | 191 | 5000 |
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.
The change looks great to me! I do like having that clone/width check in the example to point folks to, thanks for making it 😊
Left just some small/nitpicky comments, the substantive logic looks good 👍
); | ||
} | ||
|
||
window.onresize = onResize; |
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.
two small tweaks to how the resize handler is added to window:
- this should probably be in a
useEffect
with a cleanup that removes it - instead of the global window, you should be able to get it more safely from
useWindow
from@fluentui/react-window-provider
Co-authored-by: Sarah Higley <[email protected]>
Previous Behavior
v8 MessageBar with actions will truncate at high zooms.
New Behavior
By setting the showExpandButton prop, the v8 MessageBar can expand to show truncated content even with actions.
Related Issue(s)