Skip to content

Commit

Permalink
Merge branch 'master' into remove-cjs
Browse files Browse the repository at this point in the history
  • Loading branch information
Janpot authored Jan 8, 2025
2 parents a31414b + 0332535 commit 6f5ae02
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 50 deletions.
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
# Material UI Sync plugin
# Material UI Sync plugin 🧪

<p class="description">Sync is a Figma plugin that generates Material UI themes directly from design to code.</p>

:::warning
This plugin is experimental.
:::

## Introduction

[Material UI Sync](https://www.figma.com/community/plugin/1336346114713490235/material-ui-sync) is a Figma plugin that lets you generate a theme from the [Material UI for Figma Design Kit](https://www.figma.com/community/file/912837788133317724/material-ui-for-figma-and-mui-x).

:::warning
Sync works in combination with the [Material UI for Figma Design Kit v5.16.0](https://github.com/mui/mui-design-kits/releases) and later.
Other kits, such as the Joy UI Design Kit, are not supported yet.
:::

<img src="/static/material-ui/design-resources/sync.png" style="width: 814px;" alt="Customizing the Material UI Switch component in Figma with the Sync plugin running." width="1628" height="400" />

Sync works in combination with the [Material UI for Figma Design Kit v5.16.0](https://github.com/mui/mui-design-kits/releases) and later.

## Running the plugin

If you don't have the [complete and latest version](/store/items/figma-react/) of the Material UI for Figma Design Kit installed, you can test the plugin by using the [Community version](https://www.figma.com/community/file/912837788133317724/material-ui-for-figma-and-mui-x) instead.
Expand Down
3 changes: 1 addition & 2 deletions docs/data/material/getting-started/overview/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ It includes a comprehensive collection of prebuilt components that are ready for

:::info
Material UI v6 supports Material Design 2.
Adoption of Material Design 3 is tentatively planned for a future Material UI version.
You can follow [this GitHub issue](https://github.com/mui/material-ui/issues/29345) for future updates.
You can follow [this GitHub issue](https://github.com/mui/material-ui/issues/29345) for future design-related updates.
:::

## Advantages of Material UI
Expand Down
2 changes: 1 addition & 1 deletion docs/data/material/pages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ const pages: MuiPage[] = [
{
pathname: '/material-ui/design-resources/material-ui-sync',
title: 'Figma Sync plugin',
beta: true,
unstable: true,
},
],
},
Expand Down
9 changes: 2 additions & 7 deletions docs/src/components/productMaterial/MaterialEnd.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,16 +103,11 @@ export default function MaterialEnd({ noFaq }: MaterialEndProps) {
Does it support Material Design 3?
</Typography>
<Typography>
The adoption of Material Design 3 is tentatively planned for Material UI v7. See
the{' '}
<Link href="https://mui.com/versions/#release-schedule">
the release schedule
</Link>{' '}
and follow{' '}
Material UI currently adopts Material Design 2. You can follow{' '}
<Link href="https://github.com/mui/material-ui/issues/29345">
this GitHub issue
</Link>{' '}
for future updates.
for future design-related updates.
</Typography>
</div>
</ListItem>
Expand Down
2 changes: 1 addition & 1 deletion test/bundling/fixtures/next-webpack4/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"@mui/styles": "workspace:*",
"@mui/system": "workspace:*",
"@mui/utils": "workspace:*",
"next": "14.2.15",
"next": "14.2.21",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-is": "^17.0.2"
Expand Down
2 changes: 1 addition & 1 deletion test/bundling/fixtures/next-webpack5/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"@mui/styles": "workspace:*",
"@mui/system": "workspace:*",
"@mui/utils": "workspace:*",
"next": "14.2.15",
"next": "14.2.21",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-is": "18.2.0"
Expand Down
8 changes: 3 additions & 5 deletions test/e2e/TestViewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,9 @@ function TestViewer(props) {
}, []);

return (
<React.Suspense fallback={<div aria-busy />}>
<div aria-busy={!ready} data-testid="testcase">
{children}
</div>
</React.Suspense>
<div aria-busy={!ready} data-testid="testcase">
{children}
</div>
);
}

Expand Down
43 changes: 16 additions & 27 deletions test/regressions/TestViewer.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import * as React from 'react';
import PropTypes from 'prop-types';
import { useFakeTimers } from 'sinon';
import Box from '@mui/material/Box';
import GlobalStyles from '@mui/material/GlobalStyles';
import JoyBox from '@mui/joy/Box';
Expand Down Expand Up @@ -29,13 +28,6 @@ function TestViewer(props) {
document.fonts.addEventListener('loading', handleFontsEvent);
document.fonts.addEventListener('loadingdone', handleFontsEvent);

// Use a "real timestamp" so that we see a useful date instead of "00:00"
// TODO: uncomment once we enable eslint-plugin-react-compiler // eslint-disable-next-line react-compiler/react-compiler -- useFakeTimers is not a React hook
// eslint-disable-next-line react-hooks/rules-of-hooks -- not a React hook
const clock = useFakeTimers({
now: new Date('Mon Aug 18 14:11:54 2014 -0500'),
toFake: ['Date'],
});
// In case the child triggered font fetching we're not ready yet.
// The fonts event handler will mark the test as ready on `loadingdone`
if (document.fonts.status === 'loaded') {
Expand All @@ -45,7 +37,6 @@ function TestViewer(props) {
return () => {
document.fonts.removeEventListener('loading', handleFontsEvent);
document.fonts.removeEventListener('loadingdone', handleFontsEvent);
clock.restore();
};
}, []);

Expand Down Expand Up @@ -76,29 +67,27 @@ function TestViewer(props) {
},
}}
/>
<React.Suspense fallback={<div aria-busy />}>
{window.location.pathname.startsWith('/docs-joy') ? (
<CssVarsProvider>
<JoyBox
aria-busy={!ready}
data-testid="testcase"
data-testpath={path}
sx={{ bgcolor: 'background.body', ...viewerBoxSx }}
>
{children}
</JoyBox>
</CssVarsProvider>
) : (
<Box
{window.location.pathname.startsWith('/docs-joy') ? (
<CssVarsProvider>
<JoyBox
aria-busy={!ready}
data-testid="testcase"
data-testpath={path}
sx={{ bgcolor: 'background.default', ...viewerBoxSx }}
sx={{ bgcolor: 'background.body', ...viewerBoxSx }}
>
{children}
</Box>
)}
</React.Suspense>
</JoyBox>
</CssVarsProvider>
) : (
<Box
aria-busy={!ready}
data-testid="testcase"
data-testpath={path}
sx={{ bgcolor: 'background.default', ...viewerBoxSx }}
>
{children}
</Box>
)}
</React.Fragment>
);
}
Expand Down

0 comments on commit 6f5ae02

Please sign in to comment.