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

Merged
merged 8 commits into from
Jan 20, 2025

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

@mapache-salvaje mapache-salvaje 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?

This comment was marked as resolved.

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

docs/src/modules/components/MuiBaseDeprecation.tsx Outdated Show resolved Hide resolved
docs/src/modules/components/MuiBaseDeprecation.tsx Outdated Show resolved Hide resolved
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

@mapache-salvaje mapache-salvaje 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

This comment was marked as resolved.

@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

@mapache-salvaje
Copy link
Contributor

mapache-salvaje 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

@mj12albert
Copy link
Member Author

mj12albert commented Jan 20, 2025

I think there's an issue with the contrast in dark mode at least:

Fixed in 4105d0c ~ needed to use MarkdownElement to (easily) get the right styles:

out

@mj12albert mj12albert merged commit 5d3028f into mui:master Jan 20, 2025
22 checks passed
@mj12albert mj12albert deleted the docs/mui-base-deprecation branch January 20, 2025 06:55
@colmtuite
Copy link
Contributor

colmtuite commented Jan 20, 2025

@mj12albert I'm seeing duplicate messages

Screenshot 2025-01-20 at 09 16 00

"Please" feels unusual/odd to me, or the wrong tone. I expected something like "We strongly recommend using"

@mj12albert
Copy link
Member Author

mj12albert commented Jan 20, 2025

I'm seeing duplicate messages

It's intentional ~ but here's the PR to update it: #45064 @colmtuite

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.

5 participants