-
Notifications
You must be signed in to change notification settings - Fork 2.9k
feature(react-utilities): implements new slot methods (slot and assertSlots)
#28373
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
feature(react-utilities): implements new slot methods (slot and assertSlots)
#28373
Conversation
📊 Bundle size reportUnchanged fixtures
|
Perf Analysis (
|
| Scenario | Render type | Master Ticks | PR Ticks | Iterations | Status |
|---|---|---|---|---|---|
| Avatar | mount | 597 | 638 | 5000 | Possible regression |
| Field | mount | 1042 | 1155 | 5000 | Possible regression |
| SpinButton | mount | 1356 | 1485 | 5000 | Possible regression |
All results
| Scenario | Render type | Master Ticks | PR Ticks | Iterations | Status |
|---|---|---|---|---|---|
| Avatar | mount | 597 | 638 | 5000 | Possible regression |
| Button | mount | 289 | 292 | 5000 | |
| Field | mount | 1042 | 1155 | 5000 | Possible regression |
| FluentProvider | mount | 645 | 672 | 5000 | |
| FluentProviderWithTheme | mount | 77 | 82 | 10 | |
| FluentProviderWithTheme | virtual-rerender | 63 | 60 | 10 | |
| FluentProviderWithTheme | virtual-rerender-with-unmount | 75 | 70 | 10 | |
| InfoButton | mount | 11 | 11 | 5000 | |
| MakeStyles | mount | 850 | 838 | 50000 | |
| Persona | mount | 1643 | 1806 | 5000 | |
| SpinButton | mount | 1356 | 1485 | 5000 | Possible regression |
2758bd0 to
0d16b36
Compare
|
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 b3e7f76:
|
Asset size changesSize Auditor did not detect a change in bundle size for any component! Baseline commit: 192666b54cb365f4c958f46c3e097b597ebd94fc (build) |
🕵 fluentuiv9 No visual regressions between this PR and main |
0d16b36 to
5ed7da9
Compare
slot and assertSlots)
change/@fluentui-react-jsx-runtime-d2a505fc-6ffc-4679-aa63-5b29dcc83f7b.json
Outdated
Show resolved
Hide resolved
change/@fluentui-react-utilities-18c147c2-15a4-428f-89a7-049632ab27fe.json
Outdated
Show resolved
Hide resolved
packages/react-components/react-utilities/src/compose/getSlotsNext.test.tsx
Outdated
Show resolved
Hide resolved
packages/react-components/react-utilities/etc/react-utilities.api.md
Outdated
Show resolved
Hide resolved
ca99c36 to
cbd2133
Compare
packages/react-components/react-utilities/src/compose/isSlot.test.tsx
Outdated
Show resolved
Hide resolved
behowell
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.
Looks good! I had a few comments that might require bigger code changes to address. I apologize my review took so long, but I hope it's possible to make these changes in this PR, since this is a core API that will be difficult to change later.
packages/react-components/react-jsx-runtime/src/createElement.ts
Outdated
Show resolved
Hide resolved
4221735 to
2e51245
Compare
change/@fluentui-react-jsx-runtime-d2a505fc-6ffc-4679-aa63-5b29dcc83f7b.json
Show resolved
Hide resolved
a0ba9f6 to
b1aab1b
Compare
🕵 fluentuiv9 No visual regressions between this PR and main |
b1aab1b to
67c0066
Compare
…9dcc83f7b.json Co-authored-by: Oleksandr Fediashov <[email protected]>
…2ab27fe.json Co-authored-by: Oleksandr Fediashov <[email protected]>
+ removes re-declaring a slot as an option for slot method
67c0066 to
e9196d5
Compare
e9196d5 to
5727097
Compare
5727097 to
c08574f
Compare
c08574f to
b3e7f76
Compare
* master: chore(cxe-prg): migrate to new slot API (microsoft#28752) chore(teams-prg): migrate to new slot API (microsoft#28751) chore: re-export slot and assertSlots methods (microsoft#28755) Docs(react-tree): Improve docs and stories (microsoft#28741) feat: implements nested tree selection (microsoft#28668) applying package updates applying package updates feature(react-utilities): implements new slot methods (`slot` and `assertSlots`) (microsoft#28373) fix(TimePicker): Selection now works in locales that don't use "am"/"pm" in their time format (microsoft#28469) bugfix: ensures controlled state works properly + (microsoft#28665) feat(tokens): Add status color tokens (microsoft#28006) feat(tokens): Add colorBrandStroke2Contrast and colorNeutralStrokeAlpha2 (microsoft#28638) Made BreadcrumbButton consistent with Item and Link (microsoft#28672)
* master: chore(cxe-prg): migrate to new slot API (microsoft#28752) chore(teams-prg): migrate to new slot API (microsoft#28751) chore: re-export slot and assertSlots methods (microsoft#28755) Docs(react-tree): Improve docs and stories (microsoft#28741) feat: implements nested tree selection (microsoft#28668) applying package updates applying package updates feature(react-utilities): implements new slot methods (`slot` and `assertSlots`) (microsoft#28373) fix(TimePicker): Selection now works in locales that don't use "am"/"pm" in their time format (microsoft#28469) bugfix: ensures controlled state works properly + (microsoft#28665) feat(tokens): Add status color tokens (microsoft#28006) feat(tokens): Add colorBrandStroke2Contrast and colorNeutralStrokeAlpha2 (microsoft#28638) Made BreadcrumbButton consistent with Item and Link (microsoft#28672) fix(EventListener): do not use `defaultProps` (microsoft#28725)

This PR implements the next steps on slot API as discussed on previous RFC's and issues on this topic.
Modifications
slotnamespace that provides all methods to help create a slotassertSlotsmethod to ensure the state provided by a state hook is following proper new mechanisms@fluentui/react-jsx-runtimeto properly support previous and new methods of slot creation accordinglyresolveShorthandto do exactly the same thing asslotdoesRelated Issue(s)