Skip to content

Conversation

@alexfauquette
Copy link
Member

@alexfauquette alexfauquette commented Aug 25, 2025

I moved the plugins folder outside of internals

An easier solution could be to just re(export them from a plugins/index.ts file: #19335

In plugins we have multiple subparts:

  • The plugin and its signature
  • The selectors
  • All the helpers

An option could be to move most of the content of plugins/featurePlugins/useChartCartesianAxis/index.ts in a plugins/featurePlugins/useChartCartesianAxis/internals.ts to get:

  • plugins/featurePlugins/[pluginName]/index.ts: The exported function and types from the plugin
  • plugins/featurePlugins/[pluginName]/internals.ts: All the content of the hook

@mui-bot
Copy link

mui-bot commented Aug 25, 2025

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

Bundle size report

Bundle Parsed size Gzip size
@mui/x-data-grid 0B(0.00%) 0B(0.00%)
@mui/x-data-grid-pro 0B(0.00%) 0B(0.00%)
@mui/x-data-grid-premium 0B(0.00%) 0B(0.00%)
@mui/x-charts 0B(0.00%) 0B(0.00%)
@mui/x-charts-pro 🔺+198B(+0.05%) 🔺+60B(+0.05%)
@mui/x-date-pickers 0B(0.00%) 0B(0.00%)
@mui/x-date-pickers-pro 0B(0.00%) 0B(0.00%)
@mui/x-tree-view 0B(0.00%) 0B(0.00%)
@mui/x-tree-view-pro 0B(0.00%) 0B(0.00%)

Details of bundle changes

Generated by 🚫 dangerJS against 220615d

@JCQuintas
Copy link
Member

An easier solution could be to just re(export them from a plugins/index.ts file: #19335

We could apply this in steps

  • First the one you already did in the other PR, export from file
  • Then change import references in a new PR
  • Change file locations in a last PR

Should be simpler to understand the changes

  • plugins/featurePlugins/[pluginName]/index.ts: The exported function and types from the plugin
  • plugins/featurePlugins/[pluginName]/internals.ts: All the content of the hook

Could be interesting as well. It would probably be more useful to have plugins/featurePlugins/[pluginName]/internals/index.ts so we can stick all the files there

@alexfauquette
Copy link
Member Author

Could be interesting as well. It would probably be more useful to have plugins/featurePlugins/[pluginName]/internals/index.ts so we can stick all the files there

I don't see why putting files in plugins/featurePlugins/[pluginName]/internals/ folder. The usual process is to consider every thing in a sub-folder as internal stuff and only the one exported from the index.ts as public. The introduction of an internals.ts is only to simplify the export to the pro/premium packages.

For me this would add an additional tree depth for no gain

@JCQuintas
Copy link
Member

For me this would add an additional tree depth for no gain

Depends how many files there are. If there are only a couple, yeah, probably no need. If there are lots, then a structure layer would make sense.

All in all it depends on how to subdivide the overload of knowing where each file is. 🤷

@zannager zannager added the scope: charts Changes related to the charts. label Aug 26, 2025
@codspeed-hq
Copy link

codspeed-hq bot commented Aug 26, 2025

CodSpeed Performance Report

Merging #19336 will not alter performance

Comparing alexfauquette:export-plugins (220615d) with master (90d94c7)

Summary

✅ 10 untouched benchmarks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope: charts Changes related to the charts.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants