Skip to content

fix(react-persona): Make Persona's text wrap when overflowing its container#25880

Merged
sopranopillow merged 4 commits intomicrosoft:masterfrom
sopranopillow:persona/a11y
Dec 2, 2022
Merged

fix(react-persona): Make Persona's text wrap when overflowing its container#25880
sopranopillow merged 4 commits intomicrosoft:masterfrom
sopranopillow:persona/a11y

Conversation

@sopranopillow
Copy link
Contributor

@sopranopillow sopranopillow commented Dec 2, 2022

Previous Behavior

Persona's text did not wrap when overflowing its container due to using gridAutoColumns: max-content.

New Behavior

Persona's text now wraps when overflowing its container.

Related Issue(s)

@size-auditor
Copy link

size-auditor bot commented Dec 2, 2022

Asset size changes

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

Baseline commit: e1d595b1b12066d3ef1fd7dfc71bd0a81728316e (build)

@fabricteam
Copy link
Collaborator

fabricteam commented Dec 2, 2022

📊 Bundle size report

Package & Exports Baseline (minified/GZIP) PR Change
react-persona
Persona
57.131 kB
15.951 kB
57.113 kB
15.94 kB
-18 B
-11 B
Unchanged fixtures
Package & Exports Size (minified/GZIP)
react-components
react-components: Button, FluentProvider & webLightTheme
59.018 kB
16.371 kB
react-components
react-components: Accordion, Button, FluentProvider, Image, Menu, Popover
186.456 kB
52.327 kB
react-components
react-components: FluentProvider & webLightTheme
33.48 kB
11.037 kB
react-portal-compat
PortalCompatProvider
5.857 kB
1.978 kB
🤖 This report was generated against d1c530bef46d1ddd962ee29ff8fd510475ec5c96

@fabricteam
Copy link
Collaborator

fabricteam commented Dec 2, 2022

Perf Analysis (@fluentui/react-components)

No significant results to display.

All results

Scenario Render type Master Ticks PR Ticks Iterations Status
Avatar mount 1301 1283 5000
Button mount 922 924 5000
FluentProvider mount 1495 1484 5000
FluentProviderWithTheme mount 577 596 10
FluentProviderWithTheme virtual-rerender 548 538 10
FluentProviderWithTheme virtual-rerender-with-unmount 585 568 10
MakeStyles mount 1972 1965 50000
Persona mount 2847 2814 5000
SpinButton mount 2345 2391 5000

This was referenced Dec 2, 2022
@codesandbox-ci
Copy link

codesandbox-ci bot commented Dec 2, 2022

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 40ac6e9:

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

@fabricteam
Copy link
Collaborator

fabricteam commented Dec 2, 2022

🕵 fluentuiv9 Open the Visual Regressions report to inspect the 1 screenshots

✅ There was 1 screenshots added, 0 screenshots removed, 1754 screenshots unchanged, 0 screenshots with different dimensions and 0 screenshots with visible difference.

unknown 1 screenshots
Image Name Diff(in Pixels) Image Type
Persona Converged.textWrap.normal.chromium.png 0 Added

after: {
gridAutoFlow: 'column',
justifyItems: 'start',
gridTemplateColumns: 'max-content [middle] auto',
Copy link
Contributor Author

Choose a reason for hiding this comment

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

In order for the wrap to work, the column containing the text needs to be set to auto. If it's set to max-content it will ignore the container's size.

@micahgodbolt
Copy link
Member

Can you add a VR story, or even regular story demonstrating this overflow behavior?

@sopranopillow sopranopillow requested a review from a team as a code owner December 2, 2022 21:26
@sopranopillow sopranopillow merged commit 7f4466d into microsoft:master Dec 2, 2022
@sopranopillow sopranopillow deleted the persona/a11y branch December 2, 2022 22:01
Hotell pushed a commit to Hotell/fluentui that referenced this pull request Feb 9, 2023
…tainer (microsoft#25880)

* make Persona's text wrap when overflowing

* change file

* removing gap from avatar/presence

* adding vr-test to check wrapping behavior
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Persona: Manual accessibility checklist

4 participants