Skip to content

Commit

Permalink
Merge branch 'next' into docs-default-theme
Browse files Browse the repository at this point in the history
  • Loading branch information
siriwatknp committed Jun 3, 2021
2 parents 2a7f6c6 + 22d42d8 commit 533bdab
Show file tree
Hide file tree
Showing 98 changed files with 5,467 additions and 214 deletions.
230 changes: 230 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,207 @@ jobs:
- run:
name: Upload screenshots to Argos CI
command: yarn test:argos
test_bundling_prepare:
<<: *defaults
steps:
- checkout
- install_js
- run:
name: Build packages for fixtures
command: yarn lerna run --scope "@material-ui/*" build
- persist_to_workspace:
root: packages
paths:
- '*/build'

test_bundling_node-esm:
<<: *defaults
working_directory: /tmp/material-ui/test/bundling/fixtures/node-esm/
steps:
- checkout:
path: /tmp/material-ui
- attach_workspace:
at: /tmp/material-ui/packages
- run:
name: Prepare fixture
command: |
node ../../scripts/useBuildFromSource.js .
node ../../scripts/createFixture node-esm
- run:
name: Install dependencies
command: yarn
- run:
name: Test fixture
command: |
# TODO: Known failure
set +e
yarn start
exit 0
test_bundling_next-webpack4:
<<: *defaults
working_directory: /tmp/material-ui/test/bundling/fixtures/next-webpack4/
docker:
- image: mcr.microsoft.com/playwright@sha256:1700531ce01a3d974cc440bb8efcf43d31d58ee5f1d354fc21563ea5fe4291e6
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
- checkout:
path: /tmp/material-ui
- attach_workspace:
at: /tmp/material-ui/packages
- run:
name: Prepare fixture
command: |
node ../../scripts/useBuildFromSource.js .
node ../../scripts/createFixture next-webpack4
- run:
name: Install dependencies
command: yarn
- run:
name: Test fixture
command: yarn start
test_bundling_next-webpack5:
<<: *defaults
working_directory: /tmp/material-ui/test/bundling/fixtures/next-webpack5/
docker:
- image: mcr.microsoft.com/playwright@sha256:1700531ce01a3d974cc440bb8efcf43d31d58ee5f1d354fc21563ea5fe4291e6
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
- checkout:
path: /tmp/material-ui
- attach_workspace:
at: /tmp/material-ui/packages
- run:
name: Prepare fixture
command: |
node ../../scripts/useBuildFromSource.js .
node ../../scripts/createFixture next-webpack5
- run:
name: Install dependencies
command: yarn
- run:
name: Test fixture
command: yarn start
test_bundling_create-react-app:
<<: *defaults
working_directory: /tmp/material-ui/test/bundling/fixtures/create-react-app/
docker:
- image: mcr.microsoft.com/playwright@sha256:1700531ce01a3d974cc440bb8efcf43d31d58ee5f1d354fc21563ea5fe4291e6
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
- checkout:
path: /tmp/material-ui
- attach_workspace:
at: /tmp/material-ui/packages
- run:
name: Prepare fixture
command: |
node ../../scripts/useBuildFromSource.js .
node ../../scripts/createFixture create-react-app
- run:
name: Install dependencies
command: yarn
- run:
name: Test fixture
command: yarn start
test_bundling_snowpack:
<<: *defaults
working_directory: /tmp/material-ui/test/bundling/fixtures/snowpack/
docker:
- image: mcr.microsoft.com/playwright@sha256:1700531ce01a3d974cc440bb8efcf43d31d58ee5f1d354fc21563ea5fe4291e6
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
- checkout:
path: /tmp/material-ui
- attach_workspace:
at: /tmp/material-ui/packages
- run:
name: Prepare fixture
command: |
node ../../scripts/useBuildFromSource.js .
node ../../scripts/createFixture snowpack
- run:
name: Install dependencies
command: yarn
- run:
name: Test fixture
command: yarn start
test_bundling_vite:
<<: *defaults
working_directory: /tmp/material-ui/test/bundling/fixtures/vite/
docker:
- image: mcr.microsoft.com/playwright@sha256:1700531ce01a3d974cc440bb8efcf43d31d58ee5f1d354fc21563ea5fe4291e6
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
- checkout:
path: /tmp/material-ui
- attach_workspace:
at: /tmp/material-ui/packages
- run:
name: Prepare fixture
command: |
node ../../scripts/useBuildFromSource.js .
node ../../scripts/createFixture vite
- run:
name: Install dependencies
command: yarn
- run:
name: Test fixture
command: yarn start
test_bundling_esbuild:
<<: *defaults
working_directory: /tmp/material-ui/test/bundling/fixtures/esbuild/
docker:
- image: mcr.microsoft.com/playwright@sha256:1700531ce01a3d974cc440bb8efcf43d31d58ee5f1d354fc21563ea5fe4291e6
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
- checkout:
path: /tmp/material-ui
- attach_workspace:
at: /tmp/material-ui/packages
- run:
name: Prepare fixture
command: |
node ../../scripts/useBuildFromSource.js .
node ../../scripts/createFixture esbuild
- run:
name: Install dependencies
command: yarn
- run:
name: Test fixture
command: |
# TODO: Known failure
set +e
yarn start
exit 0
test_bundling_gatsby:
<<: *defaults
working_directory: /tmp/material-ui/test/bundling/fixtures/gatsby/
docker:
- image: mcr.microsoft.com/playwright@sha256:1700531ce01a3d974cc440bb8efcf43d31d58ee5f1d354fc21563ea5fe4291e6
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
- checkout:
path: /tmp/material-ui
- attach_workspace:
at: /tmp/material-ui/packages
- run:
name: Prepare fixture
command: |
node ../../scripts/useBuildFromSource.js .
node ../../scripts/createFixture gatsby
- run:
name: Install dependencies
command: yarn
- run:
name: Test fixture
command: yarn start
workflows:
version: 2
pipeline:
Expand Down Expand Up @@ -426,6 +627,35 @@ workflows:
- test_e2e:
requires:
- checkout
bundling:
when:
equal: [bundling, << pipeline.parameters.workflow >>]
jobs:
- test_bundling_prepare
- test_bundling_node-esm:
requires:
- test_bundling_prepare
- test_bundling_next-webpack4:
requires:
- test_bundling_prepare
- test_bundling_next-webpack5:
requires:
- test_bundling_prepare
- test_bundling_create-react-app:
requires:
- test_bundling_prepare
- test_bundling_snowpack:
requires:
- test_bundling_prepare
- test_bundling_vite:
requires:
- test_bundling_prepare
- test_bundling_esbuild:
requires:
- test_bundling_prepare
- test_bundling_gatsby:
requires:
- test_bundling_prepare
profile:
when:
equal: [profile, << pipeline.parameters.workflow >>]
Expand Down
7 changes: 6 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
/.yarn
/benchmark/**/dist
/coverage
/docs/.next
/docs/export
/examples/create-react-app*/src/serviceWorker.js
/examples/gatsby/public/
Expand All @@ -22,6 +21,12 @@
/packages/material-ui-utils/macros/__fixtures__/
# Ignore fixtures
/packages/typescript-to-proptypes/test/*/*
/test/bundling/fixtures/**/*.fixture.js
# just an import that reports eslint errors depending on whether the fixture (which is not checked in) exists
/test/bundling/fixtures/create-react-app/src/index.js
/test/bundling/fixtures/gatsby/.cache
/test/bundling/fixtures/gatsby/public
/tmp
.next
build
node_modules
7 changes: 7 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -369,5 +369,12 @@ module.exports = {
],
},
},
{
files: ['test/bundling/scripts/**/*.js'],
rules: {
// ES modules need extensions
'import/extensions': ['error', 'ignorePackages'],
},
},
],
};
4 changes: 4 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,7 @@ packages/**/*.d.ts -linguist-vendored
# Kept so that we can review the impact when changing the generation script.
packages/material-ui-icons/lib linguist-generated
packages/material-ui-icons/material-icons linguist-vendored
# bundling fixtures
test/fixtures/bundling/node-esm/index.js linguist-generated
test/fixtures/bundling/next-webpack4/pages/index.js linguist-generated
test/fixtures/bundling/packages.js linguist-generated
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,20 @@
/benchmark/**/dist
/coverage
/docs/.env.local
/docs/.next
/docs/export
/examples/**/.cache
/packages/material-ui-codemod/lib
/packages/material-ui-envinfo/*.tgz
/packages/material-ui-icons/src/*.js
/test/bundling/fixtures/*/yarn.lock
# created by test/bundling/scripts/createFixture
/test/bundling/fixtures/**/*.fixture.js
# created by test/bundling/fixtures/gatsby gatsby build
/test/bundling/fixtures/gatsby/.cache
/test/bundling/fixtures/gatsby/public
/test/regressions/screenshots
/tmp
.next
build
node_modules
package-lock.json
Expand Down
1 change: 1 addition & 0 deletions docs/pages/api-docs/app-bar.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
},
"default": "'primary'"
},
"enableColorOnDark": { "type": { "name": "bool" } },
"position": {
"type": {
"name": "enum",
Expand Down
1 change: 1 addition & 0 deletions docs/pages/api-docs/tooltip.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"popper",
"popperInteractive",
"popperArrow",
"popperClose",
"tooltip",
"tooltipArrow",
"arrow",
Expand Down
8 changes: 8 additions & 0 deletions docs/pages/branding/about.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,14 @@ const company = [
location: 'Esteio, Brazil',
github: 'm4theushw',
},
{
name: 'Michał Dudak',
src: '/static/branding/about/michal.jpg',
title: 'Core components team',
location: 'Silesia, Poland',
twitter: 'michaldudak',
github: 'michaldudak',
},
{
name: 'Siriwat Kunaporn',
src: '/static/branding/about/siriwat.jpg',
Expand Down
Binary file added docs/public/static/branding/about/michal.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 0 additions & 2 deletions docs/src/modules/components/AppFrame.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,6 @@ const styles = (theme) => ({
},
},
appBar: {
color: theme.palette.mode === 'light' ? null : '#fff',
backgroundColor: theme.palette.mode === 'light' ? null : '#212121',
transition: theme.transitions.create('width'),
},
language: {
Expand Down
24 changes: 24 additions & 0 deletions docs/src/pages/components/app-bar/app-bar.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,3 +136,27 @@ function HideOnScroll(props) {
);
}
```

## Enable Color on Dark

From v5 onward, `color` prop has no effect on dark mode according to [material design spec](https://material.io/design/color/dark-theme.html). You can opt out by passing `enableColorOnDark` prop.

```jsx
// Specific element via prop
<AppBar enableColorOnDark />

// Affect all AppBars via theme
<ThemeProvider
theme={createTheme({
components: {
MuiAppBar: {
defaultProps: {
enableColorOnDark: true,
},
},
},
})}
>
<AppBar />
</ThemeProvider>
```
Loading

0 comments on commit 533bdab

Please sign in to comment.