FocusTrapZone: Add new disabled prop and use in FocusTrapCallout#8809
Merged
JasonGore merged 8 commits intomicrosoft:masterfrom Apr 24, 2019
JasonGore:jg/ftz-disabled-prop
Merged
FocusTrapZone: Add new disabled prop and use in FocusTrapCallout#8809JasonGore merged 8 commits intomicrosoft:masterfrom JasonGore:jg/ftz-disabled-prop
JasonGore merged 8 commits intomicrosoft:masterfrom
JasonGore:jg/ftz-disabled-prop
Conversation
joschect
reviewed
Apr 22, 2019
packages/office-ui-fabric-react/src/components/FocusTrapZone/FocusTrapZone.tsx
Show resolved
Hide resolved
packages/office-ui-fabric-react/src/components/FocusTrapZone/FocusTrapZone.tsx
Show resolved
Hide resolved
Contributor
|
Component perf results:
|
|
ecraig12345
approved these changes
Apr 22, 2019
joschect
approved these changes
Apr 22, 2019
Member
Author
|
I wish I could request changes on my own PR. 😆 I have two bugs to fix before this should get merged. |
khmakoto
approved these changes
Apr 23, 2019
Member
khmakoto
left a comment
There was a problem hiding this comment.
Left some suggestions but otherwise LGTM 👍
packages/office-ui-fabric-react/src/components/FocusTrapZone/FocusTrapZone.test.tsx
Outdated
Show resolved
Hide resolved
packages/office-ui-fabric-react/src/components/FocusTrapZone/FocusTrapZone.types.ts
Outdated
Show resolved
Hide resolved
| <TextField label="Input inside trap zone" styles={{ root: { width: 300 } }} /> | ||
| <Link href="https://bing.com">Hyperlink inside trap zone</Link> | ||
| </Stack> | ||
| <FocusTrapZone disabled={!useTrapZone} isClickableOutsideFocusTrap={true} forceFocusInsideTrap={false}> |
Member
There was a problem hiding this comment.
Couldn't you just do isClickableOutsideFocus instead of isClickableOutsideFocusTrap={true}?
...ce-ui-fabric-react/src/components/FocusTrapZone/examples/FocusTrapZone.Box.Click.Example.tsx
Show resolved
Hide resolved
...ffice-ui-fabric-react/src/components/FocusTrapZone/examples/FocusTrapZone.Nested.Example.tsx
Outdated
Show resolved
Hide resolved
ecraig12345
reviewed
Apr 23, 2019
...s/office-ui-fabric-react/src/components/FocusTrapZone/examples/FocusTrapZone.Box.Example.tsx
Outdated
Show resolved
Hide resolved
ecraig12345
reviewed
Apr 23, 2019
...act/src/components/FocusTrapZone/examples/FocusTrapZone.Box.FocusOnCustomElement.Example.tsx
Outdated
Show resolved
Hide resolved
Contributor
|
🎉 Handy links: |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Pull request checklist
$ npm run changeDescription of changes
#8552 highlighted a need to add a
disabledprop toFocusTrapZoneto allowFocusTrapZoneto be present in the hierarchy in performant scenarios while being disabled.FocusZonealready has adisabledprop so this also bringsFocusTrapZonein parity.Also modifies all
FocusTrapZoneexamples to render all the time and make use of newdisabledprop.FocusTrapCalloutwas also modified to make use of this new prop and resolves #8552.Focus areas to test
Add tests to test
disabledscenarios.Microsoft Reviewers: Open in CodeFlow