Skip to content

V9 Button Focus: Move border width increase to inset#28705

Merged
Mitch-At-Work merged 1 commit intomicrosoft:masterfrom
Mitch-At-Work:user/mifraser/v9-button-bounding-focus
Oct 3, 2023
Merged

V9 Button Focus: Move border width increase to inset#28705
Mitch-At-Work merged 1 commit intomicrosoft:masterfrom
Mitch-At-Work:user/mifraser/v9-button-bounding-focus

Conversation

@Mitch-At-Work
Copy link
Contributor

Previous Behavior

Our focus behavior on buttons causes an increase in the buttons borderWidth.
While this increase is intentional design, it overflows the bounding box and can cause overlap with other items (i.e. grids)
Should have the border width increase inset so that it ensures there is no pixels outside the components bounding box.

New Behavior

Border width still increase on focus, however it now uses an inset shadow box to place additional width on internal side.

Related Issue(s)

  • Fixes #

@fabricteam
Copy link
Collaborator

fabricteam commented Aug 1, 2023

Perf Analysis (@fluentui/react-components)

No significant results to display.

All results

Scenario Render type Master Ticks PR Ticks Iterations Status
Avatar mount 645 626 5000
Button mount 301 312 5000
Field mount 1144 1130 5000
FluentProvider mount 700 711 5000
FluentProviderWithTheme mount 79 85 10
FluentProviderWithTheme virtual-rerender 64 68 10
FluentProviderWithTheme virtual-rerender-with-unmount 75 74 10
InfoButton mount 5 16 5000
MakeStyles mount 854 855 50000
Persona mount 1765 1674 5000
SpinButton mount 1298 1391 5000

@codesandbox-ci
Copy link

codesandbox-ci bot commented Aug 1, 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 e199ac9:

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

@fabricteam
Copy link
Collaborator

fabricteam commented Aug 1, 2023

📊 Bundle size report

Package & Exports Baseline (minified/GZIP) PR Change
react-alert
Alert
83.657 kB
22.915 kB
82.802 kB
22.988 kB
-855 B
73 B
react-button
Button
39.444 kB
10.738 kB
38.589 kB
10.825 kB
-855 B
87 B
react-button
CompoundButton
46.799 kB
12.233 kB
45.944 kB
12.32 kB
-855 B
87 B
react-button
MenuButton
44.218 kB
12.12 kB
43.363 kB
12.209 kB
-855 B
89 B
react-button
SplitButton
52.232 kB
13.705 kB
51.377 kB
13.789 kB
-855 B
84 B
react-button
ToggleButton
56.49 kB
12.641 kB
55.635 kB
12.729 kB
-855 B
88 B
react-components
react-components: Button, FluentProvider & webLightTheme
69.227 kB
19.584 kB
68.372 kB
19.668 kB
-855 B
84 B
react-components
react-components: Accordion, Button, FluentProvider, Image, Menu, Popover
206.783 kB
59.085 kB
205.928 kB
59.155 kB
-855 B
70 B
Unchanged fixtures
Package & Exports Size (minified/GZIP)
react-card
Card - All
91.484 kB
26.485 kB
react-card
Card
86.31 kB
24.946 kB
react-card
CardFooter
12.074 kB
5.034 kB
react-card
CardHeader
14.323 kB
5.8 kB
react-card
CardPreview
13.031 kB
5.404 kB
react-components
react-components: FluentProvider & webLightTheme
40.793 kB
13.521 kB
react-portal-compat
PortalCompatProvider
6.503 kB
2.22 kB
🤖 This report was generated against 52bc6071bcd33f085c45c5cfd25cc639be8e57fa

@size-auditor
Copy link

size-auditor bot commented Aug 1, 2023

Asset size changes

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

Baseline commit: 52bc6071bcd33f085c45c5cfd25cc639be8e57fa (build)

@fabricteam
Copy link
Collaborator

fabricteam commented Aug 1, 2023

🕵 fluentuiv9 No visual regressions between this PR and main

@Mitch-At-Work Mitch-At-Work marked this pull request as ready for review August 2, 2023 17:38
@Mitch-At-Work Mitch-At-Work requested review from a team and khmakoto as code owners August 2, 2023 17:38
@Mitch-At-Work
Copy link
Contributor Author

Here is some examples of where the bleed occurred, design of border thickness has not changed, but it is now moved to be internal:
image
image

@Mitch-At-Work Mitch-At-Work force-pushed the user/mifraser/v9-button-bounding-focus branch from 51cf03c to e199ac9 Compare October 3, 2023 16:54
@Mitch-At-Work Mitch-At-Work merged commit 764314f into microsoft:master Oct 3, 2023
marcosmoura added a commit to marcosmoura/fluentui that referenced this pull request Oct 4, 2023
* master: (35 commits)
  bugfix(react-dialog): removes context hooks invocations from styles hook (microsoft#29396)
  chore(react-dialog): exports DialogSurface context types and hooks (microsoft#29397)
  Minimum height feature for bar chart (microsoft#29359)
  (feat) Breadcrumb - register items via context (microsoft#29393)
  fix: Consider all parents as scroll parents (microsoft#29378)
  Changes to enable charting on fluent docsite (microsoft#29210)
  bugfix: ensure TreeItem emits events properly (microsoft#29390)
  chore(deps): bump get-func-name from 2.0.0 to 2.0.2 (microsoft#29320)
  chore: migrate from getNativeElementProps to getIntrinsicElementProps (microsoft#29387)
  applying package updates
  applying package updates
  fix: Icon in disabled Button shouldn't change color on hover or pressed (microsoft#29342)
  Squish changes for rebase (microsoft#28705)
  fix: GroupedListV2 scrollToIndex now works correctly (microsoft#29332)
  Fix 27482: ProgressBar has an optional state variable  (microsoft#29366)
  remove a11y test ux from theme designer (microsoft#29379)
  feat: preview release (microsoft#29377)
  Fixed divider in the tooltip (microsoft#29357)
  fix (microsoft#29376)
  docs: Initial documentation pass (microsoft#29372)
  ...
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