Skip to content

Conversation

cherniavskii
Copy link
Member

These screenshots are empty anyway (we don't wait until they load), and they're not using packages built from the branch.

@cherniavskii cherniavskii added test scope: code-infra Changes related to the core-infra product. labels Jul 29, 2025
@@ -36,6 +36,7 @@
"react-dom": "catalog:",
"react-router": "catalog:",
"react-transition-group": "catalog:",
"tsx": "catalog:"
"tsx": "catalog:",
"vite": "catalog:"
Copy link
Member Author

Choose a reason for hiding this comment

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

Added vite as dependency, it's used directly in the build script

@cherniavskii cherniavskii added the internal Behind-the-scenes enhancement. Formerly called “core”. label Jul 29, 2025
@cherniavskii cherniavskii requested a review from a team July 29, 2025 18:25
@mui-bot
Copy link

mui-bot commented Jul 29, 2025

Deploy preview: https://deploy-preview-18970--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/DataGrid 0B(0.00%) 0B(0.00%)
@mui/x-data-grid-pro 0B(0.00%) ▼-3B(0.00%)
@mui/x-data-grid-pro/DataGridPro 0B(0.00%) ▼-3B(0.00%)
@mui/x-data-grid-premium 0B(0.00%) ▼-3B(0.00%)
@mui/x-data-grid-premium/DataGridPremium 0B(0.00%) ▼-4B(0.00%)
@mui/x-charts 0B(0.00%) 0B(0.00%)
@mui/x-charts-pro 0B(0.00%) ▼-3B(0.00%)
@mui/x-date-pickers 0B(0.00%) 0B(0.00%)
@mui/x-date-pickers-pro 0B(0.00%) ▼-6B(-0.01%)
@mui/x-tree-view 0B(0.00%) 0B(0.00%)
@mui/x-tree-view-pro 0B(0.00%) ▼-2B(-0.01%)

Details of bundle changes

Generated by 🚫 dangerJS against b42281b

@cherniavskii cherniavskii added the type: enhancement It’s an improvement, but we can’t make up our mind whether it's a bug fix or a new feature. label Jul 29, 2025
@cherniavskii cherniavskii marked this pull request as ready for review July 29, 2025 18:32
@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged. label Jul 29, 2025
Copy link

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

@@ -119,6 +121,11 @@ async function main() {
return;
}

if (codesandboxIframeDemos.some((demo) => route.includes(demo))) {
// Ignore codesandbox embedded demos since they're not using packages built from the branch anyway.
return;
Copy link
Member

Choose a reason for hiding this comment

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

I'm surprised to see all these blacklist patterns here. I thought we completely switched to negative globs in https://github.com/mui/mui-x/blob/master/test/regressions/testsBySuite.ts. Those are much better as they just avoid bundling the unused demos altogether, which is better for performance.

Copy link
Member Author

Choose a reason for hiding this comment

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

Updated 👍🏻

@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged. label Jul 30, 2025
@cherniavskii cherniavskii requested a review from Janpot July 31, 2025 08:37
Signed-off-by: Andrew Cherniavskii <andrew.cherniavskii@gmail.com>
Copy link
Member

@Janpot Janpot left a comment

Choose a reason for hiding this comment

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

Good for me. Since you left this in I assume it's required for some reason. If you don't mind expanding the comment on why this can't go in the glob patterns? Just to avoid the next maintainer from adding more of these.

Signed-off-by: Andrew Cherniavskii <andrew.cherniavskii@gmail.com>
@cherniavskii cherniavskii merged commit 3911382 into mui:master Jul 31, 2025
22 checks passed
@cherniavskii cherniavskii deleted the skip-codesandbox-demos-in-regression-tests branch July 31, 2025 13:35
Comment on lines -177 to 178
"vite": "^7.0.6",
"vite": "catalog:",
"vitest": "catalog:",
Copy link
Member

@oliviertassinari oliviertassinari Aug 2, 2025

Choose a reason for hiding this comment

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

I'm confused on this one. I would have expected the opposite move:

Suggested change
"vite": "^7.0.6",
"vite": "catalog:",
"vitest": "catalog:",
"vite": "^7.0.6",
"vitest": "^3.2.4",

To what I understand, catalog is for dependencies, where we can't have one package at the root's package.json. In the case of devDependencies, we can, so catalog only add indirections, so should be removed?

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah, you mean that we don't care about having different versions of dev dependencies?
IDK, perhaps, but wouldn't dependatabot still try to update bump them to the latest version anyway?

Copy link
Member

Choose a reason for hiding this comment

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

Ah, you mean that we don't care about having different versions of dev dependencies?

I imagine that if a dev dependency is shared between packages, we can have it set at the root package.json, in which case, we can't have multiple version.

Copy link
Member Author

@cherniavskii cherniavskii Aug 4, 2025

Choose a reason for hiding this comment

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

we can have it set at the root package.json

This was the case before this PR, but the build script in test/regressions didn't see it, so I had to declare it there too: #18970 (comment)

Copy link
Member

Choose a reason for hiding this comment

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

but the build script in test/regressions didn't see it

Have to agree that in the past I also have seen vite particularly act strange sometimes if it is installed at the workspace root.

Advantages of declaring at he root:

  • single place to declare dev dependencies, naturally kept in sync across workspaces

Advantages of declaring at the package level

  • packages remain self-contained units. i.e. they can be copied between monorepos and still work. Not that you necessarily do this often in practice, but as a principle it establishes the package boundary as very strict.
  • dev dependencies that are only meant for specific packages are not importable by all.
  • Some tooling may not expect to be placed at the root of a monorepo and act strange.

Under pnpm, for both solutions, the overhead should be minimal

My personal opinion:
I think we should install tooling exactly where you want to run it from. i.e. vitest, eslint, prettier,... from the monorepo root, but when vite is being run fro the package itself, install it there.

I'm not a huge fan of catalog: dependencies. It creates a system of defining dependency ranges that does not port well between package managers, and therefore is not expected to be well supported by tooling. I think it would be more appropriate to rely on renovatebot to update packages in sync, and to rely on linting (e.g. syncpack, or our own) to guard against manual mishaps.

@@ -24,9 +24,18 @@ const docsImports = import.meta.glob<React.ComponentType>(
'!docsx/data/date-pickers/date-calendar/DateCalendarServerRequest', // Has random behavior (TODO: Use seeded random)
'!docsx/data/charts/tooltip/Custom*', // Composition example
'!docsx/data/charts/tooltip/Item*', // Composition example
'!docsx/data/charts/tooltip/AxisFormatter',
Copy link
Member

@oliviertassinari oliviertassinari Aug 2, 2025

Choose a reason for hiding this comment

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

Are we trying to move away completely from the "Exclusions" pattern, to only use the NoSnap suffix pattern?

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 don't know why these didn't have NoSnap in their filenames, I just reflected here the same logic that was already present in test/regressions/index.test.ts.
But perhaps NoSnap suffix would be a bit better because it's more explicit.

cc @mui/xcharts

Copy link
Member

Choose a reason for hiding this comment

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

All those demo are related to the Tooltip which by default does not show up in screenshot (you need to interact with the chart) so all the charts/tooltip/ demo are kind of useless for argos

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal Behind-the-scenes enhancement. Formerly called “core”. scope: code-infra Changes related to the core-infra product. test type: enhancement It’s an improvement, but we can’t make up our mind whether it's a bug fix or a new feature.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants