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] Duplicated pages for Base components in Material UI are outdated #35077

Closed
samuelsycamore opened this issue Nov 9, 2022 · 6 comments · Fixed by #35293
Closed

[docs] Duplicated pages for Base components in Material UI are outdated #35077

samuelsycamore opened this issue Nov 9, 2022 · 6 comments · Fixed by #35293
Assignees
Labels
docs Improvements or additions to the documentation package: base-ui Specific to @mui/base package: material-ui Specific to @mui/material

Comments

@samuelsycamore
Copy link
Contributor

samuelsycamore commented Nov 9, 2022

The problem

The Material UI package contains some utility components that it shares in common with MUI Base.

These components are the exact same—they're imported directly from the Base package into Material UI with nothing added.

Am I missing any others?

Right now, the most up-to-date and comprehensive version of the docs on these duplicated components resides within MUI Base. Additionally, the Material UI versions don't offer much of an explanation regarding what these components are, what Base is, and how these components compare/contrast with their Base counterparts.

This presents a great opportunity to educate Material UI users about Base and encourage them to use the Base versions instead of the Material UI versions going forward.

The proposed solution

After talking it over with @oliviertassinari, we were leaning on:

  • Pages for Material UI components that are exact duplicates should be removed and redirected to their corresponding Base pages
    • The Base pages should include a callout explaining their presence in the Material UI package
    • We should merge the content of the two versions to only keep the best of them.
  • The Material UI versions of these components should probably be deprecated in a future major version (v6 or v7)

cc @michaldudak I'd love to hear what you think about this. I think it's the best option to avoid duplicating this content on both sides.

@samuelsycamore samuelsycamore added docs Improvements or additions to the documentation package: material-ui Specific to @mui/material package: base-ui Specific to @mui/base labels Nov 9, 2022
@samuelsycamore samuelsycamore self-assigned this Nov 9, 2022
@michaldudak
Copy link
Member

What do you think about having a very short description on each of these pages saying that this component is a part of MUI Base and it's documented there (and it's reexported from Material UI just for convenience)?
Redirecting to Base docs directly may confuse people (especially if they don't notice the product context changed, they may be surprised to see much fewer components in the menu.

@samuelsycamore
Copy link
Contributor Author

What do you think about having a very short description on each of these pages saying that this component is a part of MUI Base and it's documented there (and it's reexported from Material UI just for convenience)?

@michaldudak In this case, would we remove all other content from the Material UI version of the page? I think this makes sense as a stop-gap measure on the way to deprecation in the future.

@michaldudak
Copy link
Member

In this case, would we remove all other content from the Material UI version of the page? I think this makes sense as a stop-gap measure on the way to deprecation in the future.

Yes, I think this is my preferred option.

@samuelsycamore
Copy link
Contributor Author

Cool, I'm happy to move forward with that plan as long as @oliviertassinari doesn't have any objections.

@oliviertassinari
Copy link
Member

oliviertassinari commented Nov 15, 2022

Redirecting to Base docs directly may confuse people

@michaldudak to be clear on this one. The idea was to remove these components from the left side nav on Material UI. The "redirection" is about the 301 that is necessary to add to not break SEO. So I believe that there won't be the confusion of a magic product change.

having a very short description on each of these pages saying that this component is a part of MUI Base and it's documented there (and it's reexported from Material UI just for convenience)?

We discussed this option. My concern is about the experience when developers search on Google and with Algolia. They will need an extra click when they land on the "wrong" page but I agree it better educates developers.

In this case, would we remove all other content from the Material UI version of the page? I think this makes sense as a stop-gap measure on the way to deprecation in the future.

No objections. I like that we could encourage to import from @mui/base directly on these pages. The strategical move being that we would teach developers how they can keep using MUI when they don't want to use Material UI anymore.

@samuelsycamore
Copy link
Contributor Author

Alright, this sounds like the best course of action to me:

  • Make the Base docs the single source of truth about these components.
  • Replace content on the Material UI pages with info about Base, point users to those docs, and mention that the Material UI versions of the components will be deprecated in the future.
  • When these components are finally deprecated, then we can remove and redirect the Material UI pages.

Does that work?

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 package: base-ui Specific to @mui/base package: material-ui Specific to @mui/material
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants