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

[WIP] Update theming docs #1327

Open
wants to merge 5 commits into
base: 2.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions packages/base/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@
resolved "https://registry.yarnpkg.com/@material/theme/-/theme-0.43.0.tgz#6d9fa113c82e841817882172c152d60d2d203ca6"
integrity sha512-/zndZL6EihI18v2mYd4O8xvOBAAXmLeHyHVK28LozSAaJ9okQgD25wq5Ktk95oMTmPIC+rH66KcK6371ivNk8g==

bind-decorator@^1.0.11:
version "1.0.11"
resolved "https://registry.yarnpkg.com/bind-decorator/-/bind-decorator-1.0.11.tgz#e41bc06a1f65dd9cec476c91c5daf3978488252f"
integrity sha1-5BvAah9l3ZzsR2yRxdrzl4SIJS8=
tslib@^1.9.3:
version "1.9.3"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.3.tgz#d7e4dd79245d85428c4d7e4822a79917954ca286"
integrity sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==

tslib@^1.9.3:
version "1.9.3"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ describe('Visual Regression Tests', () => {
afterEach(() => {
cy.eyesClose();
});
testScreenshot('dialogpage', url);
testScreenshot('designpage', url);
});
13 changes: 13 additions & 0 deletions packages/docs/cypress/integration/visual-test/theming-test.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import {testScreenshot, baseURL} from '../../utils/utils';

