Skip to content

Conversation

@Vxee
Copy link
Contributor

@Vxee Vxee commented Aug 1, 2024

…mport and theme getting

@mui-bot
Copy link

mui-bot commented Aug 1, 2024

Netlify deploy preview

https://deploy-preview-43139--material-ui.netlify.app/

Bundle size report

No bundle size changes (Toolpad)
No bundle size changes

Generated by 🚫 dangerJS against c45e63d

@Vxee
Copy link
Contributor Author

Vxee commented Aug 1, 2024

@siriwatknp I added a cache to avoid every time the components mount will load the jsx asserts and get theme seting from window again. It is an enhancement for #42879.

@Vxee Vxee changed the title [docs]: add globalInjectThemeCache to avoid unnecessary jsx dynamic i… [docs]: add cache to avoid unnecessary jsx dynamic i… Aug 1, 2024
@Vxee Vxee changed the title [docs]: add cache to avoid unnecessary jsx dynamic i… [docs] Add cache to avoid unnecessary jsx dynamic i… Aug 1, 2024
@Vxee Vxee changed the title [docs] Add cache to avoid unnecessary jsx dynamic i… [docs] Add cache to avoid unnecessary jsx dynamic import and theme getting Aug 1, 2024
@alexfauquette alexfauquette added the scope: docs-infra Involves the docs-infra product (https://www.notion.so/mui-org/b9f676062eb94747b6768209f7751305). label Aug 2, 2024
@alexfauquette
Copy link
Member

With that modification, you will need to refresh the page to update the applied theme. Otherwise, I don't see how you can get a different globalInjectThemeCache

@zannager zannager requested review from mnajdova and siriwatknp August 2, 2024 07:43
@Vxee
Copy link
Contributor Author

Vxee commented Aug 4, 2024

@alexfauquette Yes, only refresh the page can update the theme, I think the inject theme will not change frequently.

@Vxee
Copy link
Contributor Author

Vxee commented Aug 12, 2024

@siriwatknp Can you help to review this PR?

@Vxee
Copy link
Contributor Author

Vxee commented Aug 17, 2024

@mnajdova Can you help to review this?

@alexfauquette alexfauquette merged commit f62954b into mui:next Aug 19, 2024
@Vxee
Copy link
Contributor Author

Vxee commented Aug 20, 2024

@alexfauquette Thanks. Do you now when will use the next branch to deploy the document site again? I want to verify my function.

@alexfauquette
Copy link
Member

I want to verify my function.

You can already test on https://deploy-preview-43139--material-ui.netlify.app/

Notice the format https://deploy-preview-<PR number>--material-ui.netlify.app/

@Vxee
Copy link
Contributor Author

Vxee commented Sep 7, 2024

@alexfauquette I have verified my function, and it is working! I have created anothor MR to update the jsx name exposed in window. It should be jsxRutime.

After that, I will create a public chrome extension, so it can be used by everyone.
image
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope: docs-infra Involves the docs-infra product (https://www.notion.so/mui-org/b9f676062eb94747b6768209f7751305).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants