Skip to content

Commit 3cfe693

Browse files
committed
release v3.0.0-alpha.0
1 parent 4ed88a6 commit 3cfe693

File tree

12 files changed

+112
-266
lines changed

12 files changed

+112
-266
lines changed

apps/material-react-table-docs/components/mdx/InstallCommand.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { SampleCodeSnippet } from './SampleCodeSnippet';
55
type Tab = 'npm' | 'pnpm' | 'yarn' | 'bun';
66

77
const defaultPackagesString =
8-
'material-react-table@2.13.2 @mui/material@5.16.7 @mui/x-date-pickers7.14.0 @mui/icons-material5.16.7 @emotion/react @emotion/styled';
8+
'material-react-table @mui/material @mui/x-date-pickers @mui/icons-material @emotion/react @emotion/styled';
99

1010
export const InstallCommand = ({
1111
packagesString = defaultPackagesString,

apps/material-react-table-docs/components/mdx/SampleCodeSnippet.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ export const SampleCodeSnippet = ({ paperSxProps, ...props }: Props) => {
110110
{tokens.map((line, i) => (
111111
<div
112112
key={i}
113-
{...getLineProps({ line, key: i })}
113+
{...getLineProps({ line })}
114114
style={{
115115
textDecoration: line[0].content.startsWith('-')
116116
? 'line-through'
@@ -123,7 +123,7 @@ export const SampleCodeSnippet = ({ paperSxProps, ...props }: Props) => {
123123
}}
124124
>
125125
{line.map((token, key) => (
126-
<span key={key} {...getTokenProps({ token, key })} />
126+
<span key={key} {...getTokenProps({ token })} />
127127
))}
128128
</div>
129129
))}

apps/material-react-table-docs/components/mdx/SourceCodeSnippet.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@ export const SourceCodeSnippet = ({
451451
{tokens.map((line, i) => (
452452
<div
453453
key={i}
454-
{...getLineProps({ line, key: i })}
454+
{...getLineProps({ line })}
455455
style={{
456456
...style,
457457
display:
@@ -485,10 +485,7 @@ export const SourceCodeSnippet = ({
485485
return null;
486486
}
487487
return (
488-
<span
489-
key={key}
490-
{...getTokenProps({ token, key })}
491-
/>
488+
<span key={key} {...getTokenProps({ token })} />
492489
);
493490
})}
494491
</div>

apps/material-react-table-docs/components/navigation/TopBar.tsx

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ export const TopBar = ({ navOpen, setNavOpen }: Props) => {
151151
<Select
152152
onOpen={() => plausible('version-select')}
153153
MenuProps={{ disableScrollLock: true }}
154-
value="v2"
154+
value="v3"
155155
size="small"
156156
sx={{ m: '8px', height: '30px' }}
157157
>
@@ -163,7 +163,15 @@ export const TopBar = ({ navOpen, setNavOpen }: Props) => {
163163
V1
164164
</MenuItem>
165165
</Link>
166-
<MenuItem sx={{ m: 0 }} value="v2">
166+
<Link
167+
legacyBehavior
168+
href={`https://v2.material-react-table.com/${pathname}`}
169+
>
170+
<MenuItem sx={{ m: 0 }} value="v1">
171+
V2
172+
</MenuItem>
173+
</Link>
174+
<MenuItem sx={{ m: 0 }} value="v3">
167175
V3
168176
</MenuItem>
169177
</Select>

apps/material-react-table-docs/components/navigation/routes.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ export const routes: Array<RouteItem> = [
3737
label: 'Usage',
3838
},
3939
{
40-
href: '/docs/getting-started/migrating-to-v2',
41-
label: 'Migrating to v2',
40+
href: '/docs/getting-started/migrating-to-v3',
41+
label: 'Migrating to v3',
4242
},
4343
],
4444
},

apps/material-react-table-docs/pages/docs/getting-started/migrating-to-v2.mdx

Lines changed: 0 additions & 210 deletions
This file was deleted.
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
import Head from 'next/head';
2+
import { InstallCommand } from '../../../components/mdx/InstallCommand';
3+
4+
<Head>
5+
<title>
6+
{'Migrating to Material React Table V3 - Material React Table V3 Docs'}
7+
</title>
8+
<meta
9+
name="description"
10+
content="Migrating to Material React Table V3 from V2"
11+
/>
12+
</Head>
13+
14+
## Migrating to Material React Table V3 from V2
15+
16+
This will be the easiest MRT upgrade ever! Material React Table V3 is mostly just a peer dependency bump to Material UI V6. The [Material UI V6 migration](https://mui.com/material-ui/migration/upgrade-to-v6/) is also relatively easy. This should take less than an hour to upgrade in most cases. Definitely a stark contrast from the Material UI V4 to V5 upgrade 💀.
17+
18+
### New Feature Highlights
19+
20+
1. Compatible with Material UI V6
21+
2. **Almost no other changes**. MRT is not taking advantage of the new optional features in Material UI V6 yet. MRT V3 will serve as an easy upgrade target for those who are just looking to upgrade their Material UI package versions.
22+
23+
### Upgrade Dependencies
24+
25+
1. Upgrade Material UI to V6
26+
27+
Before upgrading Material React Table, you need to upgrade Material UI to V6. You will spend most of your time here. Follow the [Material UI V6 migration guide](https://mui.com/material-ui/migration/upgrade-to-v6/) to upgrade your Material UI packages.
28+
29+
You can get started by running the following command to set the mui-related dependencies to the latest versions in your `package.json`. This will not perform the full install yet.
30+
31+
```bash
32+
npx npm-check-updates -u @mui/material @mui/x-date-pickers @mui/icons-material @emotion/react @emotion/styled
33+
```
34+
35+
And then perform the actual install (downloading the new versions):
36+
37+
<InstallCommand packagesString="@mui/material @mui/x-date-pickers @mui/icons-material @emotion/react @emotion/styled" />
38+
39+
2. Upgrade Material React Table to V3
40+
41+
Run this command to set the `material-react-table` dependency to the latest version in your `package.json`. This will not perform the full install yet.
42+
43+
```bash
44+
npx npm-check-updates -u material-react-table
45+
```
46+
47+
And then perform the actual install (downloading the new version):
48+
49+
<InstallCommand packagesString="material-react-table" />
50+
51+
You should now be on Material React Table V3! Look for any code or type errors in your project and fix them as needed.
52+
53+
### Breaking Changes
54+
55+
- `@mui/material` and `@mui/icons-material` v6.0.0 are now minimum required versions of Material UI packages
56+
- `@mui/x-date-pickers` v7.15.0 is now a minimum required dependency
57+
58+
- Removed deprecated `MRT_Virtualizer` type in favor of separate `MRT_RowVirtualizer` and `MRT_ColumnVirtualizer` types
59+
60+
- Removed deprecated `text` in favor of the more consistent `label` type in dropdown/autocomplete/select option types.
61+
62+
> Can I uninstall Emotion Yet? No, Emotion is still required for Material React Table V3, but it won't be for long. MRT V4 will remove the Emotion dependency in favor of [Pigment CSS](https://mui.com/blog/introducing-pigment-css/).
63+
64+
<br />
65+
66+
Is anything missing from this v3 migration guide? Make a PR or join the [Discord](https://discord.gg/5wqyRx6fnm) to discuss.

apps/material-react-table-docs/pages/roadmap.mdx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,9 @@ import Head from 'next/head';
1212

1313
Here is what is being planned for the future of Material React Table.
1414

15-
### Version 2 Roadmap (August 2024)
16-
17-
Version 2 development is finished, and now only the future versions of MRT are being worked on.
18-
1915
### Version 3 Roadmap (2024)
2016

21-
Material React Table Version 3 is being worked on to support the release of Material UI V6. MRT V3 will be a smaller upgrade that will create an easier target for anyone to easily upgrade to Material UI V6 and MRT V3.
17+
Only small feature releases and bug fixes are planned for Material React Table V3. Work on MRT V4 will be the priority. Version 3's main purpose is to be an easy upgrade target for those who are looking to upgrade their Material UI packages to V6.
2218

2319
### Beyond Version 3 (2025 and Beyond)
2420

0 commit comments

Comments
 (0)