describe('Visual Regression Tests', () => {
const url = `${baseURL}/theming`;

beforeEach(() => {
cy.visit(url);
});
afterEach(() => {
cy.eyesClose();
});
testScreenshot('themingpage', url);
});
8 changes: 4 additions & 4 deletions packages/docs/prerender-urls.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
"title": "Design",
"url": "/design"
},
{
"title": "Theming",
"url": "/theming"
},
{
"title": "Button",
"url": "/component/button"
Expand Down Expand Up @@ -103,10 +107,6 @@
"title": "Textfield",
"url": "/component/textfield"
},
{
"title": "Theme",
"url": "/component/theme"
},
{
"title": "Toolbar",
"url": "/component/toolbar"
Expand Down
13 changes: 7 additions & 6 deletions packages/docs/src/components/app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ import SnackbarPage from '../../routes/snackbar';
import SwitchPage from '../../routes/switch';
import TabBarPage from '../../routes/tabbar';
import TextfieldPage from '../../routes/textfield';
import ThemePage from '../../routes/theme';
import ThemingPage from '../../routes/theming';
import TopAppBarPage from '../../routes/top-app-bar';
import Typography from '../../routes/typography';

Expand All @@ -72,6 +72,12 @@ const menuItems = [
link: '/design/',
component: DesignPage
},
{
text: 'Theming',
icon: 'color_lens',
link: '/theming/',
component: ThemingPage
},
{
text: 'Button',
link: '/component/button/',
Expand Down Expand Up @@ -187,11 +193,6 @@ const menuItems = [
link: '/component/textfield/',
component: TextfieldPage
},
{
text: 'Theme',
link: '/component/theme/',
component: ThemePage
},
{
text: 'TopAppBar',
link: '/component/top-app-bar/',
Expand Down
5 changes: 2 additions & 3 deletions packages/docs/test-runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ if (shelljs.env['TRAVIS_PULL_REQUEST'] !== 'false') {
.filter(file => file.match(packageRegexp))
.map(pckg => pckg.match(packageRegexp)[1])
);
// remove docs from this set as it is does not have a test for itself.
packagesChanged.delete('docs');
console.log(
`Detected changes in packages: ${[...packagesChanged.values()].join(', ')}`
);
Expand All @@ -28,7 +26,8 @@ if (shelljs.env['TRAVIS_PULL_REQUEST'] !== 'false') {
'No changes in packages found, not running visual regression testing.'
);
process.exit(0);
} else if (packagesChanged.has('base')) {
} else if (packagesChanged.has('base') || packagesChanged.has('docs')) {
// TODO: Be smarter about what changed in docs
// if base has changed it might impact every component
// so run all of them.
const {code} = shelljs.exec('cypress run');
Expand Down
25 changes: 0 additions & 25 deletions packages/docs/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5913,11 +5913,6 @@ map-visit@^1.0.0:
dependencies:
object-visit "^1.0.0"

marked@^0.3.6:
version "0.3.19"
resolved "https://registry.yarnpkg.com/marked/-/marked-0.3.19.tgz#5d47f709c4c9fc3c216b6d46127280f40b39d790"
integrity sha512-ea2eGWOqNxPcXv8dyERdSr/6FmzvWwzjMxpfGB/sbMccXoct+xY+YukPD+QTUZwyvK7BZwcr4m21WBOW41pAkg==

math-expression-evaluator@^1.2.14:
version "1.2.17"
resolved "https://registry.yarnpkg.com/math-expression-evaluator/-/math-expression-evaluator-1.2.17.tgz#de819fdbcd84dccd8fae59c6aeb79615b9d266ac"
Expand Down Expand Up @@ -7532,21 +7527,6 @@ preact-compat@^3.14.3:
prop-types "^15.6.2"
standalone-react-addons-pure-render-mixin "^0.1.1"

preact-markdown@^0.4.1:
version "0.4.1"
resolved "https://registry.yarnpkg.com/preact-markdown/-/preact-markdown-0.4.1.tgz#98f7b0abbe63103a771bb6fb3078c195e3599e85"
integrity sha512-Y5FzFN7SFh4Hfs2c2k2jMtz+xVD4+LOkADqKR0IP7os32Pi3arSjMVX05/TFPtcrkjMixXSyGOWHpMpxuhHYGg==
dependencies:
marked "^0.3.6"
preact-markup "^1.6.0"

preact-markup@^1.6.0:
version "1.6.0"
resolved "https://registry.yarnpkg.com/preact-markup/-/preact-markup-1.6.0.tgz#9f4d285761531dd75af3e1d2cd121505b09986bc"
integrity sha1-n00oV2FTHdda8+HSzRIVBbCZhrw=
optionalDependencies:
preact "^5.6.0"

preact-render-to-string@^3.6.0, preact-render-to-string@^3.8.2:
version "3.8.2"
resolved "https://registry.yarnpkg.com/preact-render-to-string/-/preact-render-to-string-3.8.2.tgz#bd72964d705a57da3a9e72098acaa073dd3ceff9"
Expand All @@ -7564,11 +7544,6 @@ preact-transition-group@^1.1.1:
resolved "https://registry.yarnpkg.com/preact-transition-group/-/preact-transition-group-1.1.1.tgz#f0a49327ea515ece34ea2be864c4a7d29e5d6e10"
integrity sha1-8KSTJ+pRXs406ivoZMSn0p5dbhA=

preact@^5.6.0:
version "5.7.0"
resolved "https://registry.yarnpkg.com/preact/-/preact-5.7.0.tgz#2f2a1fff07b11cf25fc54887789d1af137722b5a"
integrity sha1-Lyof/wexHPJfxUiHeJ0a8TdyK1o=

preact@^8.1.0, preact@^8.2.9:
version "8.4.2"
resolved "https://registry.yarnpkg.com/preact/-/preact-8.4.2.tgz#1263b974a17d1ea80b66590e41ef786ced5d6a23"
Expand Down
8 changes: 4 additions & 4 deletions packages/image-list/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@
dependencies:
"@material/feature-targeting" "^0.44.1"

bind-decorator@^1.0.11:
version "1.0.11"
resolved "https://registry.yarnpkg.com/bind-decorator/-/bind-decorator-1.0.11.tgz#e41bc06a1f65dd9cec476c91c5daf3978488252f"
integrity sha1-5BvAah9l3ZzsR2yRxdrzl4SIJS8=
tslib@^1.9.3:
version "1.9.3"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.3.tgz#d7e4dd79245d85428c4d7e4822a79917954ca286"
integrity sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==

tslib@^1.9.3:
version "1.9.3"
Expand Down
8 changes: 4 additions & 4 deletions packages/linear-progress/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@
dependencies:
"@material/feature-targeting" "^0.44.1"

tslib@^1.9.3:
version "1.9.3"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.3.tgz#d7e4dd79245d85428c4d7e4822a79917954ca286"
integrity sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==
bind-decorator@^1.0.11:
version "1.0.11"
resolved "https://registry.yarnpkg.com/bind-decorator/-/bind-decorator-1.0.11.tgz#e41bc06a1f65dd9cec476c91c5daf3978488252f"
integrity sha1-5BvAah9l3ZzsR2yRxdrzl4SIJS8=

tslib@^1.9.3:
version "1.9.3"
Expand Down
5 changes: 0 additions & 5 deletions packages/switch/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,6 @@
dependencies:
"@material/feature-targeting" "^0.44.1"

bind-decorator@^1.0.11:
version "1.0.11"
resolved "https://registry.yarnpkg.com/bind-decorator/-/bind-decorator-1.0.11.tgz#e41bc06a1f65dd9cec476c91c5daf3978488252f"
integrity sha1-5BvAah9l3ZzsR2yRxdrzl4SIJS8=

tslib@^1.9.3:
version "1.9.3"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.3.tgz#d7e4dd79245d85428c4d7e4822a79917954ca286"
Expand Down