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

Batch cherry-pick of react-example fixes #16677

Merged
merged 10 commits into from
Feb 2, 2021
Merged

Batch cherry-pick of react-example fixes #16677

merged 10 commits into from
Feb 2, 2021

Conversation

…st example (#16497)

#### Pull request checklist

- [x] Addresses an existing issue: Fixes microsoftdesign/fluentui#10836
- [x] Include a change request file using `$ yarn change`: No change files are needed

#### Description of changes

Remove `display: block` from the `key` column links and add an `href=#` to properly mark the `name` column links as hyperlinks.
…#16496)

#### Pull request checklist

- [x] Addresses an existing issue: Fixes microsoftdesign/fluentui#10301
- [x] Include a change request file using `$ yarn change`: No change files are needed

#### Description of changes

Add `title` to input describing the allowed characters in the `Text Field Basic` example
…xample (#16494)

#### Pull request checklist

- [x] Addresses an existing issue: Fixes microsoftdesign/fluentui#10282
- [x] Include a change request file using `$ yarn change`: No change files are needed

#### Description of changes

Add descriptive names for the icons used in the OverflowSet Vertical example.
Removed unused `icon` props for the `overflowItems`
…ile examples (#16479)

- [x] Addresses an existing issue: Fixes microsoftdesign/fluentui#10275
- [x] Include a change request file using `$ yarn change`: No change files are needed

Added Announced for the adding person action
Changed button label to improve clarity
…16475)

* fix(react-examples): Add tooltips to DetailsList documents example
(microsoftdesign/fluentui#10255)

* Removed extraneous id from tooltip
@msft-fluent-ui-bot msft-fluent-ui-bot added the needs cherry-pick Temporary label for PRs which may need to be cherry-picked to master label Jan 27, 2021
@codesandbox-ci
Copy link

codesandbox-ci bot commented Jan 27, 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 de55066:

Sandbox Source
Fluent UI Button Configuration

)

* fix(react-examples): Add title prop to icons in OverflowSet example
(microsoftdesign/fluentui#10284)

* Replace title prop for TooltipHost

* fix(react-examples): Change item names to match icon in OverflowSet example (#16494)

- [x] Addresses an existing issue: Fixes microsoftdesign/fluentui#10282
- [x] Include a change request file using `$ yarn change`: No change files are needed

Add descriptive names for the icons used in the OverflowSet Vertical example.
Removed unused `icon` props for the `overflowItems`

* Update snapshots

* revert snapshots

* Update just one snapshot

* Remove extraneous id on tooltips
Add label to overflow button

Co-authored-by: Elizabeth Craig <[email protected]>
@andrefcdias andrefcdias removed the needs cherry-pick Temporary label for PRs which may need to be cherry-picked to master label Jan 27, 2021
@andrefcdias
Copy link
Contributor Author

@ecraig12345, regarding the 2 PRs on the Date examples (#16430 and #16463) the files in office-ui-fabric-react/DatePicker seem very different from the files in @fluentui/react/DatePicker. How should the approach be for these cases?

@fabricteam
Copy link
Collaborator

fabricteam commented Jan 28, 2021

Perf Analysis

No significant results to display.

All results

Scenario Render type 7.0 Ticks PR Ticks Iterations Status
BaseButton mount 912 878 5000
Breadcrumb mount 42046 42624 5000
Checkbox mount 1617 1572 5000
CheckboxBase mount 1245 1308 5000
ChoiceGroup mount 4875 5177 5000
ComboBox mount 907 918 1000
CommandBar mount 7667 7716 1000
ContextualMenu mount 14672 14865 1000
DefaultButton mount 1091 1102 5000
DetailsRow mount 3647 3603 5000
DetailsRowFast mount 3663 3655 5000
DetailsRowNoStyles mount 3454 3424 5000
Dialog mount 1463 1482 1000
DocumentCardTitle mount 1877 1811 1000
Dropdown mount 2557 2530 5000
FocusTrapZone mount 1707 1723 5000
FocusZone mount 1835 1833 5000
IconButton mount 1747 1739 5000
Label mount 335 346 5000
Layer mount 1982 1934 5000
Link mount 450 443 5000
MenuButton mount 1494 1455 5000
MessageBar mount 2096 2068 5000
Nav mount 3225 3258 1000
OverflowSet mount 1403 1414 5000
Panel mount 1419 1458 1000
Persona mount 807 851 1000
Pivot mount 1416 1416 1000
PrimaryButton mount 1280 1319 5000
Rating mount 7469 7522 5000
SearchBox mount 1256 1251 5000
Shimmer mount 2581 2524 5000
Slider mount 1503 1499 5000
SpinButton mount 5033 5024 5000
Spinner mount 423 397 5000
SplitButton mount 3143 3155 5000
Stack mount 510 518 5000
StackWithIntrinsicChildren mount 1575 1511 5000
StackWithTextChildren mount 4635 4697 5000
SwatchColorPicker mount 10085 10111 5000
TagPicker mount 2816 2865 5000
TeachingBubble mount 51161 51849 5000
Text mount 435 421 5000
TextField mount 1380 1369 5000
Toggle mount 844 815 5000
button mount 107 113 5000

@size-auditor
Copy link

size-auditor bot commented Jan 28, 2021

Asset size changes

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

Baseline commit: 65db403ef1748737b86370e47e1ef8cd40574f51 (build)

@ecraig12345
Copy link
Member

Regarding the 2 PRs on the Date examples (#16430 and #16463) the files in office-ui-fabric-react/DatePicker seem very different from the files in @fluentui/react/DatePicker. How should the approach be for these cases?

@andrefcdias Unfortunately you'll have to just look through the react/DatePicker examples manually and determine which ones need the same fix.

@andrefcdias andrefcdias marked this pull request as ready for review January 28, 2021 13:13
@@ -722,7 +721,11 @@ export class DetailsListAdvancedExample extends React.Component<{}, IDetailsList
column.isMultiline = true;
column.minWidth = 200;
} else if (column.key === 'name') {
column.onRender = (item: IExampleItem) => <Link data-selection-invoke={true}>{item.name}</Link>;
column.onRender = (item: IExampleItem) => (
<Link href="#" data-selection-invoke={true}>
Copy link
Member

Choose a reason for hiding this comment

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

Should have caught this in master, but if you're setting href=# you should probably also add a click handler that does ev.preventDefault() to prevent jumping to the top of the page or other strange actions.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The href is solely there for it to be a valid anchor and not for the functionality itself. Plus, we would probably need to inform the user why nothing happened when he clicked a link, no?
If you think it's pertinent, let's open a separate issue since the purpose of this PR was solely for cherry-picking into v7.

Copy link
Member

Choose a reason for hiding this comment

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

I believe it will do the onItemInvoked action on click. Needing to have a click handler with preventDefault is a general issue with using # as href.

Copy link
Member

Choose a reason for hiding this comment

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

Hmm actually something seems to be preventing the behavior of jumping to the top already, so I guess that's not an issue. Though I see what you mean about the action not being obvious (either to a screen reader user or sighted user) since it just logs to the console...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

How do you want to proceed on this?

Copy link
Member

Choose a reason for hiding this comment

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

Sorry for not being clear. Let's just leave it as-is.

@@ -22,7 +22,7 @@ export const TextFieldBasicExample: React.FunctionComponent = () => {
<TextField label="With error message" errorMessage="Error message" />
</Stack>
<Stack {...columnProps}>
<MaskedTextField label="With input mask" mask="m\ask: (999) 999 - 9999" />
<MaskedTextField label="With input mask" mask="m\ask: (999) 999 - 9999" title="A 10 digit number" />
Copy link
Member

Choose a reason for hiding this comment

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

I think I missed this change in master too--what issue was this fixing? Wondering if aria-label (with the label plus instructions) would be more appropriate.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I had considered that initially, but upon reading the HTML input spec opted for the title solution, as suggested also by @JustSlone.

@msft-fluent-ui-bot
Copy link
Collaborator

Hello @ecraig12345!

Because this pull request has the AutoMerge label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (@msft-fluent-ui-bot) and give me an instruction to get started! Learn more here.

@msft-fluent-ui-bot msft-fluent-ui-bot merged commit e404ed7 into microsoft:7.0 Feb 2, 2021
@msft-fluent-ui-bot
Copy link
Collaborator

🎉@fluentui/[email protected] 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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants