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

docs(jsx-runtime): improve usage guide and fix invalid links to sb docs #32838

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

Hotell
Copy link
Contributor

@Hotell Hotell commented Sep 16, 2024

@Hotell Hotell changed the title docs(jsx-runtime): improve usage docs and fix invalid links to sb docs docs(jsx-runtime): improve usage guide and fix invalid links to sb docs Sep 16, 2024

```json
Copy link
Contributor Author

Choose a reason for hiding this comment

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

removed this completely as we should not encourage to use this pragma within every jsx in user land

@fabricteam
Copy link
Collaborator

fabricteam commented Sep 16, 2024

📊 Bundle size report

✅ No changes found

@fabricteam
Copy link
Collaborator

fabricteam commented Sep 16, 2024

Perf Analysis (@fluentui/react-components)

No significant results to display.

All results

Scenario Render type Master Ticks PR Ticks Iterations Status
Avatar mount 616 630 5000
Button mount 304 303 5000
Field mount 1119 1135 5000
FluentProvider mount 700 726 5000
FluentProviderWithTheme mount 89 93 10
FluentProviderWithTheme virtual-rerender 31 36 10
FluentProviderWithTheme virtual-rerender-with-unmount 87 88 10
MakeStyles mount 873 859 50000
Persona mount 1811 1756 5000
SpinButton mount 1408 1398 5000
SwatchPicker mount 1620 1692 5000

@@ -0,0 +1,7 @@
{
Copy link
Collaborator

@fabricteam fabricteam Sep 16, 2024

Choose a reason for hiding this comment

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

🕵🏾‍♀️ visual regressions to review in the fluentuiv9 Visual Regression Report

Avatar Converged 2 screenshots
Image Name Diff(in Pixels) Image Type
Avatar Converged.badgeMask.chromium.png 38 Changed
Avatar Converged.size+inactive+badge.chromium.png 1 Changed
Drawer 1 screenshots
Image Name Diff(in Pixels) Image Type
Drawer.overlay drawer full.chromium.png 1167 Changed

@Hotell
Copy link
Contributor Author

Hotell commented Sep 16, 2024

as I was validating assumptions that led to this PR I ran into some use-cases which I'd like to get answers to (@bsunderhus 🙏):

unnecessary use of jsx pragma

is following as expected or a programatic mistake ? My assumption is that if one doesn't use imperatively JSXMemberExpression aka ( <state.*> ) no custom pragma or assertSlots called are necessary, correct ?

src: https://github.com/microsoft/fluentui/blob/master/packages/react-components/react-teaching-popover/library/src/components/TeachingPopoverSurface/renderTeachingPopoverSurface.tsx

image

@Hotell Hotell marked this pull request as ready for review September 16, 2024 16:40
@Hotell Hotell requested a review from a team as a code owner September 16, 2024 16:40

In case you want to re-compose a component and redeclare its render method then this API will be necessary, here's our documentation on [Rendering a component with slots](https://react.fluentui.dev/?path=/docs/concepts-developer-customizing-components-with-slots--page#rendering-components-with-slots)
In case you want to re-compose a component and redeclare its render method then this API will be necessary, learn more on [Rendering a component with slots](https://react.fluentui.dev/?path=/docs/concepts-developer-customizing-components-with-slots--docs#rendering-components-with-slots)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@bsunderhus those linked SB docs doesn't describe anything related to "re-composing/declaring" besides standard render "hook" implementation pattern.

I'd rather update the wording here ( remove this completely ) or update the SB docs with examples of actual recomposition pattern. I prefer the latter.

thoughts?

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.

2 participants