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] Add @mui/base deprecation callout #45030

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

Conversation

mj12albert
Copy link
Member

@mj12albert mj12albert commented Jan 15, 2025

Part of #44910

  • Added a callout to all the /base-ui/* pages (example)

  • Removed the "Planned"/"Preview" chips from the sidebar

  • Some previously "planned" components are done in the new Base UI, the callout is just repeated in the body e.g. RadioGroup

  • Some planned ones are still not yet done in the new package, the body keeps the link to the related GH issue but the text is changed a bit, e.g. Drawer

  • I have followed (at least) the PR section of the contributing guide.

@mj12albert mj12albert added the docs Improvements or additions to the documentation label Jan 15, 2025
Comment on lines 11 to 22
<Alert severity="warning">
<code>@mui/base</code> has been deprecated, please use the new Base UI{' '}
<Link href={props.newComponentUrl}>{props.newComponentName} Component</Link> instead.
</Alert>
);
}
// console.log(props);
return (
<Alert severity="warning">
<code>@mui/base</code> has been deprecated, if you&apos;re looking for an unstyled React
component library try out <Link href="https://www.base-ui.com">Base UI</Link>
</Alert>
Copy link
Member Author

Choose a reason for hiding this comment

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

Please suggest some exact wording if this seems too short (or too blunt) @samuelsycamore @colmtuite 🙏

Copy link
Contributor

@samuelsycamore samuelsycamore Jan 15, 2025

Choose a reason for hiding this comment

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

For this text, how about:

@mui/base has been deprecated and replaced by Base UI. We strongly advise using the newer package instead.

and for the components that have a Base UI equivalent we can say:

@mui/base has been deprecated and replaced by Base UI. Please use the Base UI {{Whatever}} component instead.

@mj12albert mj12albert force-pushed the docs/mui-base-deprecation branch from dcf6140 to b3000e9 Compare January 15, 2025 14:41
@Janpot
Copy link
Member

Janpot commented Jan 15, 2025

would it make sense to also deprecate the actual @mui/base package on npm and remove it from the repository? It would be helpful to not have to keep this package's code infra up-to-date and solve edge-cases that emerge in it while the core repo evolves.

@@ -3,6 +3,8 @@ productId: base-ui
title: React Radio Group component
githubLabel: 'component: radio'
waiAria: https://www.w3.org/WAI/ARIA/apg/patterns/radio/
newUrl: https://base-ui.com/react/components/radio
Copy link
Member Author

Choose a reason for hiding this comment

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

Screenshot 2025-01-15 at 10 54 19 PM

For these "planned" ones, we should probably change the text in the "...isn't available yet..." callout too?

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe we should just remove these pages altogether (since there are no plans for them in mui/base)?

Copy link
Member Author

Choose a reason for hiding this comment

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

A lot of them are actually done and exist in Base UI now (RadioGroup, ToggleGroup, Tooltip), maybe we can just repeat the deprecation message

For the ones that aren't (Drawer, Rating) it could be useful to keep the link to the GH issue if it's still open and exists in the Base UI repo

}) {
if (props.newComponentUrl && props.newComponentName) {
return (
<Alert severity="warning">
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this warrants a big scary red callout to make sure people don't ignore it

Suggested change
<Alert severity="warning">
<Alert severity="error">

}
// console.log(props);
return (
<Alert severity="warning">
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
<Alert severity="warning">
<Alert severity="error">

Comment on lines 11 to 22
<Alert severity="warning">
<code>@mui/base</code> has been deprecated, please use the new Base UI{' '}
<Link href={props.newComponentUrl}>{props.newComponentName} Component</Link> instead.
</Alert>
);
}
// console.log(props);
return (
<Alert severity="warning">
<code>@mui/base</code> has been deprecated, if you&apos;re looking for an unstyled React
component library try out <Link href="https://www.base-ui.com">Base UI</Link>
</Alert>
Copy link
Contributor

@samuelsycamore samuelsycamore Jan 15, 2025

Choose a reason for hiding this comment

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

For this text, how about:

@mui/base has been deprecated and replaced by Base UI. We strongly advise using the newer package instead.

and for the components that have a Base UI equivalent we can say:

@mui/base has been deprecated and replaced by Base UI. Please use the Base UI {{Whatever}} component instead.

@@ -3,6 +3,8 @@ productId: base-ui
title: React Radio Group component
githubLabel: 'component: radio'
waiAria: https://www.w3.org/WAI/ARIA/apg/patterns/radio/
newUrl: https://base-ui.com/react/components/radio
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe we should just remove these pages altogether (since there are no plans for them in mui/base)?

@mj12albert mj12albert force-pushed the docs/mui-base-deprecation branch from 6ee50a3 to edb4154 Compare January 17, 2025 08:52
@mj12albert mj12albert changed the title docs/mui-base-deprecation [docs] Add @mui/base deprecation callout Jan 17, 2025
@mj12albert mj12albert marked this pull request as ready for review January 17, 2025 14:02
@mj12albert mj12albert requested a review from colmtuite January 17, 2025 14:02
@mj12albert
Copy link
Member Author

would it make sense to also deprecate the actual @mui/base package on npm and remove it from the repository?

We could probably do this as soon as this callout is deployed to docs? Marking the package as deprecated on npm can probably do any time though, will discuss this next week with the team~

@mj12albert
Copy link
Member Author

I'll open a separate PR just for the Base UI -> MUI Base text change to not clutter up the diff of this one

@samuelsycamore
Copy link
Contributor

samuelsycamore commented Jan 17, 2025

Tangential: does anyone else find the anchor text really hard to read here? I think there's an issue with the contrast in dark mode at least:

Screenshot 2025-01-17 at 8 10 41 AM

Edit: looks like there's two different sets of styles in play—inside and outside the body of the page:

Screenshot 2025-01-17 at 8 13 37 AM

:::warning
The Base UI Drawer component isn't available yet, but you can upvote [this GitHub issue](https://github.com/mui/base-ui/issues/38) to see it arrive sooner.
:::error
@mui/base has been deprecated and has been replaced by Base UI. Please follow [this GitHub issue](https://github.com/mui/base-ui/issues/38) to track the development of the Drawer component.
Copy link
Contributor

Choose a reason for hiding this comment

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

copyedit nitpick: can drop the second "has been":

Suggested change
@mui/base has been deprecated and has been replaced by Base UI. Please follow [this GitHub issue](https://github.com/mui/base-ui/issues/38) to track the development of the Drawer component.
@mui/base has been deprecated and replaced by Base UI. Please follow [this GitHub issue](https://github.com/mui/base-ui/issues/38) to track the development of the Drawer component.

<Alert severity="error">
@mui/base has been deprecated and has been replaced by Base UI. Please use the Base UI{' '}
<Link href={props.newComponentUrl} color="error.800" underline="always">
{props.newComponentName} Component
Copy link
Contributor

Choose a reason for hiding this comment

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

nitpick: component doesn't need to be capitalized here

Suggested change
{props.newComponentName} Component
{props.newComponentName} component

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Improvements or additions to the documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants