material-ui icon indicating copy to clipboard operation
material-ui copied to clipboard

[core] Include history from the @mui/base components

Open mnajdova opened this issue 1 year ago • 4 comments

Check the commits to understand which files are going to persist the history:

  • NoSsr (used initially as a test case) - https://github.com/mui/material-ui/pull/43028/commits/ccdd8fb7f3fcc1615c51fafa34727a71481e09e1
  • all hooks moved from Base UI - https://github.com/mui/material-ui/pull/43028/commits/6cc90dc71853d150323746dc065110454b59295d
  • Rest of the components moved from Base UI - https://github.com/mui/material-ui/pull/43028/commits/ebdc704a02377f4bcdc1afde219bd13b92958fa3

I don't think we need to port these changes to master, as soon we are going to replace master with next anyway.

Here is an example file after using git mv last commit vs next.


Considering I used git mv, the history is now moved to the Material UI version of the files, which is okay, as packages/mui-base will eventually be removed.

mnajdova avatar Jul 22 '24 12:07 mnajdova

Netlify deploy preview

https://deploy-preview-43028--material-ui.netlify.app/

Bundle size report

No bundle size changes (Toolpad) No bundle size changes

Generated by :no_entry_sign: dangerJS against cac3452fcf4d8db2c5fd4b8fd512fe95337112ef

mui-bot avatar Jul 23 '24 10:07 mui-bot

Ideally we shouldn't lose git history on Base UI files, but I don't have an opinion since I don't know how much time these files will be around.

Let's check after we merge if the history is lost. I am not sure if we can keep the history in both places, considering gh mv is the only option I am aware of for moving the history. Maybe @michaldudak is aware of other option.

mnajdova avatar Jul 23 '24 11:07 mnajdova

According to https://stackoverflow.com/a/44036771 there's some trickery involved if you want to have two copies of a file with history. Have you tried it?

michaldudak avatar Jul 23 '24 11:07 michaldudak

According to https://stackoverflow.com/a/44036771 there's some trickery involved if you want to have two copies of a file with history. Have you tried it?

Oh wow, I haven't tried this. But honestly, if we do plan to remove packages/mui-base, I would just keep it as is. If we decide not to do this after all, I will update the PR to do the steps from the link you shared.

I will hold off a bit with merging until we have a clear decision.

mnajdova avatar Jul 23 '24 11:07 mnajdova

If we could do something similar to how docs of old versions of Material UI work - hosting Base UI docs from a branch, we could remove the sources from the repo anytime (unless @mui/base has a future).

michaldudak avatar Jul 24 '24 09:07 michaldudak

I am closing in favor of https://github.com/mui/material-ui/pull/43076. I've created a script based on the Stackoverflow instructions, it works, we can have history in both locations (I've created new PR to easy up the review without too many commits).

mnajdova avatar Jul 26 '24 10:07 mnajdova