Skip to content

Conversation

@chpalac
Copy link
Contributor

@chpalac chpalac commented May 4, 2022

Current Behavior

Selecting Pill by keyboard isn't working

New Behavior

Selecting Pill is now working by keyboard and mouse

@chpalac chpalac requested a review from a team as a code owner May 4, 2022 20:31
@msft-fluent-ui-bot msft-fluent-ui-bot added the Fluent UI react-northstar (v0) Work related to Fluent UI V0 label May 4, 2022
@codesandbox-ci
Copy link

codesandbox-ci bot commented May 4, 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 e5f3ddb:

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

@size-auditor
Copy link

size-auditor bot commented May 4, 2022

Asset size changes

Project Bundle Baseline Size New Size Difference
office-ui-fabric-react fluentui-react-northstar-Pill 95.204 kB 95.375 kB ExceedsBaseline     171 bytes

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

Baseline commit: 251b17640880ca91f59ced2b17e8368c4017ea71 (build)

@fabricteam
Copy link
Collaborator

fabricteam commented May 4, 2022

📊 Bundle size report

🤖 This report was generated against 251b17640880ca91f59ced2b17e8368c4017ea71

@fabricteam
Copy link
Collaborator

fabricteam commented May 4, 2022

Perf Analysis (@fluentui/react-northstar)

Perf tests with no regressions
Scenario Current PR Ticks Baseline Ticks Ratio
PortalMinimalPerf.default 144 123 1.17:1
AttachmentMinimalPerf.default 131 119 1.1:1
ImageMinimalPerf.default 321 294 1.09:1
RadioGroupMinimalPerf.default 375 348 1.08:1
ChatDuplicateMessagesPerf.default 248 233 1.06:1
FlexMinimalPerf.default 236 222 1.06:1
MenuButtonMinimalPerf.default 1427 1352 1.06:1
PopupMinimalPerf.default 528 498 1.06:1
TableMinimalPerf.default 330 311 1.06:1
AvatarMinimalPerf.default 157 150 1.05:1
FormMinimalPerf.default 332 317 1.05:1
RefMinimalPerf.default 206 197 1.05:1
SplitButtonMinimalPerf.default 3663 3502 1.05:1
ToolbarMinimalPerf.default 792 755 1.05:1
ItemLayoutMinimalPerf.default 1012 972 1.04:1
LayoutMinimalPerf.default 300 288 1.04:1
ListCommonPerf.default 525 505 1.04:1
StatusMinimalPerf.default 566 544 1.04:1
DividerMinimalPerf.default 294 285 1.03:1
EmbedMinimalPerf.default 3453 3358 1.03:1
ListWith60ListItems.default 547 533 1.03:1
ProviderMinimalPerf.default 338 329 1.03:1
VideoMinimalPerf.default 536 521 1.03:1
AnimationMinimalPerf.default 454 446 1.02:1
BoxMinimalPerf.default 280 275 1.02:1
CarouselMinimalPerf.default 394 388 1.02:1
ChatMinimalPerf.default 618 608 1.02:1
ListMinimalPerf.default 429 421 1.02:1
LoaderMinimalPerf.default 570 557 1.02:1
TextAreaMinimalPerf.default 414 405 1.02:1
TreeMinimalPerf.default 678 665 1.02:1
AttachmentSlotsPerf.default 929 920 1.01:1
ButtonSlotsPerf.default 456 453 1.01:1
CardMinimalPerf.default 464 461 1.01:1
DatepickerMinimalPerf.default 4679 4635 1.01:1
DropdownMinimalPerf.default 2554 2534 1.01:1
LabelMinimalPerf.default 316 314 1.01:1
ListNestedPerf.default 460 457 1.01:1
GridMinimalPerf.default 275 276 1:1
InputMinimalPerf.default 1081 1078 1:1
MenuMinimalPerf.default 709 709 1:1
SliderMinimalPerf.default 1411 1414 1:1
TableManyItemsPerf.default 1597 1601 1:1
TextMinimalPerf.default 273 273 1:1
CustomToolbarPrototype.default 2281 2277 1:1
AlertMinimalPerf.default 223 226 0.99:1
ButtonOverridesMissPerf.default 1236 1243 0.99:1
CheckboxMinimalPerf.default 2226 2253 0.99:1
DropdownManyItemsPerf.default 562 570 0.99:1
ProviderMergeThemesPerf.default 1042 1051 0.99:1
TooltipMinimalPerf.default 884 891 0.99:1
DialogMinimalPerf.default 619 634 0.98:1
HeaderMinimalPerf.default 293 298 0.98:1
RosterPerf.default 909 932 0.98:1
ReactionMinimalPerf.default 297 303 0.98:1
HeaderSlotsPerf.default 613 630 0.97:1
SegmentMinimalPerf.default 273 281 0.97:1
TreeWith60ListItems.default 138 142 0.97:1
IconMinimalPerf.default 493 521 0.95:1
SkeletonMinimalPerf.default 273 289 0.94:1
AccordionMinimalPerf.default 109 122 0.89:1
ChatWithPopoverPerf.default 289 328 0.88:1
ButtonMinimalPerf.default 110 134 0.82:1

keyCombinations: [{ keyCode: keyboardKey.Delete }, { keyCode: keyboardKey.Backspace }],
},
}),
...(p.selectable && {
Copy link
Contributor

Choose a reason for hiding this comment

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

should actionable also add the enter and space key handling ?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think yes as we also add role=buton in this case

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That makes sense, but I think we will miss a dismissible prop here then, WDYT?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@ling1726 @jurokapsiar check what you think about a08c6bf

Copy link
Contributor

Choose a reason for hiding this comment

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

I am a little bit affraid of this as it is a big and hard to discover breaking change. I understand it would make sense to add dismissable, but do we need to change the meaning of actionable for that?

Copy link
Contributor

Choose a reason for hiding this comment

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

looking at the whole PR I think it is ok. However the pill needs to be focusable also if it is dismissible - so that user can navigate to it before being able to delete

@chpalac chpalac requested review from jurokapsiar and ling1726 May 5, 2022 13:25
@chpalac chpalac enabled auto-merge (squash) May 5, 2022 15:52
@chpalac chpalac merged commit f46eb9a into microsoft:master May 5, 2022
@chpalac chpalac deleted the fix/pill-selectable-keyboard branch May 5, 2022 19:56
marwan38 pushed a commit to marwan38/fluentui that referenced this pull request Jun 13, 2022
* fix: pill behavior

* fix: Pill by adding default accessibility and considering selectable to add onclick

* chore: remove unstable comment

* chore: add missing role prop

* chore: handle dismiss and actionable

* chore: add role button when selectable

* chore: add changelog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Fluent UI react-northstar (v0) Work related to Fluent UI V0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants