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

Merge Target for Packages using the latest Spectrum CSS v3.0.0 dependency #790

Merged
merged 44 commits into from
Aug 29, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
253f84c
feat(base): insert Spectrum base class/mixin
Westbrook Jul 10, 2020
759e654
build: process [dir="ltr|rtl"] entries in Spectrum CSS
Jul 24, 2020
82d385a
feat: use 3.0.0-beta.* release for styles
Jul 24, 2020
c957809
feat(accordion): add accordion pattern
Jul 24, 2020
d779c7f
refactor: update Spectrum CSS processing for expanded coverage
Westbrook Jul 23, 2020
949eea8
feat(split-button): add split-button pattern
Westbrook Jul 24, 2020
1a2b6b2
fix(tags): support distant sibling selectors
Westbrook Jul 24, 2020
e449c1b
test(split-button): inject more time into test
Westbrook Jul 24, 2020
9bf880f
fix(tags): correct render types
Westbrook Aug 3, 2020
3327984
fix(split-button): follow visible tab order
Aug 4, 2020
131ff66
feat(textfield): use Spectrum CSS ^3.0.0
Westbrook Jul 10, 2020
74736e1
feat(search): use Spectrum CSS ^3.0.0
Westbrook Aug 4, 2020
b6596d9
feat(action-group): add action-group pattern
Westbrook Aug 5, 2020
9f6eda1
refactor(button): exclude CSS meant for other elements
Aug 10, 2020
5f40391
feat(quick-actions): add quick-actions pattern
Aug 7, 2020
0b65888
feat(card): upgrade to Spectrum CSS v3.0.0
Aug 10, 2020
62e363d
chore: catch unreleased components up to current versions
Aug 13, 2020
641dbbf
feat(split-button): add split-button pattern
Westbrook Jul 24, 2020
5b999f8
feat: update to Spectrum CSS v3.0.0
Aug 13, 2020
a58c3b8
fix: support matching keydown to [dir]
Aug 13, 2020
d67fe57
test: address coverage
Aug 13, 2020
3d78260
feat: observe document.documentElement for dir value
Aug 14, 2020
5d3ac13
docs: support RTL delivery
Aug 14, 2020
3a866ee
docs: support RTL across all stories
Aug 14, 2020
f5dc67b
refactor: leverage cleaner types
Aug 14, 2020
a55b575
ci: expand visual regressions to RTL
Aug 14, 2020
ae256e6
ci: update golden images cache
Aug 14, 2020
81286c9
fix(tabs): bind tabindicator update to dir value
Westbrook Aug 18, 2020
a0b4a59
feat: allow dir management by sp-theme elements
Aug 18, 2020
11657f6
ci: update golden images cache
Aug 18, 2020
7b9742b
refactor: use isLTR instead of isDefaultDir
Aug 18, 2020
b512ab4
docs: outline "dir" support in elements and themes
Aug 18, 2020
492e226
docs: keep "dir" decisions for docs site in localStorage
Aug 18, 2020
2ff8410
refactor(split-button): catch up to upstream changes in Dropdown
Westbrook Aug 28, 2020
a31dd08
ci: update golden images cache
Westbrook Aug 28, 2020
0b904cc
feat(split-button): add split-button pattern
Westbrook Jul 24, 2020
e2fcec3
ci: update golden images cache
Westbrook Aug 6, 2020
c7a9943
ci: update golden images cache
Aug 10, 2020
5592657
refactor: use shared slot presence mixin for conditional element styling
Westbrook Aug 21, 2020
4d7ac1c
refactor: centralize on @spectrum-web-components/base for lit-* exports
Westbrook Aug 20, 2020
96d3998
refactor(base): export "ifDefined" from "lit-html"
Westbrook Aug 21, 2020
acfe6a9
docs: clarify language in README
Westbrook Aug 27, 2020
a7ea7dc
test: remove excess snapshot testing
Westbrook Aug 28, 2020
21f34f2
ci: update golden images cache
Westbrook Aug 28, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
156 changes: 135 additions & 21 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,15 @@ commands:
type: string
regression_scale:
type: string
regression_dir:
type: string
steps:
- restore_cache:
name: Restore Golden Images Cache
keys:
- v2-golden-images-<< parameters.regression_color >>-<< parameters.regression_scale >>-e3f040631ba658a7f0b64afa1fc64ac3530e16d7
- v2-golden-images-main-<< parameters.regression_color >>-<< parameters.regression_scale >>-
- run: yarn test:visual:ci --color=<< parameters.regression_color >> --scale=<< parameters.regression_scale >>
- v2-golden-images-62c088d67e000a9812a4a2cf0a854ce4a521b4d0-<< parameters.regression_color >>-<< parameters.regression_scale >>-<< parameters.regression_dir >>
- v2-golden-images-main-<< parameters.regression_color >>-<< parameters.regression_scale >>-<< parameters.regression_dir >>-
- run: yarn test:visual:ci --color=<< parameters.regression_color >> --scale=<< parameters.regression_scale >> --dir=<< parameters.regression_dir >>
- run:
when: on_fail
command: cp -RT test/visual/screenshots-current/ci test/visual/screenshots-baseline/ci && exit 1
Expand All @@ -64,12 +66,12 @@ commands:
name: Build Golden Images Revision Cache
paths:
- test/visual/screenshots-baseline/ci
key: v2-golden-images-<< parameters.regression_color >>-<< parameters.regression_scale >>-{{ .Revision }}
key: v2-golden-images-{{ .Revision }}-<< parameters.regression_color >>-<< parameters.regression_scale >>-<< parameters.regression_dir >>
- save_cache:
name: Build Golden Images Branch Cache
paths:
- test/visual/screenshots-baseline/ci
key: v2-golden-images-{{ .Branch }}-<< parameters.regression_color >>-<< parameters.regression_scale >>-{{ epoch }}
key: v2-golden-images-{{ .Branch }}-<< parameters.regression_color >>-<< parameters.regression_scale >>-<< parameters.regression_dir >>-{{ epoch }}
- store_artifacts:
path: test/visual/screenshots-current

