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

fix(Dialog): do not require ref forwarding #32095

Merged

Conversation

layershifter
Copy link
Member

@layershifter layershifter commented Jul 24, 2024

Previous Behavior

<Dialog>
  {/* ❌ throws if `CustomComponent` does not forward a ref */}
  <CustomComponent />
</Dialog>

New Behavior

<Dialog>
  {/* ✅ does not throw */}
  <CustomComponent />
</Dialog>

A ref will be passed down via context to DialogSurface rendered by CustomComponent.

Related Issue(s)

Fixes #31808

@fabricteam
Copy link
Collaborator

fabricteam commented Jul 24, 2024

📊 Bundle size report

Package & Exports Baseline (minified/GZIP) PR Change
react-components
react-components: entire library
1.095 MB
270.359 kB
1.095 MB
270.407 kB
148 B
48 B
react-dialog
Dialog (including children components)
99.413 kB
29.881 kB
99.54 kB
29.905 kB
127 B
24 B
Unchanged fixtures
Package & Exports Size (minified/GZIP)
react-components
react-components: Button, FluentProvider & webLightTheme
69.141 kB
20.157 kB
react-components
react-components: Accordion, Button, FluentProvider, Image, Menu, Popover
217.412 kB
63.063 kB
react-components
react-components: FluentProvider & webLightTheme
44.442 kB
14.607 kB
react-portal-compat
PortalCompatProvider
8.39 kB
2.64 kB
react-timepicker-compat
TimePicker
106.751 kB
35.596 kB
🤖 This report was generated against 804c367079e2e7e5b3b0174eea96f034835dde4d

@fabricteam
Copy link
Collaborator

fabricteam commented Jul 24, 2024

Perf Analysis (@fluentui/react-components)

No significant results to display.

All results

Scenario Render type Master Ticks PR Ticks Iterations Status
Avatar mount 661 626 5000
Button mount 321 325 5000
Field mount 1186 1156 5000
FluentProvider mount 738 702 5000
FluentProviderWithTheme mount 82 84 10
FluentProviderWithTheme virtual-rerender 40 36 10
FluentProviderWithTheme virtual-rerender-with-unmount 73 78 10
MakeStyles mount 904 885 50000
Persona mount 1791 1765 5000
SpinButton mount 1404 1412 5000
SwatchPicker mount 1718 1705 5000

@layershifter layershifter merged commit e3d6a87 into microsoft:master Aug 6, 2024
19 checks passed
@layershifter layershifter deleted the feat/motion-ref-forwarder branch August 6, 2024 08:29
marcosmoura added a commit to marcosmoura/fluentui that referenced this pull request Aug 7, 2024
* master: (48 commits)
  chore: migrate to storybook v7 (microsoft#32018)
  release: applying package updates - react-components
  ci: make public-docsite-v9 deploy pipeline work and make it faster (microsoft#32248)
  fix(Toolbar): hardcode size of `ToolbarButton` (microsoft#32185)
  chore: deprecate @fluentui/react-motion-preview (microsoft#32190)
  release: applying package updates - web-components
  docs: add wrapping menu item example to ContextualMenu docs (microsoft#31289)
  docs: update title of v8 keyboard-accessible drag & drop example, add docs (microsoft#32216)
  release: applying package updates - react-components
  fix: Card does not override specified focusMode based on event listeners (microsoft#32200)
  Fix undefined reference in older browsers in useMessageBarReflow (microsoft#32238)
  feat: Add transparent appearance to ToolbarButton (microsoft#32205)
  fix(react-tabs): ignore ref for tab reserved space content slot (microsoft#31775)
  fix(Dialog): do not require ref forwarding (microsoft#32095)
  feat: add verify-packaging to react v8 release pipeline (microsoft#32212)
  chore(web-components): remove type-check definition and follow repo target defaults for consistency and type-check speeds (microsoft#32208)
  chore(react-tree): improve ImmutableSet and ImmutableMap internal implementation (microsoft#32167)
  release: applying package updates - web-components
  feat(web-components): add tablist (microsoft#32098)
  release: applying package updates - react-components
  ...
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.

[Bug]: react-dialog breaking changes to type of children
3 participants