-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Allowing Popup configuration on Modal component #24693
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
Allowing Popup configuration on Modal component #24693
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 80d0408:
|
Asset size changes
Baseline commit: 92bc886e6e3e5ec43847752941456666eb69d32b (build) |
📊 Bundle size report🤖 This report was generated against 92bc886e6e3e5ec43847752941456666eb69d32b |
Perf Analysis (
|
| Scenario | Render type | Master Ticks | PR Ticks | Iterations | Status |
|---|---|---|---|---|---|
| BaseButton | mount | 1191 | 1195 | 5000 | |
| Breadcrumb | mount | 2961 | 2915 | 1000 | |
| Checkbox | mount | 2647 | 2636 | 5000 | |
| CheckboxBase | mount | 2396 | 2365 | 5000 | |
| ChoiceGroup | mount | 4403 | 4368 | 5000 | |
| ComboBox | mount | 1237 | 1312 | 1000 | |
| CommandBar | mount | 9627 | 9651 | 1000 | |
| ContextualMenu | mount | 11445 | 11277 | 1000 | |
| DefaultButton | mount | 1395 | 1404 | 5000 | |
| DetailsRow | mount | 3634 | 3623 | 5000 | |
| DetailsRowFast | mount | 3660 | 3604 | 5000 | |
| DetailsRowNoStyles | mount | 3465 | 3448 | 5000 | |
| Dialog | mount | 3096 | 3082 | 1000 | |
| DocumentCardTitle | mount | 586 | 584 | 1000 | |
| Dropdown | mount | 3269 | 3265 | 5000 | |
| FocusTrapZone | mount | 2054 | 2052 | 5000 | |
| FocusZone | mount | 1986 | 1970 | 5000 | |
| GroupedList | mount | 54371 | 60983 | 2 | |
| GroupedList | virtual-rerender | 25085 | 25606 | 2 | |
| GroupedList | virtual-rerender-with-unmount | 93668 | 94064 | 2 | |
| GroupedListV2 | mount | 572 | 547 | 2 | |
| GroupedListV2 | virtual-rerender | 520 | 541 | 2 | |
| GroupedListV2 | virtual-rerender-with-unmount | 548 | 576 | 2 | |
| IconButton | mount | 1933 | 1902 | 5000 | |
| Label | mount | 730 | 739 | 5000 | |
| Layer | mount | 4272 | 4256 | 5000 | |
| Link | mount | 835 | 828 | 5000 | |
| MenuButton | mount | 1680 | 1693 | 5000 | |
| MessageBar | mount | 2291 | 2382 | 5000 | |
| Nav | mount | 3305 | 3315 | 1000 | |
| OverflowSet | mount | 1372 | 1374 | 5000 | |
| Panel | mount | 2588 | 2574 | 1000 | |
| Persona | mount | 1257 | 1261 | 1000 | |
| Pivot | mount | 1656 | 1618 | 1000 | |
| PrimaryButton | mount | 1499 | 1522 | 5000 | |
| Rating | mount | 7040 | 7001 | 5000 | |
| SearchBox | mount | 1528 | 1546 | 5000 | |
| Shimmer | mount | 2896 | 2925 | 5000 | |
| Slider | mount | 2082 | 2029 | 5000 | |
| SpinButton | mount | 4747 | 4677 | 5000 | |
| Spinner | mount | 810 | 809 | 5000 | |
| SplitButton | mount | 3104 | 3109 | 5000 | |
| Stack | mount | 867 | 873 | 5000 | |
| StackWithIntrinsicChildren | mount | 2347 | 2333 | 5000 | |
| StackWithTextChildren | mount | 4817 | 4820 | 5000 | |
| SwatchColorPicker | mount | 10507 | 10456 | 5000 | |
| TagPicker | mount | 2612 | 2775 | 5000 | |
| TeachingBubble | mount | 88865 | 89425 | 5000 | |
| Text | mount | 779 | 754 | 5000 | |
| TextField | mount | 1588 | 1609 | 5000 | |
| ThemeProvider | mount | 1516 | 1523 | 5000 | |
| ThemeProvider | virtual-rerender | 1079 | 1083 | 5000 | |
| ThemeProvider | virtual-rerender-with-unmount | 2061 | 2148 | 5000 | |
| Toggle | mount | 1116 | 1090 | 5000 | |
| buttonNative | mount | 555 | 558 | 5000 |
smhigley
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just the one comment, otherwise I like this change :)
| (isModalOpen && modalResponsiveMode! >= (responsiveMode || ResponsiveMode.small) && ( | ||
| <Layer ref={mergedRef} {...mergedLayerProps}> | ||
| <Popup | ||
| {...popupProps} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd suggest spreading this at the bottom, so it allows overriding the role, label, description, etc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated :) Thanks @smhigley !
4853567 to
80b9d0b
Compare
|
Hi @Hotell, would you be able to approve the pending workflows so I can publish this PR if those pass? Thanks! |
|
Hi @Hotell it looks like we need to run the pipelines again, would you be able to trigger a new run? Thanks! |
80b9d0b to
80d0408
Compare
* master: (29 commits) chore(react-tooltip): update package scaffold (microsoft#24927) chore(react-popover): update package scaffold (microsoft#24925) chore(react-overflow): update package scaffold (microsoft#24926) chore(react-menu): update package scaffold (microsoft#24924) applying package updates chore: Bump workspace-tools to 0.27.0 (microsoft#24914) fix: Make Menu openOnHover prop work again (microsoft#24899) stress test: convert cli scripts to typescript (microsoft#24915) update package manifest to only include v8 controls (microsoft#24839) Stress Test: add random tree (microsoft#24896) chore: Expand scope of dependency mismatch generator (microsoft#24880) chore: run dependency mismatch generator in release pipeline (microsoft#24881) chore: scaffolds react-trigger package (microsoft#24887) applying package updates chore: a11y docs structure update (microsoft#24871) feat: add popupProps to Modal component to allow override internal Popup props (microsoft#24693) fix: Set github user in nightly release pipeline (microsoft#24850) chore(react-aria): restructure folder organization (microsoft#24884) ci(github): fix invalid json string in issues.yml v2 (microsoft#24886) Add react-components/unstable to tsconfig aliases (microsoft#24878) ...
…pup props (microsoft#24693) Co-authored-by: Gaston Ramirez <[email protected]>
Current Behavior
When using the Modal component (or Dialog) the popup component that is being used under the hood cannot be configured. In cases where were need to have a different behavior for the
onRestoreFocusmethod, we have no way to configure it while using either the Dialog or Modal components.New Behavior
Adding the
IPopupPropsas a property of the Modal component and then passing it to the popup being used under the hood, we provide more flexibility on that popup's configuration.