Skip to content

Comments

feat: implement auto reflow for MessageBar layouts#29328

Merged
ling1726 merged 20 commits intomicrosoft:masterfrom
ling1726:react-message-bar/feat/auto-reflow
Sep 29, 2023
Merged

feat: implement auto reflow for MessageBar layouts#29328
ling1726 merged 20 commits intomicrosoft:masterfrom
ling1726:react-message-bar/feat/auto-reflow

Conversation

@ling1726
Copy link
Contributor

@ling1726 ling1726 commented Sep 28, 2023

Implements automatic reflow logic under the new layout option auto. This will switch between singleline and multiline layouts based on single line content overflow. According to the design spec, when the message content of the MessageBar wraps to a second line multiline layout should always be used

The reflow is handled by a resize observer and setting white-space: nowrap on the MessageBar to detect content overflow when the resize container observes events
auto reflow

Addresses: #22579

@ling1726 ling1726 changed the title React message bar/feat/auto reflow feat: implement auto reflow for MessageBar layouts Sep 28, 2023
@fabricteam
Copy link
Collaborator

fabricteam commented Sep 28, 2023

📊 Bundle size report

🤖 This report was generated against b5f4971b4b04d5a02983ec472c4cc565ebd98d80

@fabricteam
Copy link
Collaborator

Perf Analysis (@fluentui/react-components)

No significant results to display.

All results

Scenario Render type Master Ticks PR Ticks Iterations Status
Avatar mount 649 619 5000
Button mount 320 316 5000
Field mount 1086 1079 5000
FluentProvider mount 692 709 5000
FluentProviderWithTheme mount 73 86 10
FluentProviderWithTheme virtual-rerender 63 60 10
FluentProviderWithTheme virtual-rerender-with-unmount 69 71 10
InfoButton mount 10 16 5000
MakeStyles mount 861 856 50000
Persona mount 1719 1703 5000
SpinButton mount 1342 1354 5000

@codesandbox-ci
Copy link

codesandbox-ci bot commented Sep 28, 2023

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 7ccaa4f:

Sandbox Source
@fluentui/react 8 starter Configuration
@fluentui/react-components 9 starter Configuration

@fabricteam
Copy link
Collaborator

🕵 fluentuiv9 No visual regressions between this PR and main

@ling1726 ling1726 marked this pull request as ready for review September 28, 2023 20:44
@ling1726 ling1726 requested a review from a team as a code owner September 28, 2023 20:44
@size-auditor
Copy link

size-auditor bot commented Sep 28, 2023

Asset size changes

Size Auditor did not detect a change in bundle size for any component!

Baseline commit: b5f4971b4b04d5a02983ec472c4cc565ebd98d80 (build)

@ling1726 ling1726 merged commit f1e96a1 into microsoft:master Sep 29, 2023
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.

3 participants