Expand Down Expand Up @@ -104,77 +106,165 @@ jobs:
- project/documentation/dist
- .cache/ms-playwright

visual-lightest-medium:
visual-lightest-medium-ltr:
executor: node

steps:
- downstream
- run-regressions:
regression_color: lightest
regression_scale: medium
regression_dir: ltr

visual-lightest-large:
visual-lightest-medium-rtl:
executor: node

steps:
- downstream
- run-regressions:
regression_color: lightest
regression_scale: medium
regression_dir: rtl

visual-lightest-large-ltr:
executor: node

steps:
- downstream
- run-regressions:
regression_color: lightest
regression_scale: large
regression_dir: ltr

visual-light-medium:
visual-lightest-large-rtl:
executor: node

steps:
- downstream
- run-regressions:
regression_color: lightest
regression_scale: large
regression_dir: rtl

visual-light-medium-ltr:
executor: node

steps:
- downstream
- run-regressions:
regression_color: light
regression_scale: medium
regression_dir: ltr

visual-light-large:
visual-light-medium-rtl:
executor: node

steps:
- downstream
- run-regressions:
regression_color: light
regression_scale: medium
regression_dir: rtl

visual-light-large-ltr:
executor: node

steps:
- downstream
- run-regressions:
regression_color: light
regression_scale: large
regression_dir: ltr

visual-light-large-rtl:
executor: node

steps:
- downstream
- run-regressions:
regression_color: light
regression_scale: large
regression_dir: rtl

visual-dark-medium-ltr:
executor: node

steps:
- downstream
- run-regressions:
regression_color: dark
regression_scale: medium
regression_dir: ltr

visual-dark-medium:
visual-dark-medium-rtl:
executor: node

steps:
- downstream
- run-regressions:
regression_color: dark
regression_scale: medium
regression_dir: rtl

visual-dark-large:
visual-dark-large-ltr:
executor: node

steps:
- downstream
- run-regressions:
regression_color: dark
regression_scale: large
regression_dir: ltr

visual-darkest-medium:
visual-dark-large-rtl:
executor: node

steps:
- downstream
- run-regressions:
regression_color: dark
regression_scale: large
regression_dir: rtl

visual-darkest-medium-ltr:
executor: node

steps:
- downstream
- run-regressions:
regression_color: darkest
regression_scale: medium
regression_dir: ltr

