mui-x icon indicating copy to clipboard operation
mui-x copied to clipboard

[core] Use re exported utils from packages in docs examples

Open LukasTy opened this issue 1 year ago • 5 comments

This is a follow-up to: https://github.com/mui/mui-x/pull/13823#discussion_r1682809573

  • Add <package>/utils export with utilities, that are used within documentation examples
    • Add paid package re-exporting of such utility from base package (Charts, Pickers)
    • What to do with DataGrid? It already has utils export and it is also re-exported on root. 🙈
  • Use new re-exports in the documentation examples in turn "hiding" the @mui/utils usage from end users

LukasTy avatar Jul 19 '24 10:07 LukasTy

Deploy preview: https://deploy-preview-13901--material-ui-x.netlify.app/

Generated by :no_entry_sign: dangerJS against 5079f86a69edcb3d4a896ce0afbaf626e9f75b9a

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

This pull request has conflicts, please resolve those before we can evaluate the pull request.

github-actions[bot] avatar Jul 31 '24 13:07 github-actions[bot]

This PR is several month old, is not a draft but has no review requested What is its current state?

flaviendelangle avatar Oct 09 '24 09:10 flaviendelangle

The general direction of the PR makes sense to me, but I wouldn't want to be the reviewer, as I am not fully aware of the scope and usage of these utils in all X products :)

mnajdova avatar Oct 17 '24 13:10 mnajdova

The logic seems nice to me I just wonder what it should look like once we have Base UI X (and stuff like useId is in the Base UI utils package)

Do we export from Base UI X packages AND MUI X packages ? Do we only export from the Base UI X packages ? If the Base UI utils package is public, do we say to people to use it directly ?

Just to avoid doing something we would undo in a few months

flaviendelangle avatar Oct 17 '24 13:10 flaviendelangle

This pull request has conflicts, please resolve those before we can evaluate the pull request.

github-actions[bot] avatar Oct 22 '24 15:10 github-actions[bot]

The logic seems nice to me I just wonder what it should look like once we have Base UI X (and stuff like useId is in the Base UI utils package)

Do we export from Base UI X packages AND MUI X packages ? Do we only export from the Base UI X packages ? If the Base UI utils package is public, do we say to people to use it directly ?

Does the relation still matter if we know that the docs are going to be different and the package will be probably standalone as well? 🤔 I think that we would solve this question when such a problem is present. 👌 Personally, I don't see a big problem in showcasing the @mui/utils usage and having it public. But it has a drawback as it would require the @mui/utils dependency to be present in most cases on user setups. 🙈

LukasTy avatar Nov 11 '24 14:11 LukasTy

This pull request has conflicts, please resolve those before we can evaluate the pull request.

github-actions[bot] avatar Nov 14 '24 09:11 github-actions[bot]

@LukasTy is this still something we want to pursue?

michelengelen avatar Dec 27 '24 12:12 michelengelen

@LukasTy is this still something we want to pursue?

That's up to the team and Olivier to decide. It was the result of exploring a way to "hide" @mui/utils usage. 🤷

LukasTy avatar Dec 27 '24 12:12 LukasTy

From what I understand, most (all?) of those utils will move to the base ui utils package. If this new package is public, then IMHO this PR should be closed If this new package is internal, then we still have the same topic

flaviendelangle avatar Dec 30 '24 07:12 flaviendelangle

Closing it as it looks like there is no consensus in this regard yet. 🙈 I can return to this PR if we reach a decision. 👌

LukasTy avatar Jan 31 '25 14:01 LukasTy