Skip to content

Conversation

@micahgodbolt
Copy link
Member

Fixes #24578

before

image

after

MicrosoftTeams-image

MicrosoftTeams-image (1)

@codesandbox-ci
Copy link

codesandbox-ci bot commented Aug 30, 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 e11c64c:

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

@size-auditor
Copy link

size-auditor bot commented Aug 30, 2022

Asset size changes

Project Bundle Baseline Size New Size Difference
office-ui-fabric-react fluentui-react-Pickers 278.119 kB 278.331 kB ExceedsBaseline     212 bytes
office-ui-fabric-react fluentui-react-DetailsList 221.756 kB 221.805 kB ExceedsBaseline     49 bytes
office-ui-fabric-react fluentui-react-Facepile 199.232 kB 199.281 kB ExceedsBaseline     49 bytes
office-ui-fabric-react fluentui-react-Rating 77.343 kB 77.392 kB ExceedsBaseline     49 bytes
office-ui-fabric-react fluentui-react-Pivot 178.088 kB 178.137 kB ExceedsBaseline     49 bytes
office-ui-fabric-react fluentui-react-Panel 188.235 kB 188.284 kB ExceedsBaseline     49 bytes
office-ui-fabric-react fluentui-react-Nav 177.258 kB 177.307 kB ExceedsBaseline     49 bytes
office-ui-fabric-react fluentui-react-Breadcrumb 189.268 kB 189.317 kB ExceedsBaseline     49 bytes
office-ui-fabric-react fluentui-react-GroupedList 122.016 kB 122.065 kB ExceedsBaseline     49 bytes
office-ui-fabric-react fluentui-react-Grid 169.949 kB 169.998 kB ExceedsBaseline     49 bytes
office-ui-fabric-react fluentui-react-FloatingPicker 229.482 kB 229.531 kB ExceedsBaseline     49 bytes
office-ui-fabric-react fluentui-react-Dropdown 220.136 kB 220.185 kB ExceedsBaseline     49 bytes
office-ui-fabric-react fluentui-react-SelectedItemsList 219.887 kB 219.936 kB ExceedsBaseline     49 bytes
office-ui-fabric-react fluentui-react-DocumentCard 204.534 kB 204.583 kB ExceedsBaseline     49 bytes
office-ui-fabric-react fluentui-react-Dialog 198.438 kB 198.487 kB ExceedsBaseline     49 bytes
office-ui-fabric-react fluentui-react-DatePicker 175.103 kB 175.152 kB ExceedsBaseline     49 bytes
office-ui-fabric-react fluentui-react-ContextualMenu 145.456 kB 145.505 kB ExceedsBaseline     49 bytes
office-ui-fabric-react fluentui-react-CommandBar 190.332 kB 190.381 kB ExceedsBaseline     49 bytes
office-ui-fabric-react fluentui-react-ComboBox 236.458 kB 236.507 kB ExceedsBaseline     49 bytes
office-ui-fabric-react fluentui-react-ColorPicker 123.762 kB 123.811 kB ExceedsBaseline     49 bytes
office-ui-fabric-react fluentui-react-Calendar 116.457 kB 116.506 kB ExceedsBaseline     49 bytes
office-ui-fabric-react fluentui-react-ButtonGrid 169.949 kB 169.998 kB ExceedsBaseline     49 bytes
office-ui-fabric-react fluentui-react-SearchBox 176.763 kB 176.812 kB ExceedsBaseline     49 bytes
office-ui-fabric-react fluentui-react-MessageBar 177.805 kB 177.854 kB ExceedsBaseline     49 bytes
office-ui-fabric-react fluentui-react-Button 184.009 kB 184.058 kB ExceedsBaseline     49 bytes
office-ui-fabric-react fluentui-react-ShimmeredDetailsList 232.247 kB 232.296 kB ExceedsBaseline     49 bytes
office-ui-fabric-react fluentui-react-TextField 77.319 kB 77.368 kB ExceedsBaseline     49 bytes
office-ui-fabric-react fluentui-react-Slider 53.904 kB 53.953 kB ExceedsBaseline     49 bytes
office-ui-fabric-react fluentui-react-TimePicker 225.6 kB 225.649 kB ExceedsBaseline     49 bytes
office-ui-fabric-react fluentui-react-Toggle 43.491 kB 43.54 kB ExceedsBaseline     49 bytes
office-ui-fabric-react fluentui-react-TeachingBubble 192.942 kB 192.991 kB ExceedsBaseline     49 bytes
office-ui-fabric-react fluentui-react-SwatchColorPicker 179.641 kB 179.69 kB ExceedsBaseline     49 bytes
office-ui-fabric-react fluentui-react-Styling 43.607 kB 43.656 kB ExceedsBaseline     49 bytes
office-ui-fabric-react fluentui-react-WeeklyDayPicker 96.867 kB 96.916 kB ExceedsBaseline     49 bytes
office-ui-fabric-react fluentui-react-SpinButton 180.661 kB 180.71 kB ExceedsBaseline     49 bytes

ExceedsTolerance Over Tolerance (1024 B) ExceedsBaseline Over Baseline BelowBaseline Below Baseline New New Deleted  Removed 1 kB = 1000 B

Baseline commit: 0174dfc96d5ea925268fb3f51efaa6373ecabcc6 (build)

@fabricteam
Copy link
Collaborator

fabricteam commented Aug 30, 2022

📊 Bundle size report

🤖 This report was generated against 0174dfc96d5ea925268fb3f51efaa6373ecabcc6

@fabricteam
Copy link
Collaborator

