Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[core] Run @mui/icon-material src:icons #44097

Merged

Conversation

oliviertassinari
Copy link
Member

@oliviertassinari oliviertassinari commented Oct 13, 2024

I noticed this quickly while working on #33746 (comment). This should help tackle: #32846 (we would likely need to do this change anyway).

I have rerun pnpm src:icons to keep it in sync with the codebase. This command used to be run during the icon publish step, until Sebastian moved it to be stored in git to make it easier to spot regressions.

There is so many changes that it's hard to follow, but it's typically:

packages/mui-icons-material/lib/Abc.js

"use strict";
"use client";

-var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
+var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
var _createSvgIcon = _interopRequireDefault(require("./utils/createSvgIcon"));
var _jsxRuntime = require("react/jsx-runtime");
-var _default = exports.default = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
+var _default = exports.default = (0, _createSvgIcon.default)(/*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
  d: "M21 11h-1.5v-.5h-2v3h2V13H21v1c0 .55-.45 1-1 1h-3c-.55 0-1-.45-1-1v-4c0-.55.45-1 1-1h3c.55 0 1 .45 1 1zM8 10v5H6.5v-1.5h-2V15H3v-5c0-.55.45-1 1-1h3c.55 0 1 .45 1 1m-1.5.5h-2V12h2zm7 1.5c.55 0 1 .45 1 1v1c0 .55-.45 1-1 1h-4V9h4c.55 0 1 .45 1 1v1c0 .55-.45 1-1 1M11 10.5v.75h2v-.75zm2 2.25h-2v.75h2z"
}), 'Abc');

and

packages/mui-icons-material/lib/esm/ScreenRotationRounded.js

"use client";
 
-import createSvgIcon from './utils/createSvgIcon';
+import createSvgIcon from "./utils/createSvgIcon.js";
 import { jsx as _jsx } from "react/jsx-runtime";
-export default createSvgIcon( /*#__PURE__*/_jsx("path", {
+export default createSvgIcon(/*#__PURE__*/_jsx("path", {
   d: "M16.48 2.52c3.27 1.55 5.61 4.72 5.97 8.48h1.5C23.44 4.84 18.29 0 12 0l-.66.03 3.81 3.81zM7.52 21.48C4.25 19.94 1.91 16.76 1.55 13H.05C.56 19.16 5.71 24 12 24l.66-.03-3.81-3.81zM9.17.69.69 9.17l14.14 14.14 8.48-8.48zm5.66 20.5L2.81 9.17l6.36-6.36 12.02 12.02z"
 }), 'ScreenRotationSharp');
\ No newline at end of file

Now, I usually never trust something that I don't understand, so I dove a bit to understand what's going on:

@oliviertassinari oliviertassinari added package: icons Specific to @mui/icons core Infrastructure work going on behind the scenes labels Oct 13, 2024
@mui-bot
Copy link

mui-bot commented Oct 13, 2024

Netlify deploy preview

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

@material-ui/core: parsed: +Infinity% , gzip: +Infinity%
@mui/joy: parsed: +Infinity% , gzip: +Infinity%
@material-ui/lab: parsed: +Infinity% , gzip: +Infinity%
@mui/joy/Autocomplete: parsed: +Infinity% , gzip: +Infinity%
Autocomplete: parsed: +Infinity% , gzip: +Infinity%
TextField: parsed: +Infinity% , gzip: +Infinity%
@material-ui/unstyled: parsed: +Infinity% , gzip: +Infinity%
SpeedDialAction: parsed: +Infinity% , gzip: +Infinity%
@mui/joy/Select: parsed: +Infinity% , gzip: +Infinity%
@mui/joy/Menu: parsed: +Infinity% , gzip: +Infinity%
Tooltip: parsed: +Infinity% , gzip: +Infinity%
SwipeableDrawer: parsed: +Infinity% , gzip: +Infinity%
TabList: parsed: +Infinity% , gzip: +Infinity%
SpeedDial: parsed: +Infinity% , gzip: +Infinity%
Pagination: parsed: +Infinity% , gzip: +Infinity%
Alert: parsed: +Infinity% , gzip: +Infinity%
LoadingButton: parsed: +Infinity% , gzip: +Infinity%
Popover: parsed: +Infinity% , gzip: +Infinity%
Drawer: parsed: +Infinity% , gzip: +Infinity%
PaginationItem: parsed: +Infinity% , gzip: +Infinity%
and 271 more changes

Bundle size report

Details of bundle changes (Toolpad)
Details of bundle changes

Generated by 🚫 dangerJS against f08bda0

@oliviertassinari
Copy link
Member Author

oliviertassinari commented Oct 16, 2024

SCR-20241016-rawp

@zannager How did you come up with this assignment? It doesn't match with https://www.notion.so/mui-org/GitHub-community-issues-PRs-Tier-1-12a84fdf50e44595afc55343dac00fca?pvs=4#9734f2f5d754435c8838e74523851d54 or https://www.notion.so/mui-org/Icons-7ff27203df124147850ec3e26d04d517 so I'm curious. I wouldn't want to overwhelm Marija, feels like a bit of a distraction (same for me actually to open this PR but 🤷‍♂️ it was quick 😄).

@mnajdova One of the possible playbook:

  • Remove all label owners. So no more automatic assignments or PRs or Issues. Purely grab-based.
  • Have each team member get ownership of a few scopes, only assign if we feel that we can nail it. (automatic assignment for those).
  • Have them nail each of those scopes, spend 50% of their time on those, and the other 50% on big priorities
  • See how much scope we can cover, if we can cover those scopes, we expend. We don't expend until we instrument each scope with analytics and we clearly see metrics that are green. (number of regressions issue open, number of PRs open for those, issues open with a lot of upvotes, etc.)
  • If we can't cover the other scope we don't. The reasoning is that doing them shallowly is pointless, we would be better off delegating those to the community. We hire to fill the scopes that we don't have the bandwidth to cover.

This would mean that some scopes will get neglected for a while, as we learn.

@zannager
Copy link
Member

How did you come up with this assignment?

I just can't recall if she showed up under suggestions or I leaned towards https://www.notion.so/mui-org/MUI-Core-92686ffc7cc8437280c13e4a3a0cbc56. I refernce to https://www.notion.so/mui-org/MUI-Core-92686ffc7cc8437280c13e4a3a0cbc56 when I see it labeled as "core" but with "Icons" or with child scopes, I usually assigned someone else.

I wouldn't want to overwhelm Marija, feels like a bit of a distraction

I agree, which is why I only assign or request reviews from Marija when she is the sole maintainer. Please let me know if you’d prefer I skip assigning her, even for the products/components she solely owns.

@mnajdova
Copy link
Member

mnajdova commented Oct 17, 2024

Thanks for the explanation for each change Olivier, it helps with the review. I agree with the proposed changes in #44097 (comment), I will try to clean up the owners and bring this up with the core team.

I will ask for a second review from @siriwatknp / @michaldudak as they are the co-owner of the icons package from what I remember. Considering Michal is involved with Base UI now, Jun looks like the right person who we would by default ask a review from.

@mnajdova mnajdova requested a review from siriwatknp October 17, 2024 13:36
@oliviertassinari
Copy link
Member Author

oliviertassinari commented Oct 17, 2024

I just can't recall if she showed up under suggestions or I leaned towards

@zannager Ok thanks, from there, I think:

  1. We should not use https://www.notion.so/mui-org/MUI-Core-92686ffc7cc8437280c13e4a3a0cbc56's owner / maintainers ever for the Tier 1 support duty. It's too high level, not a single person can review all those PRs. It takes a team.
  2. I would propose that we don't ask for review if we have an empty list of maintainers from https://www.notion.so/mui-org/GitHub-community-issues-PRs-Tier-1-12a84fdf50e44595afc55343dac00fca?pvs=4#122cbfe7b6608009b8f2cfd093f83128. It feels better to be self grabbed in those cases (where in parallels we work to have maintainers bandwidth for all scopes).
  3. https://www.notion.so/mui-org/package-icons-92fee06128dd484c84b8d83494ed1137 was outdated, not in sync with https://www.notion.so/mui-org/Icons-7ff27203df124147850ec3e26d04d517, fixed (one day, we will automate this).

I agree, which is why I only assign or request reviews from Marija when she is the sole maintainer. Please let me know if you’d prefer I skip assigning her, even for the products/components she solely owns.

I don't think that we should have exceptions, it adds complexity to the process, let's keep it as simple as we can get away with. With the changes ⬆️, it might be enough.

Copy link
Member

@michaldudak michaldudak left a comment

Choose a reason for hiding this comment

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

It looks like it works correctly. I couldn't spot any errors

@oliviertassinari oliviertassinari merged commit 141fc36 into mui:master Oct 22, 2024
21 checks passed
@oliviertassinari oliviertassinari deleted the mui-icons-material-src-icons branch October 22, 2024 11:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Infrastructure work going on behind the scenes package: icons Specific to @mui/icons
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants