Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(react-tabster): adds customizeSelector to createCustomFocusIndicatorStyle method #29209

Conversation

bsunderhus
Copy link
Contributor

@bsunderhus bsunderhus commented Sep 21, 2023

Previous Behavior

At the moment there's no way to modify the selector internally used to indicate if an element is focused.

New Behavior

  1. adds a customizeSelector method to allow the customization of the selector of focus styles

This allows the customization of the selector, allowing ,for example, the possibility of selecting a different element on the focusing of a given element.

This is useful for the use case of TreeItem and TreeItemLayout, where the focused element will be the TreeItem but the outline would be better positioned if it was visible relative to the TreeItemLayout element inside of TreeItem

@bsunderhus bsunderhus requested a review from a team as a code owner September 21, 2023 09:17
@bsunderhus bsunderhus self-assigned this Sep 21, 2023
@bsunderhus bsunderhus changed the title feat: adds suffixes to selectors on focus creator methods feat(react-tabster): adds suffixes to selectors on focus creator methods Sep 21, 2023
@fabricteam
Copy link
Collaborator

fabricteam commented Sep 21, 2023

Perf Analysis (@fluentui/react-components)

No significant results to display.

All results

Scenario Render type Master Ticks PR Ticks Iterations Status
Avatar mount 614 643 5000
Button mount 326 310 5000
Field mount 1121 1104 5000
FluentProvider mount 682 685 5000
FluentProviderWithTheme mount 76 86 10
FluentProviderWithTheme virtual-rerender 61 66 10
FluentProviderWithTheme virtual-rerender-with-unmount 75 76 10
InfoButton mount 6 13 5000
MakeStyles mount 861 866 50000
Persona mount 1715 1661 5000
SpinButton mount 1341 1329 5000

@codesandbox-ci
Copy link

codesandbox-ci bot commented Sep 21, 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 e33852b:

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

@fabricteam
Copy link
Collaborator

fabricteam commented Sep 21, 2023

📊 Bundle size report

Unchanged fixtures
Package & Exports Size (minified/GZIP)
react-accordion
Accordion (including children components)
91.932 kB
28.052 kB
react-alert
Alert
84.006 kB
23.008 kB
react-avatar
Avatar
49.384 kB
15.546 kB
react-avatar
AvatarGroup
18.782 kB
7.48 kB
react-avatar
AvatarGroupItem
64.036 kB
19.896 kB
react-button
Button
39.667 kB
10.794 kB
react-button
CompoundButton
47.023 kB
12.295 kB
react-button
MenuButton
44.466 kB
12.188 kB
react-button
SplitButton
52.469 kB
13.771 kB
react-button
ToggleButton
56.756 kB
12.702 kB
react-card
Card - All
91.841 kB
26.563 kB
react-card
Card
86.63 kB
25.007 kB
react-card
CardFooter
12.14 kB
5.061 kB
react-card
CardHeader
14.431 kB
5.832 kB
react-card
CardPreview
13.097 kB
5.434 kB
react-checkbox
Checkbox
36.155 kB
11.925 kB
react-combobox
Combobox (including child components)
90.949 kB
29.689 kB
react-combobox
Dropdown (including child components)
89.28 kB
29.328 kB
react-components
react-components: Button, FluentProvider & webLightTheme
69.572 kB
19.658 kB
react-components
react-components: Accordion, Button, FluentProvider, Image, Menu, Popover
208.688 kB
59.552 kB
react-components
react-components: FluentProvider & webLightTheme
40.966 kB
13.569 kB
react-datepicker-compat
DatePicker Compat
211.988 kB
58.971 kB
react-dialog
Dialog (including children components)
90.474 kB
27.605 kB
react-infobutton
InfoButton
130.15 kB
40.884 kB
react-infobutton
InfoLabel
133.883 kB
42.068 kB
react-link
Link
16.095 kB
6.53 kB
react-menu
Menu (including children components)
140.184 kB
43.176 kB
react-menu
Menu (including selectable components)
142.92 kB
43.714 kB
react-persona
Persona
56.275 kB
17.425 kB
react-popover
Popover
118.895 kB
37.406 kB
react-portal
Portal
12.362 kB
4.543 kB
react-portal-compat
PortalCompatProvider
6.541 kB
2.227 kB
react-provider
FluentProvider
21.511 kB
7.994 kB
react-radio
Radio
29.883 kB
9.851 kB
react-radio
RadioGroup
14.543 kB
5.985 kB
react-slider
Slider
37.043 kB
12.203 kB
react-switch
Switch
32.426 kB
10.517 kB
react-table
DataGrid
157.087 kB
43.832 kB
react-table
Table (Primitives only)
43.017 kB
13.414 kB
react-table
Table as DataGrid
129.841 kB
34.929 kB
react-table
Table (Selection only)
75.114 kB
20.231 kB
react-table
Table (Sort only)
73.745 kB
19.826 kB
react-tags-preview
InteractionTag
14.356 kB
5.746 kB
react-tags-preview
Tag
29.146 kB
9.108 kB
react-tags-preview
TagGroup
72.793 kB
21.685 kB
react-toast
Toast (including Toaster)
91.789 kB
27.423 kB
react-tooltip
Tooltip
51.348 kB
18.113 kB
🤖 This report was generated against aef09fc324e71a15a10a6a3c1c7ed556e2775725

@size-auditor
Copy link

size-auditor bot commented Sep 21, 2023

Asset size changes

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

Baseline commit: aef09fc324e71a15a10a6a3c1c7ed556e2775725 (build)

@fabricteam
Copy link
Collaborator

fabricteam commented Sep 21, 2023

🕵 fluentuiv9 No visual regressions between this PR and main

@bsunderhus
Copy link
Contributor Author

bsunderhus commented Sep 21, 2023

@bsunderhus bsunderhus force-pushed the react-tabster/feat--adds-suffixes-to-selectors-for-createCustomFocusIndicatorStyle branch from 23e4dd1 to 2aeeb26 Compare September 21, 2023 16:36
@bsunderhus bsunderhus enabled auto-merge (squash) September 21, 2023 16:37
@bsunderhus bsunderhus force-pushed the react-tabster/feat--adds-suffixes-to-selectors-for-createCustomFocusIndicatorStyle branch from 2aeeb26 to e33852b Compare September 25, 2023 14:10
@bsunderhus bsunderhus changed the title feat(react-tabster): adds suffixes to selectors on focus creator methods feat(react-tabster): adds customizeSelector to createCustomFocusIndicatorStyle method Sep 25, 2023
@bsunderhus bsunderhus merged commit ada4daa into microsoft:master Sep 26, 2023
21 checks passed
marcosmoura added a commit to marcosmoura/fluentui that referenced this pull request Sep 26, 2023
* master:
  fix(react-dialog): use makeResetStyles for base dialog components styles (microsoft#29280)
  chore(react-tags-preview): update props descriptions (microsoft#29287)
  chore: bump swc core to mitigate transpilation memory leaks (microsoft#29253)
  feat: adds customizeSelector to createCustomFocusIndicatorStyle method (microsoft#29209)
  applying package updates
  Updated TooltipBestPractices to include accessibility best practices (microsoft#29284)
  fix: BreadcrumbItem should use makeResetStyles for base styles (microsoft#29278)
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.

4 participants