Skip to content

Commit

Permalink
[styles] Only run the check on the client-side (#16284)
Browse files Browse the repository at this point in the history
* [styles] Only run the check on the client-side

* sort asc

* v4

* style camelCase

* remove dead file

* [Dialog] More accurate description

* [Portal] Monitor the bundle size

* Poke codecov
  • Loading branch information
oliviertassinari authored and eps1lon committed Jun 19, 2019
1 parent 04cd6e1 commit e8a4842
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 42 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/1.bug.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Link:

| Tech | Version |
|--------------|---------|
| Material-UI | v3.?.? |
| Material-UI | v4.?.? |
| React | |
| Browser | |
| TypeScript | |
Expand Down
2 changes: 2 additions & 0 deletions docs/src/pages/components/portal/portal.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ components: Portal

<p class="description">The portal component renders its children into a new "subtree" outside of current component hierarchy.</p>

- 📦 [1.5 kB gzipped](/size-snapshot)

The children of the portal component will be appended to the `container` specified.

The component is used internally by the [`Modal`](/components/modal/) and [`Popper`](/components/popper/) components.
Expand Down
2 changes: 1 addition & 1 deletion docs/webpackBaseConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ module.exports = {
'@material-ui/icons': path.resolve(__dirname, '../packages/material-ui-icons/src'),
'@material-ui/lab': path.resolve(__dirname, '../packages/material-ui-lab/src'),
'@material-ui/styles': path.resolve(__dirname, '../packages/material-ui-styles/src'),
'@material-ui/utils': path.resolve(__dirname, '../packages/material-ui-utils/src'),
'@material-ui/system': path.resolve(__dirname, '../packages/material-ui-system/src'),
'@material-ui/utils': path.resolve(__dirname, '../packages/material-ui-utils/src'),
docs: path.resolve(__dirname, '../docs'),
},
},
Expand Down
2 changes: 1 addition & 1 deletion packages/material-ui-styles/src/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { ponyfillGlobal } from '@material-ui/utils';

/* Warning if there are several instances of @material-ui/styles */
if (process.env.NODE_ENV !== 'production' && process.env.NODE_ENV !== 'test') {
if (process.env.NODE_ENV !== 'production' && typeof window !== 'undefined') {
ponyfillGlobal['__@material-ui/styles-init__'] =
ponyfillGlobal['__@material-ui/styles-init__'] || 0;

Expand Down
34 changes: 0 additions & 34 deletions packages/material-ui/src/ButtonBase/createRippleHandler.js

This file was deleted.

4 changes: 2 additions & 2 deletions packages/material-ui/src/Dialog/Dialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ export const styles = theme => ({
position: 'absolute !important',
},
},
/* Styles applied to the root element if `scroll="paper"`. */
/* Styles applied to the container element if `scroll="paper"`. */
scrollPaper: {
display: 'flex',
justifyContent: 'center',
alignItems: 'center',
},
/* Styles applied to the root element if `scroll="body"`. */
/* Styles applied to the container element if `scroll="body"`. */
scrollBody: {
overflowY: 'auto',
overflowX: 'hidden',
Expand Down
2 changes: 1 addition & 1 deletion packages/material-ui/src/NativeSelect/NativeSelect.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export const styles = theme => ({
right: 0,
top: 'calc(50% - 12px)', // Center vertically
color: theme.palette.action.active,
'pointer-events': 'none', // Don't block pointer events on the select under the icon.
pointerEvents: 'none', // Don't block pointer events on the select under the icon.
},
});

Expand Down
4 changes: 2 additions & 2 deletions pages/api/dialog.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ This property accepts the following keys:
| Name | Description |
|:-----|:------------|
| <span class="prop-name">root</span> | Styles applied to the root element.
| <span class="prop-name">scrollPaper</span> | Styles applied to the root element if `scroll="paper"`.
| <span class="prop-name">scrollBody</span> | Styles applied to the root element if `scroll="body"`.
| <span class="prop-name">scrollPaper</span> | Styles applied to the container element if `scroll="paper"`.
| <span class="prop-name">scrollBody</span> | Styles applied to the container element if `scroll="body"`.
| <span class="prop-name">container</span> | Styles applied to the container element.
| <span class="prop-name">paper</span> | Styles applied to the `Paper` component.
| <span class="prop-name">paperScrollPaper</span> | Styles applied to the `Paper` component if `scroll="paper"`.
Expand Down
6 changes: 6 additions & 0 deletions scripts/sizeSnapshot/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,12 @@ async function getSizeLimitBundles() {
webpack: true,
path: 'packages/material-ui-lab/build/esm/Slider/index.js',
},
{
// vs https://bundlephobia.com/result?p=react-portal
name: 'Portal',
webpack: true,
path: 'packages/material-ui/build/esm/Portal/index.js',
},
{
name: 'docs.main',
webpack: false,
Expand Down

0 comments on commit e8a4842

Please sign in to comment.