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

fix: react-combobox Option focus outline only shows with keyboard nav #24700

Merged
merged 7 commits into from
Sep 12, 2022

Conversation

smhigley
Copy link
Contributor

@smhigley smhigley commented Sep 7, 2022

Resolves an item on the design review, #23926

Existing focus outline helpers and even useKeyboardNavAttribute from tabster don't work in this case, since keyboard focus doesn't move from the trigger, and the style is on the options.

My solution was to set a focusVisible state, set to true by keyboard interactions that open the listbox, move the activeOption, or type characters; and set to false by mouseOver events.

@smhigley smhigley self-assigned this Sep 7, 2022
@smhigley smhigley requested a review from a team as a code owner September 7, 2022 20:10
@github-actions github-actions bot added this to the July Project Cycle Q3 2022 milestone Sep 7, 2022
@fabricteam
Copy link
Collaborator

fabricteam commented Sep 7, 2022

📊 Bundle size report

Package & Exports Baseline (minified/GZIP) PR Change
react-combobox
Combobox (including child components)
73.821 kB
24.003 kB
74.39 kB
24.111 kB
569 B
108 B
react-combobox
Dropdown (including child components)
73.408 kB
23.911 kB
73.983 kB
24.013 kB
575 B
102 B
Unchanged fixtures
Package & Exports Size (minified/GZIP)
react-components
react-components: Accordion, Button, FluentProvider, Image, Menu, Popover
189.372 kB
52.027 kB
react-components
react-components: FluentProvider & webLightTheme
33.317 kB
10.983 kB
🤖 This report was generated against 4c31b27421360e80d8435235092a634a67b0418a

@codesandbox-ci
Copy link

codesandbox-ci bot commented Sep 7, 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 79dc9cb:

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

@size-auditor
Copy link

size-auditor bot commented Sep 7, 2022

Asset size changes

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

Baseline commit: 4c31b27421360e80d8435235092a634a67b0418a (build)

@fabricteam
Copy link
Collaborator

fabricteam commented Sep 7, 2022

Perf Analysis (@fluentui/react-components)

No significant results to display.

All results

Scenario Render type Master Ticks PR Ticks Iterations Status
Avatar mount 1314 1319 5000
Button mount 960 971 5000
FluentProvider mount 1605 1570 5000
FluentProviderWithTheme mount 620 633 10
FluentProviderWithTheme virtual-rerender 588 597 10
FluentProviderWithTheme virtual-rerender-with-unmount 641 633 10
MakeStyles mount 1936 1898 50000
SpinButton mount 2544 2513 5000

@smhigley smhigley force-pushed the combo-focus-outline branch from 2bc6771 to ac6c4c7 Compare September 7, 2022 21:13
@smhigley smhigley merged commit 58026c9 into microsoft:master Sep 12, 2022
marcosmoura added a commit to marcosmoura/fluentui that referenced this pull request Sep 14, 2022
* master: (28 commits)
  Fix value font-weight inside heatmap chart (microsoft#24726)
  Fix legend overflow-indication-text role (microsoft#24756)
  Support custom locale in date axis  (microsoft#24753)
  Cleanup env variables (microsoft#24739)
  ci(github): add GH Action to add issue labels based on new GH issue template (microsoft#24788)
  Update disallowedChangeTypes for newly created packages, to allow only 'prerelease' change types by default (microsoft#24763)
  feat(react-components): Adding missing AvatarGroup exports (microsoft#24770)
  remove unnecessary nohoist (microsoft#24760)
  feat(react-dialog): supports 1st rule of ARIA (microsoft#24525)
  BREAKING: TableCell layouts are handled by layout components (microsoft#24762)
  feat: Implement table cell layout components (microsoft#24773)
  applying package updates
  fix: remove readonly from DetailsList (microsoft#24615)
  chore: Cleaning up tokens in Button components so they better adhere to the design spec (microsoft#24732)
  fix: react-combobox listbox popup width matches trigger width (microsoft#24733)
  fix: react-combobox Option focus outline only shows with keyboard nav (microsoft#24700)
  feat: Publish react-field package, and export from react-components/unstable (microsoft#24235)
  fix: Replacing bottom border styles with text decoration underline in Link (microsoft#24734)
  docs(react-theme): Update readme (microsoft#24755)
  Add tests for hover states (microsoft#24390)
  ...
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