fabricteam commented Aug 30, 2022

Perf Analysis (@fluentui/react)

No significant results to display.

All results

Scenario Render type Master Ticks PR Ticks Iterations Status
BaseButton mount 767 766 5000
Breadcrumb mount 2474 2429 1000
Checkbox mount 2222 2214 5000
CheckboxBase mount 1916 1938 5000
ChoiceGroup mount 3956 3953 5000
ComboBox mount 826 813 1000
CommandBar mount 9017 9067 1000
ContextualMenu mount 10426 10460 1000
DefaultButton mount 949 971 5000
DetailsRow mount 3220 3285 5000
DetailsRowFast mount 3247 3252 5000
DetailsRowNoStyles mount 3103 3101 5000
Dialog mount 2661 2685 1000
DocumentCardTitle mount 155 146 1000
Dropdown mount 2849 2817 5000
FocusTrapZone mount 1616 1622 5000
FocusZone mount 1550 1555 5000
IconButton mount 1497 1484 5000
Label mount 301 306 5000
Layer mount 3859 3849 5000
Link mount 406 396 5000
MenuButton mount 1235 1271 5000
MessageBar mount 1812 1851 5000
Nav mount 2861 2828 1000
OverflowSet mount 949 920 5000
Panel mount 2118 2081 1000
Persona mount 838 848 1000
Pivot mount 1214 1229 1000
PrimaryButton mount 1101 1093 5000
Rating mount 6575 6575 5000
SearchBox mount 1079 1070 5000
Shimmer mount 2439 2430 5000
Slider mount 1658 1656 5000
SpinButton mount 4266 4301 5000
Spinner mount 380 374 5000
SplitButton mount 2672 2690 5000
Stack mount 426 446 5000
StackWithIntrinsicChildren mount 1981 1954 5000
StackWithTextChildren mount 4420 4431 5000
SwatchColorPicker mount 10051 10183 5000
TagPicker mount 2198 2265 5000
TeachingBubble mount 83122 82318 5000
Text mount 366 364 5000
TextField mount 1173 1167 5000
ThemeProvider mount 1092 1108 5000
ThemeProvider virtual-rerender 650 650 5000
ThemeProvider virtual-rerender-with-unmount 1728 1738 5000
Toggle mount 674 666 5000
buttonNative mount 123 119 5000

border: `${width}px solid ${borderColor}`,
outline: `${width}px solid ${outlineColor}`,
zIndex: ZIndexes.FocusStyle,
borderRadius: borderRadius,
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this also allow the shorthand, e.g.:

border-radius: 1px 2px 3px 4px?

Copy link
Member Author

Choose a reason for hiding this comment

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

it allows string or number

Copy link
Member Author

Choose a reason for hiding this comment

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

image

Copy link
Contributor

@smhigley smhigley left a comment

Choose a reason for hiding this comment

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

It looks good! It feels a bit weird to allow a unitless borderRadius, but I guess we already do it with width and inset, so ¯_(ツ)_/¯

getFocusStyle(theme, {
inset: 2,
borderColor: 'transparent',
highContrastStyle: { left: 1, top: 1, bottom: 1, right: 1, outlineColor: 'ButtonText' },
Copy link
Contributor

Choose a reason for hiding this comment

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

very minor nit: since we use inset above, it might be nice to use inset: 1 here too

Copy link
Member Author

Choose a reason for hiding this comment

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

done

@micahgodbolt
Copy link
Member Author

just following the typings of normal border radii

image

@micahgodbolt micahgodbolt enabled auto-merge (squash) August 31, 2022 17:30
@micahgodbolt micahgodbolt merged commit d0017be into microsoft:master Aug 31, 2022
@micahgodbolt micahgodbolt deleted the 24578-people-picker-focus branch August 31, 2022 18:53
marcosmoura added a commit to marcosmoura/fluentui that referenced this pull request Sep 1, 2022
* master: (99 commits)
  applying package updates
  add coastal to @fluentui/react package and components (microsoft#24599)
  fix(react-18-tests-v9): extend correct tsconfig.json (microsoft#24626)
  feat(react-18-tests-v9): Add cypress setup to enable writing cypress tests (microsoft#24619)
  chore: Removing CompoundButtonAsToggleButton story since it was importing non-exported functions (microsoft#24620)
  Update PeoplePicker focus styles for the close button - Add borderRadius to getFocusStyle (microsoft#24596)
  fix(react-theme): Rename colorNeutralForegroundInvertedStatic token to colorNeutralForegroundStaticInverted (microsoft#24611)
  Website fabric core (microsoft#24613)
  fix(react-theme) update react theme colors mapping (microsoft#24608)
  Remove downloaded artifact file after using it (microsoft#24606)
  Fix artifact downloading race condition (microsoft#24607)
  chore(deps): bump moment-timezone from 0.5.34 to 0.5.37 (microsoft#24604)
  Remove check for commit existence and make it optional (microsoft#24587)
  Update "screener-build.yml" to include lage's output (microsoft#24586)
  fix(react-theme): Change colorBrandForeground2 mapping in teamsDark theme (microsoft#24579)
  Add scoping for workflow (microsoft#24466)
  fix(react-theme): Swap Background1 and Foreground1 in HC color palette (microsoft#24498)
  applying package updates
  Add support for javascript date localization (microsoft#24577)
  fix: Combobox and Dropdown hover/active borders and padding style fixes (microsoft#24362)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Component: PeoplePicker Fluent UI react (v8) Issues about @fluentui/react (v8)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

People picker: contrast ratio is less than 3:1 for the close button when focus on people picker item

4 participants