Skip to content

Creates focus indicator hooks for react-tabster#18081

Merged
layershifter merged 32 commits intomicrosoft:masterfrom
bsunderhus:feature/focus-indicator
May 27, 2021
Merged

Creates focus indicator hooks for react-tabster#18081
layershifter merged 32 commits intomicrosoft:masterfrom
bsunderhus:feature/focus-indicator

Conversation

@bsunderhus
Copy link
Contributor

@bsunderhus bsunderhus commented May 6, 2021

Pull request checklist

Description of changes

  1. useKeyboardNavAttribute
  2. useFocusIndicatorStyle

Problems yet to be solved

Needs to measure impact of react-tabster on components bundle size

@size-auditor
Copy link

size-auditor bot commented May 6, 2021

Asset size changes

Project Bundle Baseline Size New Size Difference
office-ui-fabric-react fluentui-react-components-FluentProvider 34.918 kB 40.348 kB ExceedsTolerance     5.43 kB

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

Baseline commit: 5379823a6f53bd36a936806153d228b9a0ef0543 (build)

@codesandbox-ci
Copy link

codesandbox-ci bot commented May 6, 2021

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 6915bd8:

Sandbox Source
Fluent UI Button Configuration

@fabricteam
Copy link
Collaborator

fabricteam commented May 6, 2021

Perf Analysis (@fluentui/react)

No significant results to display.

All results

Scenario Render type Master Ticks PR Ticks Iterations Status
Avatar mount 970 943 5000
BaseButton mount 1005 1028 5000
Breadcrumb mount 2761 2779 1000
ButtonNext mount 547 579 5000
Checkbox mount 1735 1693 5000
CheckboxBase mount 1518 1464 5000
ChoiceGroup mount 5372 5376 5000
ComboBox mount 1083 1062 1000
CommandBar mount 10814 10912 1000
ContextualMenu mount 6631 6673 1000
DefaultButton mount 1278 1262 5000
DetailsRow mount 4074 4182 5000
DetailsRowFast mount 4123 4093 5000
DetailsRowNoStyles mount 3954 3914 5000
Dialog mount 2295 2345 1000
DocumentCardTitle mount 144 158 1000
Dropdown mount 3610 3607 5000
FocusTrapZone mount 1935 2008 5000
FocusZone mount 1935 1937 5000
IconButton mount 1965 1966 5000
Label mount 356 378 5000
Layer mount 1970 1967 5000
Link mount 505 505 5000
MakeStyles mount 1917 1978 50000
MenuButton mount 1650 1647 5000
MessageBar mount 2170 2171 5000
Nav mount 3574 3618 1000
OverflowSet mount 1128 1114 5000
Panel mount 2243 2179 1000
Persona mount 936 925 1000
Pivot mount 1544 1563 1000
PrimaryButton mount 1455 1441 5000
Rating mount 8543 8640 5000
SearchBox mount 1461 1501 5000
Shimmer mount 2855 2866 5000
Slider mount 2223 2169 5000
SpinButton mount 5458 5424 5000
Spinner mount 446 462 5000
SplitButton mount 3518 3509 5000
Stack mount 549 552 5000
StackWithIntrinsicChildren mount 1596 1619 5000
StackWithTextChildren mount 5046 5037 5000
SwatchColorPicker mount 11219 11226 5000
Tabs mount 1516 1531 1000
TagPicker mount 2676 2662 5000
TeachingBubble mount 12825 12821 5000
Text mount 476 471 5000
TextField mount 1561 1570 5000
ThemeProvider mount 1284 1306 5000
ThemeProvider virtual-rerender 647 637 5000
ThemeProviderNext mount 6957 6999 5000
Toggle mount 901 886 5000
buttonNative mount 129 134 5000

Perf Analysis (@fluentui/react-northstar)

