Skip to content

redirect next.mui.com/x/* to mui.com/x/*#36296

Closed
cherniavskii wants to merge 4 commits intomui:nextfrom
cherniavskii:next-mui-com-redirect
Closed

redirect next.mui.com/x/* to mui.com/x/*#36296
cherniavskii wants to merge 4 commits intomui:nextfrom
cherniavskii:next-mui-com-redirect

Conversation

@cherniavskii
Copy link
Member

Currently, MUI X v6 docs are available under https://next.mui.com/x/whats-new/
But once we release the v6 stable, we want to redirect to mui.com/x/* where the v6 stable docs will be deployed.

@cherniavskii cherniavskii added the docs Improvements or additions to the documentation. label Feb 22, 2023
/r/toolpad-* https://mui-toolpad-docs.netlify.app/r/toolpad-:splat 200

/* https://mui.com/:splat 301!
/* https://mui.com/:splat 302!
Copy link
Member Author

Choose a reason for hiding this comment

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

@mui-bot
Copy link

mui-bot commented Feb 22, 2023

Bundle size will be reported once CircleCI build #505624 finishes.

Generated by 🚫 dangerJS against f6c548e

/x/* https://mui.com/x/:splat 302!
## Unlike the store that expect to be hosted under a subfolder,
## MUI X is configured to be hosted at the root.
/static/x/* https://docs-next--material-ui-x.netlify.app/static/x/:splat 200
Copy link
Member

@oliviertassinari oliviertassinari Feb 22, 2023

Choose a reason for hiding this comment

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

I guess we should remove this and the rest, since we redirect developers.

Suggested change
/static/x/* https://docs-next--material-ui-x.netlify.app/static/x/:splat 200

Copy link
Member Author

Choose a reason for hiding this comment

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

I want this change to be easily reversible - once we start working on v7, removing this redirect will be enough to host v7 docs under next.mui.com

/r/toolpad-* https://mui-toolpad-docs.netlify.app/r/toolpad-:splat 200

/* https://mui.com/:splat 301!
/* https://mui.com/:splat 302!
Copy link
Member Author

Choose a reason for hiding this comment

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

This line is causing a side-effect - deploy previews from PRs are redirected to mui.com 🙃
See https://deploy-preview-36296--material-ui.netlify.app/

I guess the goal was to redirect next.mui.com/* => mui.com/*, so maybe to this instead?

Suggested change
/* https://mui.com/:splat 302!
https://next.mui.com/* https://mui.com/:splat 302!

cc @m4theushw

Copy link
Member Author

Choose a reason for hiding this comment

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

It's probably also the reason why test_e2e_website fails

Copy link
Member

Choose a reason for hiding this comment

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

We actually have this exact redirect, just commented out on L11.
Maybe uncomment it and replace it with 302 while also removing this one? 🤔

Copy link
Member Author

Choose a reason for hiding this comment

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

Let's give it a try

@m4theushw
Copy link
Collaborator

Wouldn't be better to add a redirect in master to the other domain? Merging this change in next will force us to keep the next.mui.com Netlify site forever. See https://answers.netlify.com/t/redirecting-domain-alias/40622/3 After the stable release of MUI X I was planning to remove next and create a v5.x branch for v5.mui.com. https://v5.mui.com/ is already even live.

@cherniavskii
Copy link
Member Author

Wouldn't be better to add a redirect in master to the other domain? Merging this change in next will force us to keep the next.mui.com Netlify site forever.

Yes, I think it's possible to redirect from next.mui.com on the master branch.
But we will still have to keep the next branch deployed on the next.mui.com to have the static files redirected (fbc0d82), right?

Simplifying branches, subdomains, and redirects would be awesome! But I don't think I fully understand how it works right now, so there are high changes I'll break something without even knowing that 😅

@cherniavskii
Copy link
Member Author

@oliviertassinari @m4theushw @LukasTy Can you take a look again?
Currently, https://next.mui.com/x/react-data-grid/getting-started/ points to outdated docs (v6.0.0-beta.5) and it would be great to have it redirected to the latest docs.

Preview deployment from this branch seems to work - https://deploy-preview-36296--material-ui.netlify.app/x/react-data-grid/ redirects to mui.com

@cherniavskii cherniavskii marked this pull request as ready for review April 7, 2023 15:15
const anchor = page.locator('.DocSearch-Hits a:has-text("Card")');

await expect(anchor.first()).toHaveAttribute('href', '/material-ui/react-card/#main-content');
await expect(anchor.first()).toHaveAttribute('href', '/material-ui/react-card/');
Copy link
Member Author

Choose a reason for hiding this comment

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

To sync with #35686

@mapache-salvaje
Copy link
Contributor

@cherniavskii what's the status of this PR?

@LukasTy
Copy link
Member

LukasTy commented Sep 4, 2023

what's the status of this PR?

We seem to have totally forgotten about it. 🙈
At this point, the usefulness of this is questionable, if we are considering starting work on v7 in the near future. 🤔

@mapache-salvaje
Copy link
Contributor

@LukasTy ah ok, I wasn't sure if it was forgotten or if the changes had already been made somewhere else potentially. Since it's 6 months old now I'll go ahead and close it, but we can always reopen it if it's needed.

@cherniavskii cherniavskii deleted the next-mui-com-redirect branch September 4, 2023 17:34
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.

6 participants