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

[system] Array reject on spacing transformation fixed #19900

Merged
merged 3 commits into from
Mar 1, 2020
Merged

[system] Array reject on spacing transformation fixed #19900

merged 3 commits into from
Mar 1, 2020

Conversation

savi2w
Copy link

@savi2w savi2w commented Feb 29, 2020

Other than adding and testing the correction purposed by @oliviertassinari, I had to add the following code stretch export * from './spacing'; in the file packages/material-ui-system/src/index.js in order to build the module.

It doesn't seem like a problem, but it seems important to quote those to avoid any type of side-effect.

Closes #19872

@savi2w savi2w changed the title [@mateiral-ui/system] Array reject on spacing transformation fixed [system] Array reject on spacing transformation fixed Feb 29, 2020
@mui-pr-bot
Copy link

mui-pr-bot commented Feb 29, 2020

@material-ui/core: parsed: +0.01% , gzip: -0.15% 😍
@material-ui/lab: parsed: +1.15% , gzip: +1.16%

Details of bundle changes.

Comparing: e6dae39...79659a3

bundle Size Change Size Gzip Change Gzip
styles/createMuiTheme ▲ +4.26 kB (+25.61% ) 20.9 kB ▲ +1.43 kB (+24.41% ) 7.27 kB
Zoom ▲ +3.52 kB (+14.88% ) 27.1 kB ▲ +1.05 kB (+12.94% ) 9.18 kB
Slide ▲ +3.52 kB (+13.73% ) 29.1 kB ▲ +1.04 kB (+11.88% ) 9.78 kB
Grow ▲ +3.49 kB (+14.42% ) 27.7 kB ▲ +1.04 kB (+12.65% ) 9.26 kB
Fade ▲ +3.49 kB (+14.78% ) 27.1 kB ▲ +1.04 kB (+13.02% ) 9.05 kB
TableSortLabel ▲ +3.02 kB (+3.89% ) 80.6 kB ▲ +1.11 kB (+4.56% ) 25.5 kB
Tabs ▲ +3.02 kB (+3.53% ) 88.6 kB ▲ +1.11 kB (+4.11% ) 28.3 kB
Breadcrumbs ▲ +3.02 kB (+3.74% ) 83.6 kB ▲ +1.05 kB (+4.14% ) 26.5 kB
Tab ▲ +3.02 kB (+3.94% ) 79.6 kB ▲ +1.02 kB (+4.19% ) 25.3 kB
SpeedDial ▲ +3.02 kB (+3.49% ) 89.4 kB ▲ +1 kB (+3.68% ) 28.3 kB
ButtonGroup ▲ +3.02 kB (+3.62% ) 86.5 kB ▲ +991 B (+3.87% ) 26.6 kB
SwipeableDrawer ▲ +3.02 kB (+3.27% ) 95.3 kB ▲ +976 B (+3.38% ) 29.9 kB
Alert ▲ +3.02 kB (+3.61% ) 86.6 kB ▲ +969 B (+3.68% ) 27.3 kB
CardActionArea ▲ +3.02 kB (+4.01% ) 78.4 kB ▲ +966 B (+4.06% ) 24.8 kB
BottomNavigationAction ▲ +3.02 kB (+3.98% ) 78.8 kB ▲ +959 B (+4.00% ) 24.9 kB
ToggleButton ▲ +3.02 kB (+3.95% ) 79.4 kB ▲ +943 B (+3.90% ) 25.2 kB
TableHead ▲ +3.02 kB (+4.83% ) 65.4 kB ▲ +929 B (+4.76% ) 20.5 kB
TableFooter ▲ +3.02 kB (+4.83% ) 65.5 kB ▲ +928 B (+4.75% ) 20.5 kB
TableBody ▲ +3.02 kB (+4.83% ) 65.4 kB ▲ +926 B (+4.74% ) 20.5 kB
TableRow ▲ +3.02 kB (+4.80% ) 65.8 kB ▲ +923 B (+4.69% ) 20.6 kB
TableCell ▲ +3.02 kB (+4.69% ) 67.4 kB ▲ +918 B (+4.53% ) 21.2 kB
ExpansionPanelSummary ▲ +3.02 kB (+3.85% ) 81.4 kB ▲ +885 B (+3.57% ) 25.7 kB
StepButton ▲ +3.02 kB (+3.66% ) 85.5 kB ▲ +855 B (+3.27% ) 27 kB
Avatar ▲ +3.02 kB (+4.60% ) 68.5 kB ▲ +1.01 kB (+4.90% ) 21.7 kB
Link ▲ +3.02 kB (+4.51% ) 69.9 kB ▲ +995 B (+4.71% ) 22.1 kB
InputAdornment ▲ +3.02 kB (+4.61% ) 68.4 kB ▲ +987 B (+4.80% ) 21.6 kB
ListItemText ▲ +3.02 kB (+4.62% ) 68.3 kB ▲ +981 B (+4.79% ) 21.5 kB
Dialog ▲ +3.02 kB (+3.63% ) 86.2 kB ▲ +979 B (+3.78% ) 26.9 kB
NativeSelect ▲ +3.02 kB (+3.91% ) 80.1 kB ▲ +978 B (+4.02% ) 25.3 kB
SpeedDialIcon ▲ +3.02 kB (+4.65% ) 67.9 kB ▲ +975 B (+4.80% ) 21.3 kB
DialogTitle ▲ +3.02 kB (+4.67% ) 67.6 kB ▲ +968 B (+4.78% ) 21.2 kB
FormControlLabel ▲ +3.02 kB (+4.58% ) 68.8 kB ▲ +968 B (+4.69% ) 21.6 kB
SnackbarContent ▲ +3.02 kB (+4.72% ) 66.9 kB ▲ +948 B (+4.72% ) 21 kB
Card ▲ +3.02 kB (+4.77% ) 66.2 kB ▲ +947 B (+4.79% ) 20.7 kB
CardHeader ▲ +3.02 kB (+4.61% ) 68.4 kB ▲ +947 B (+4.60% ) 21.5 kB
ListSubheader ▲ +3.02 kB (+4.78% ) 66.1 kB ▲ +944 B (+4.76% ) 20.8 kB
Rating ▲ +3.02 kB (+4.26% ) 73.7 kB ▲ +942 B (+4.14% ) 23.7 kB
TreeItem ▲ +3.02 kB (+3.99% ) 78.5 kB ▲ +942 B (+3.95% ) 24.8 kB
StepConnector ▲ +3.02 kB (+4.78% ) 66.1 kB ▲ +941 B (+4.74% ) 20.8 kB
Toolbar ▲ +3.02 kB (+4.81% ) 65.7 kB ▲ +940 B (+4.78% ) 20.6 kB
FormGroup ▲ +3.02 kB (+4.84% ) 65.4 kB ▲ +939 B (+4.81% ) 20.5 kB
CssBaseline ▲ +3.02 kB (+4.84% ) 65.3 kB ▲ +938 B (+4.79% ) 20.5 kB
Hidden ▲ +3.02 kB (+4.55% ) 69.3 kB ▲ +935 B (+4.50% ) 21.7 kB
AvatarGroup ▲ +3.02 kB (+4.81% ) 65.7 kB ▲ +933 B (+4.74% ) 20.6 kB
ListItemSecondaryAction ▲ +3.02 kB (+4.84% ) 65.4 kB ▲ +933 B (+4.78% ) 20.5 kB
AppBar ▲ +3.02 kB (+4.69% ) 67.4 kB ▲ +932 B (+4.62% ) 21.1 kB
GridListTileBar ▲ +3.02 kB (+4.75% ) 66.6 kB ▲ +930 B (+4.67% ) 20.8 kB
ListItemAvatar ▲ +3.02 kB (+4.83% ) 65.4 kB ▲ +930 B (+4.76% ) 20.5 kB
ListItemIcon ▲ +3.02 kB (+4.83% ) 65.5 kB ▲ +930 B (+4.75% ) 20.5 kB
AlertTitle ▲ +3.02 kB (+4.68% ) 67.5 kB ▲ +929 B (+4.58% ) 21.2 kB
BottomNavigation ▲ +3.02 kB (+4.81% ) 65.7 kB ▲ +929 B (+4.72% ) 20.6 kB
DialogContentText ▲ +3.02 kB (+4.69% ) 67.4 kB ▲ +929 B (+4.60% ) 21.1 kB
Skeleton ▲ +3.02 kB (+4.76% ) 66.3 kB ▲ +929 B (+4.65% ) 20.9 kB
GridListTile ▲ +3.02 kB (+4.71% ) 67.1 kB ▲ +928 B (+4.62% ) 21 kB
CardMedia ▲ +3.02 kB (+4.81% ) 65.7 kB ▲ +926 B (+4.70% ) 20.6 kB
ExpansionPanelDetails ▲ +3.02 kB (+4.84% ) 65.3 kB ▲ +924 B (+4.74% ) 20.4 kB
Grid ▲ +3.02 kB (+4.61% ) 68.4 kB ▲ +924 B (+4.51% ) 21.4 kB
GridList ▲ +3.02 kB (+4.80% ) 65.8 kB ▲ +923 B (+4.68% ) 20.6 kB
ExpansionPanelActions ▲ +3.02 kB (+4.83% ) 65.4 kB ▲ +922 B (+4.71% ) 20.5 kB
Icon ▲ +3.02 kB (+4.78% ) 66.1 kB ▲ +922 B (+4.66% ) 20.7 kB
Divider ▲ +3.02 kB (+4.79% ) 66 kB ▲ +921 B (+4.65% ) 20.7 kB
ToggleButtonGroup ▲ +3.02 kB (+4.75% ) 66.5 kB ▲ +921 B (+4.61% ) 20.9 kB
Badge ▲ +3.02 kB (+4.59% ) 68.7 kB ▲ +920 B (+4.51% ) 21.3 kB
CardActions ▲ +3.02 kB (+4.83% ) 65.4 kB ▲ +920 B (+4.71% ) 20.5 kB
DialogActions ▲ +3.02 kB (+4.83% ) 65.4 kB ▲ +920 B (+4.70% ) 20.5 kB
TableContainer ▲ +3.02 kB (+4.84% ) 65.3 kB ▲ +918 B (+4.71% ) 20.4 kB
DialogContent ▲ +3.02 kB (+4.82% ) 65.6 kB ▲ +917 B (+4.68% ) 20.5 kB
Step ▲ +3.02 kB (+4.79% ) 66 kB ▲ +917 B (+4.64% ) 20.7 kB
Table ▲ +3.02 kB (+4.80% ) 65.9 kB ▲ +916 B (+4.64% ) 20.6 kB
CardContent ▲ +3.02 kB (+4.84% ) 65.3 kB ▲ +915 B (+4.69% ) 20.4 kB
Container ▲ +3.02 kB (+4.75% ) 66.5 kB ▲ +912 B (+4.59% ) 20.8 kB
CircularProgress ▲ +3.02 kB (+4.68% ) 67.4 kB ▲ +901 B (+4.43% ) 21.2 kB
MobileStepper ▲ +3.02 kB (+4.43% ) 71.2 kB ▲ +894 B (+4.19% ) 22.3 kB
ScopedCssBaseline ▲ +3.02 kB (+4.78% ) 66.2 kB ▲ +881 B (+4.44% ) 20.7 kB
Stepper ▲ +3.02 kB (+4.63% ) 68.2 kB ▲ +880 B (+4.27% ) 21.5 kB
Snackbar ▲ +3.02 kB (+3.99% ) 78.6 kB ▲ +848 B (+3.58% ) 24.5 kB
StepContent ▲ +3.02 kB (+4.34% ) 72.5 kB ▲ +833 B (+3.83% ) 22.6 kB
LinearProgress ▲ +3.01 kB (+4.59% ) 68.7 kB ▲ +742 B (+3.62% ) 21.2 kB
FormHelperText ▲ +3 kB (+4.72% ) 66.7 kB ▲ +729 B (+3.65% ) 20.7 kB
StepLabel ▲ +3 kB (+4.36% ) 71.9 kB ▲ +550 B (+2.53% ) 22.3 kB
SvgIcon ▲ +3 kB (+4.73% ) 66.4 kB ▲ +896 B (+4.52% ) 20.7 kB
Paper ▲ +3 kB (+4.78% ) 65.7 kB ▲ +895 B (+4.57% ) 20.5 kB
ButtonBase ▲ +3 kB (+4.04% ) 77.3 kB ▲ +886 B (+3.80% ) 24.2 kB
InputLabel ▲ +3 kB (+4.57% ) 68.6 kB ▲ +658 B (+3.21% ) 21.2 kB
Typography ▲ +3 kB (+4.68% ) 67 kB ▲ +893 B (+4.46% ) 20.9 kB
IconButton ▲ +3 kB (+3.92% ) 79.4 kB ▲ +871 B (+3.64% ) 24.8 kB
PaginationItem ▲ +3 kB (+3.70% ) 84 kB ▲ +913 B (+3.66% ) 25.9 kB
InputBase ▲ +3 kB (+4.22% ) 74 kB ▲ +899 B (+4.02% ) 23.2 kB
Button ▲ +3 kB (+3.75% ) 83 kB ▲ +887 B (+3.61% ) 25.4 kB
ListItem ▲ +3 kB (+3.87% ) 80.3 kB ▲ +887 B (+3.66% ) 25.1 kB
Fab ▲ +3 kB (+3.89% ) 80.1 kB ▲ +875 B (+3.63% ) 24.9 kB
Input ▲ +3 kB (+4.11% ) 75.9 kB ▲ +901 B (+3.95% ) 23.7 kB
OutlinedInput ▲ +3 kB (+4.00% ) 77.9 kB ▲ +900 B (+3.85% ) 24.3 kB
FilledInput ▲ +3 kB (+4.05% ) 76.9 kB ▲ +898 B (+3.90% ) 23.9 kB
List ▲ +3 kB (+4.78% ) 65.7 kB ▲ +897 B (+4.59% ) 20.5 kB
StepIcon ▲ +3 kB (+4.61% ) 67.9 kB ▲ +894 B (+4.41% ) 21.2 kB
FormLabel ▲ +3 kB (+4.70% ) 66.8 kB ▲ +887 B (+4.48% ) 20.7 kB
Collapse ▲ +3 kB (+4.38% ) 71.3 kB ▲ +886 B (+4.19% ) 22 kB
MenuList ▲ +3 kB (+4.52% ) 69.3 kB ▲ +882 B (+4.24% ) 21.7 kB
Popover ▲ +3 kB (+3.60% ) 86.2 kB ▲ +882 B (+3.41% ) 26.7 kB
FormControl ▲ +3 kB (+4.63% ) 67.7 kB ▲ +881 B (+4.36% ) 21.1 kB
Backdrop ▲ +3 kB (+4.39% ) 71.2 kB ▲ +873 B (+4.14% ) 22 kB
Chip ▲ +2.99 kB (+3.62% ) 85.8 kB ▲ +911 B (+3.58% ) 26.3 kB
MenuItem ▲ +2.99 kB (+3.82% ) 81.4 kB ▲ +905 B (+3.69% ) 25.4 kB
Drawer ▲ +2.99 kB (+3.53% ) 87.9 kB ▲ +886 B (+3.42% ) 26.8 kB
Menu ▲ +2.99 kB (+3.37% ) 91.8 kB ▲ +865 B (+3.15% ) 28.3 kB
SpeedDialAction ▲ +2.27 kB (+1.92% ) 121 kB ▲ +762 B (+2.02% ) 38.4 kB
Radio ▲ +2.27 kB (+2.70% ) 86.4 kB ▲ +706 B (+2.65% ) 27.3 kB
Checkbox ▲ +2.27 kB (+2.73% ) 85.4 kB ▲ +670 B (+2.55% ) 27 kB
Switch ▲ +2.27 kB (+2.76% ) 84.6 kB ▲ +564 B (+2.17% ) 26.6 kB
Slider ▲ +2.27 kB (+2.95% ) 79.1 kB ▲ +1.01 kB (+4.16% ) 25.2 kB
ExpansionPanel ▲ +2.27 kB (+3.13% ) 74.9 kB ▲ +770 B (+3.39% ) 23.5 kB
TreeView ▲ +2.27 kB (+3.28% ) 71.5 kB ▲ +721 B (+3.32% ) 22.4 kB
Tooltip ▲ +2.26 kB (+2.21% ) 105 kB ▲ +682 B (+2.10% ) 33.1 kB
TablePagination ▲ +2.26 kB (+1.58% ) 145 kB ▲ +675 B (+1.61% ) 42.6 kB
Select ▲ +2.26 kB (+1.95% ) 119 kB ▲ +660 B (+1.90% ) 35.3 kB
Autocomplete ▲ +2.26 kB (+1.71% ) 134 kB ▲ +670 B (+1.62% ) 42.1 kB
Pagination ▲ +2.26 kB (+2.65% ) 87.6 kB ▲ +664 B (+2.52% ) 27 kB
RadioGroup ▲ +2.26 kB (+3.48% ) 67.1 kB ▲ +684 B (+3.39% ) 20.9 kB
@material-ui/lab ▲ +2.26 kB (+1.15% ) 199 kB ▲ +673 B (+1.16% ) 58.9 kB
TextField ▲ +2.26 kB (+1.81% ) 127 kB ▲ +664 B (+1.81% ) 37.3 kB
@material-ui/system ▲ +77 B (+0.47% ) 16.5 kB ▼ -10 B (-0.23% ) 4.31 kB
@material-ui/core[umd] ▼ -28 B (-0.01% ) 318 kB ▼ -187 B (-0.20% ) 92.1 kB
docs.main ▲ +25 B (0.00% ) 602 kB ▲ +13 B (+0.01% ) 195 kB
@material-ui/core ▲ +23 B (+0.01% ) 359 kB ▼ -148 B (-0.15% ) 98.8 kB
Box ▲ +11 B (+0.02% ) 72.3 kB ▼ -76 B (-0.35% ) 21.8 kB
NoSsr ▲ +2 B (+0.09% ) 2.17 kB ▲ +3 B (+0.29% ) 1.03 kB
useAutocomplete -- 14.7 kB ▼ -15 B (-0.28% ) 5.32 kB
Modal -- 14.3 kB ▲ +8 B (+0.16% ) 5.04 kB
RootRef -- 4.21 kB ▲ +7 B (+0.43% ) 1.64 kB
Popper -- 28.8 kB ▼ -4 B (-0.04% ) 10.3 kB
useMediaQuery -- 2.56 kB ▲ +4 B (+0.38% ) 1.06 kB
@material-ui/styles -- 51.4 kB ▲ +2 B (+0.01% ) 15.4 kB
TextareaAutosize -- 5.19 kB ▼ -2 B (-0.09% ) 2.16 kB
Portal -- 2.87 kB ▼ -1 B (-0.08% ) 1.29 kB
ClickAwayListener -- 3.84 kB -- 1.54 kB
colorManipulator -- 3.88 kB -- 1.52 kB
docs.landing -- 56.6 kB -- 15.6 kB

Generated by 🚫 dangerJS against 79659a3

Copy link
Member

@oliviertassinari oliviertassinari left a comment

Choose a reason for hiding this comment

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

Thanks for taking the lead on this concern.

packages/material-ui/src/styles/createSpacing.js Outdated Show resolved Hide resolved
@oliviertassinari oliviertassinari added the package: system Specific to @mui/system label Feb 29, 2020
@oliviertassinari oliviertassinari merged commit 0033bb3 into mui:master Mar 1, 2020
@oliviertassinari
Copy link
Member

@weslenng I have updated the test case a bit to match the new logic. Thanks for the effort :)

EsoterikStare pushed a commit to EsoterikStare/material-ui that referenced this pull request Mar 30, 2020
@savi2w savi2w deleted the fix/System/spacing branch May 9, 2020 19:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: system Specific to @mui/system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

@material-ui/system spacing transformation rejects an array passed via theme
3 participants