feat(what-input): Limit keyboard detection in inputs#25087
Merged
jurokapsiar merged 7 commits intomicrosoft:masterfrom Oct 24, 2022
Merged
feat(what-input): Limit keyboard detection in inputs#25087jurokapsiar merged 7 commits intomicrosoft:masterfrom
jurokapsiar merged 7 commits intomicrosoft:masterfrom
Conversation
|
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 ee359b4:
|
Asset size changes
Baseline commit: a64b8d57499088f012de1cb0d211bd243966673c (build) |
Collaborator
📊 Bundle size report🤖 This report was generated against a64b8d57499088f012de1cb0d211bd243966673c |
Collaborator
Perf Analysis (
|
| Scenario | Current PR Ticks | Baseline Ticks | Ratio |
|---|---|---|---|
| ButtonSlotsPerf.default | 481 | 445 | 1.08:1 |
| ChatDuplicateMessagesPerf.default | 231 | 214 | 1.08:1 |
| AttachmentMinimalPerf.default | 126 | 119 | 1.06:1 |
| FlexMinimalPerf.default | 240 | 227 | 1.06:1 |
| LayoutMinimalPerf.default | 307 | 289 | 1.06:1 |
| AnimationMinimalPerf.default | 453 | 433 | 1.05:1 |
| SegmentMinimalPerf.default | 287 | 274 | 1.05:1 |
| ButtonMinimalPerf.default | 136 | 131 | 1.04:1 |
| ImageMinimalPerf.default | 333 | 319 | 1.04:1 |
| InputMinimalPerf.default | 987 | 951 | 1.04:1 |
| LoaderMinimalPerf.default | 563 | 541 | 1.04:1 |
| PortalMinimalPerf.default | 139 | 134 | 1.04:1 |
| TextMinimalPerf.default | 286 | 275 | 1.04:1 |
| HeaderMinimalPerf.default | 296 | 286 | 1.03:1 |
| LabelMinimalPerf.default | 312 | 304 | 1.03:1 |
| ProviderMinimalPerf.default | 336 | 327 | 1.03:1 |
| ReactionMinimalPerf.default | 304 | 294 | 1.03:1 |
| TableMinimalPerf.default | 324 | 316 | 1.03:1 |
| CarouselMinimalPerf.default | 385 | 377 | 1.02:1 |
| DialogMinimalPerf.default | 641 | 629 | 1.02:1 |
| ItemLayoutMinimalPerf.default | 969 | 951 | 1.02:1 |
| PopupMinimalPerf.default | 537 | 528 | 1.02:1 |
| ProviderMergeThemesPerf.default | 1089 | 1071 | 1.02:1 |
| RadioGroupMinimalPerf.default | 366 | 359 | 1.02:1 |
| TextAreaMinimalPerf.default | 390 | 382 | 1.02:1 |
| AvatarMinimalPerf.default | 151 | 150 | 1.01:1 |
| ChatMinimalPerf.default | 594 | 587 | 1.01:1 |
| DividerMinimalPerf.default | 294 | 291 | 1.01:1 |
| MenuMinimalPerf.default | 701 | 691 | 1.01:1 |
| RosterPerf.default | 1775 | 1757 | 1.01:1 |
| RefMinimalPerf.default | 180 | 178 | 1.01:1 |
| SliderMinimalPerf.default | 1336 | 1323 | 1.01:1 |
| SplitButtonMinimalPerf.default | 3647 | 3613 | 1.01:1 |
| StatusMinimalPerf.default | 556 | 552 | 1.01:1 |
| TreeWith60ListItems.default | 136 | 135 | 1.01:1 |
| ChatWithPopoverPerf.default | 308 | 307 | 1:1 |
| EmbedMinimalPerf.default | 3073 | 3065 | 1:1 |
| FormMinimalPerf.default | 315 | 315 | 1:1 |
| SkeletonMinimalPerf.default | 282 | 281 | 1:1 |
| TooltipMinimalPerf.default | 1925 | 1931 | 1:1 |
| ButtonOverridesMissPerf.default | 1082 | 1095 | 0.99:1 |
| CardMinimalPerf.default | 426 | 430 | 0.99:1 |
| DropdownMinimalPerf.default | 2210 | 2241 | 0.99:1 |
| GridMinimalPerf.default | 275 | 279 | 0.99:1 |
| HeaderSlotsPerf.default | 627 | 636 | 0.99:1 |
| ListMinimalPerf.default | 408 | 414 | 0.99:1 |
| ToolbarMinimalPerf.default | 775 | 781 | 0.99:1 |
| TreeMinimalPerf.default | 676 | 682 | 0.99:1 |
| AttachmentSlotsPerf.default | 914 | 928 | 0.98:1 |
| CheckboxMinimalPerf.default | 1716 | 1759 | 0.98:1 |
| DropdownManyItemsPerf.default | 551 | 560 | 0.98:1 |
| MenuButtonMinimalPerf.default | 1394 | 1429 | 0.98:1 |
| VideoMinimalPerf.default | 604 | 618 | 0.98:1 |
| AccordionMinimalPerf.default | 119 | 123 | 0.97:1 |
| AlertMinimalPerf.default | 210 | 216 | 0.97:1 |
| DatepickerMinimalPerf.default | 4665 | 4792 | 0.97:1 |
| ListNestedPerf.default | 460 | 472 | 0.97:1 |
| ListCommonPerf.default | 529 | 551 | 0.96:1 |
| TableManyItemsPerf.default | 1530 | 1586 | 0.96:1 |
| CustomToolbarPrototype.default | 2212 | 2322 | 0.95:1 |
| BoxMinimalPerf.default | 256 | 273 | 0.94:1 |
| ListWith60ListItems.default | 512 | 547 | 0.94:1 |
| IconMinimalPerf.default | 514 | 551 | 0.93:1 |
ling1726
reviewed
Oct 19, 2022
ling1726
reviewed
Oct 19, 2022
ling1726
approved these changes
Oct 19, 2022
Contributor
ling1726
left a comment
There was a problem hiding this comment.
Please add a PR desecription, about the motivation of this PR
Co-authored-by: ling1726 <lingfangao@hotmail.com>
marcosmoura
added a commit
to marcosmoura/fluentui
that referenced
this pull request
Oct 25, 2022
* master: (106 commits) fix: PopoverTriggerChildProps should be exported (microsoft#25159) feat: replace ToolbarRadio implementation by usage of toggle button as Radio (microsoft#25343) docs: improve Toolbar docs examples (microsoft#25269) feat(tools): add unstable API setup updates (microsoft#25355) applying package updates Fix wrong narration when legend selected (microsoft#24903) applying package updates chore(react-persona): Update beachball settings and change file's type (microsoft#25363) chore: Refactor Field VR tests to have individual tests per component (microsoft#25263) chore(react-persona, react-components, vr-tests-v9): Reverting react-persona's version to beta (microsoft#25357) Publishing migration package (microsoft#25354) fix: Detailslist is still tabbable when isHeaderVisible=false (microsoft#25342) fix: list even/odd off-by-one issue (microsoft#25358) feat: add Dropdown a11y spec (microsoft#24917) spinbutton: update internal padding for small size (microsoft#25286) chore(global-context): migrate to new package structure (microsoft#25341) feat: Add validationState to Progress, to make the bar red or green (microsoft#25253) feat: Add accessibility scenarios for Fluent UI v9 components #3 (microsoft#23334) feat(Dropdown): Freeform search should be case insensitive (microsoft#24879) feat(what-input): Limit keyboard detection in inputs (microsoft#25087) ...
NotWoods
pushed a commit
to NotWoods/fluentui
that referenced
this pull request
Nov 18, 2022
* feat(what-input): Limit keyboard detection in inputs * show focus indicator in dropdown scenarios * fix test * set what-input to mouse initially * naming, docs and changelog * Update packages/fluentui/react-northstar/src/utils/whatInput.ts Co-authored-by: ling1726 <lingfangao@hotmail.com> Co-authored-by: Juraj Kapsiar <jukapsia@microsoft.com> Co-authored-by: ling1726 <lingfangao@hotmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Current Behavior
what-input is listening to keyboard, mouse and touch events and switches input mode. This change is stored to
bodyelement usingdata-what-inputattribute. Fluent generates classes for :focus-visible pseudo selector that get activated when keyboard mode is used. This however causes a large style recalc.New Behavior
Keyboard detection is ignored if user is in an input field and the key is not tab or F6.
Input fields are by design designed in a way where they do not need specific keyboard focused styles. We only need to check if the mode changed as user navigates outside of the input.
Related Issue(s)
Fixes #