visual-darkest-medium-rtl:
executor: node

steps:
- downstream
- run-regressions:
regression_color: darkest
regression_scale: medium
regression_dir: rtl

visual-darkest-large-ltr:
executor: node

steps:
- downstream
- run-regressions:
regression_color: darkest
regression_scale: large
regression_dir: ltr

visual-darkest-large:
visual-darkest-large-rtl:
executor: node

steps:
- downstream
- run-regressions:
regression_color: darkest
regression_scale: large
regression_dir: rtl

publish-docs:
executor: node
Expand All @@ -191,28 +281,52 @@ workflows:
build:
jobs:
- build
- visual-lightest-medium:
- visual-lightest-medium-ltr:
requires:
- build
- visual-lightest-large-ltr:
requires:
- build
- visual-light-medium-ltr:
requires:
- build
- visual-light-large-ltr:
requires:
- build
- visual-dark-medium-ltr:
requires:
- build
- visual-dark-large-ltr:
requires:
- build
- visual-darkest-medium-ltr:
requires:
- build
- visual-darkest-large-ltr:
requires:
- build
- visual-lightest-medium-rtl:
requires:
- build
- visual-lightest-large:
- visual-lightest-large-rtl:
requires:
- build
- visual-light-medium:
- visual-light-medium-rtl:
requires:
- build
- visual-light-large:
- visual-light-large-rtl:
requires:
- build
- visual-dark-medium:
- visual-dark-medium-rtl:
requires:
- build
- visual-dark-large:
- visual-dark-large-rtl:
requires:
- build
- visual-darkest-medium:
- visual-darkest-medium-rtl:
requires:
- build
- visual-darkest-large:
- visual-darkest-large-rtl:
requires:
- build
- publish-docs:
Expand Down
5 changes: 5 additions & 0 deletions .storybook/preview-head.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,17 @@
}
/* @TODO: Implement more default storybook styling here using spectrum theme variables */
#root-theme {
overflow-x: hidden;
display: block;
padding: 8px;
box-sizing: border-box;
width: 100vw;
min-height: 100vh;
background-color: var(--spectrum-global-color-gray-100);
color: var(
--spectrum-body-text-color,
var(--spectrum-alias-text-color)
);
}
.sbdocs-preview #root-theme {
width: 100%;
Expand Down
14 changes: 13 additions & 1 deletion .storybook/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,25 @@ const scaleOptions = {
Large: 'large',
};
let defaultScale = scaleOptions.Medium;
const directionOptions = {
LTR: 'ltr',
RTL: 'rtl',
};
let defaultDirection = 'ltr';
addDecorator((story) => {
const color = select('Color', colorOptions, defaultColor, 'Theme');
defaultColor = color;
const scale = select('Scale', scaleOptions, defaultScale, 'Theme');
defaultScale = scale;
const dir = select(
'Text direction',
directionOptions,
defaultDirection,
'Theme'
);
defaultDirection = dir;
return html`
<sp-theme id="root-theme" color=${color} scale=${scale}>
<sp-theme id="root-theme" color=${color} scale=${scale} dir=${dir}>
${story()}
</sp-theme>
`;
Expand Down
7 changes: 4 additions & 3 deletions documentation/src/components/code-example.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import DarkThemeStyles from 'prismjs/themes/prism-okaidia.css';
import LightThemeStyles from 'prismjs/themes/prism.css';
import Styles from './code-example.css';
import { stripIndent } from 'common-tags';
import { FocusVisiblePolyfillMixin } from '@spectrum-web-components/shared';

class Code extends LitElement {
@property()
Expand Down Expand Up @@ -75,7 +76,7 @@ export class LightCode extends Code {
}

@customElement('code-example')
export class CodeExample extends LitElement {
export class CodeExample extends FocusVisiblePolyfillMixin(LitElement) {
@query('#markup')
private markup?: HTMLDivElement;

Expand Down Expand Up @@ -146,9 +147,9 @@ export class CodeExample extends LitElement {
</div>
`
: undefined}
<div id="markup">
<bdo id="markup" dir="ltr">
${highlightedCode}
</div>
</bdo>
`;
}

Expand Down
Loading