Perf tests with no regressions
Scenario Current PR Ticks Baseline Ticks Ratio
FlexMinimalPerf.default 344 311 1.11:1
AttachmentMinimalPerf.default 185 168 1.1:1
HeaderMinimalPerf.default 437 401 1.09:1
DialogMinimalPerf.default 890 824 1.08:1
RefMinimalPerf.default 258 242 1.07:1
CarouselMinimalPerf.default 528 499 1.06:1
HeaderSlotsPerf.default 913 860 1.06:1
ChatMinimalPerf.default 715 684 1.05:1
MenuMinimalPerf.default 975 930 1.05:1
TreeWith60ListItems.default 194 185 1.05:1
BoxMinimalPerf.default 392 377 1.04:1
ChatDuplicateMessagesPerf.default 317 306 1.04:1
GridMinimalPerf.default 400 385 1.04:1
ReactionMinimalPerf.default 447 428 1.04:1
TooltipMinimalPerf.default 1118 1073 1.04:1
VideoMinimalPerf.default 718 692 1.04:1
DividerMinimalPerf.default 432 421 1.03:1
ListMinimalPerf.default 587 570 1.03:1
LoaderMinimalPerf.default 769 748 1.03:1
RadioGroupMinimalPerf.default 515 499 1.03:1
SkeletonMinimalPerf.default 418 404 1.03:1
TextAreaMinimalPerf.default 594 577 1.03:1
ToolbarMinimalPerf.default 1085 1050 1.03:1
AnimationMinimalPerf.default 455 445 1.02:1
ButtonOverridesMissPerf.default 1827 1797 1.02:1
ButtonSlotsPerf.default 612 598 1.02:1
CheckboxMinimalPerf.default 3040 2979 1.02:1
DropdownMinimalPerf.default 3334 3270 1.02:1
ListWith60ListItems.default 707 693 1.02:1
MenuButtonMinimalPerf.default 1797 1766 1.02:1
PortalMinimalPerf.default 183 179 1.02:1
SegmentMinimalPerf.default 401 393 1.02:1
TableMinimalPerf.default 454 447 1.02:1
TextMinimalPerf.default 397 390 1.02:1
AvatarMinimalPerf.default 220 217 1.01:1
ImageMinimalPerf.default 441 438 1.01:1
LabelMinimalPerf.default 443 438 1.01:1
LayoutMinimalPerf.default 407 404 1.01:1
SplitButtonMinimalPerf.default 4168 4133 1.01:1
IconMinimalPerf.default 700 693 1.01:1
TableManyItemsPerf.default 2225 2204 1.01:1
CustomToolbarPrototype.default 4008 3975 1.01:1
EmbedMinimalPerf.default 4426 4435 1:1
ListNestedPerf.default 633 631 1:1
PopupMinimalPerf.default 633 630 1:1
ProviderMergeThemesPerf.default 1734 1739 1:1
ProviderMinimalPerf.default 1011 1011 1:1
SliderMinimalPerf.default 1637 1635 1:1
AccordionMinimalPerf.default 173 174 0.99:1
AlertMinimalPerf.default 304 306 0.99:1
AttachmentSlotsPerf.default 1309 1321 0.99:1
ChatWithPopoverPerf.default 400 406 0.99:1
InputMinimalPerf.default 1316 1333 0.99:1
ItemLayoutMinimalPerf.default 1439 1457 0.99:1
StatusMinimalPerf.default 784 794 0.99:1
CardMinimalPerf.default 641 652 0.98:1
DatepickerMinimalPerf.default 5943 6044 0.98:1
DropdownManyItemsPerf.default 772 787 0.98:1
ListCommonPerf.default 713 728 0.98:1
RosterPerf.default 1289 1309 0.98:1
FormMinimalPerf.default 469 484 0.97:1
TreeMinimalPerf.default 878 911 0.96:1
ButtonMinimalPerf.default 191 202 0.95:1

Copy link
Member

@khmakoto khmakoto left a comment

Choose a reason for hiding this comment

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

Left two comments but otherwise LGTM.

@bsunderhus bsunderhus closed this May 11, 2021
@bsunderhus bsunderhus reopened this May 11, 2021
@bsunderhus bsunderhus marked this pull request as ready for review May 11, 2021 13:06
@bsunderhus bsunderhus requested a review from a team as a code owner May 11, 2021 13:06
@bsunderhus bsunderhus requested a review from layershifter May 11, 2021 13:06
@layershifter
Copy link
Member

As I see, what-input does not have support for multiple documents 😥 Custom implementation in N*, has it microsoft/fluent-ui-react#1972

@bsunderhus bsunderhus marked this pull request as ready for review May 26, 2021 10:54
const useStyles = makeStyles({
focus: theme => ({
outline: 'none',
[`:global(${KEYBOARD_NAV_SELECTOR}) :focus`]: {
Copy link
Member

Choose a reason for hiding this comment

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

We handle only root level preudo now and it should be enough. I think that it's fine for now.

@bsunderhus bsunderhus force-pushed the feature/focus-indicator branch from 2579430 to 7fd1b14 Compare May 27, 2021 09:21
@layershifter layershifter merged commit 5dab36e into microsoft:master May 27, 2021
@bsunderhus bsunderhus deleted the feature/focus-indicator branch May 27, 2021 12:26
@msft-fluent-ui-bot
Copy link
Collaborator

🎉@fluentui/react-tabster@v9.0.0-alpha.29 has been released which incorporates this pull request.:tada:

Handy links:

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.

7 participants