Skip to content

Commit 8cafffa

Browse files
committed
fix: resolving conflicts with main
2 parents 019f5fe + 74000c8 commit 8cafffa

File tree

24 files changed

+235
-160
lines changed

24 files changed

+235
-160
lines changed

README.md

Lines changed: 13 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -138,10 +138,10 @@ Each component has a `dist/vars.css` file that contains declarations for each co
138138

139139
As such, **you do not need to include `dist/vars.css`** unless:
140140

141-
1. You wish to reference the component-level variables used by a component in external CSS (i.e. `--spectrum-rule-medium-height`)
142-
2. You have upgraded `@spectrum-css/vars`, but have not updated a component (such as `@spectrum-css/rule`) and do not want to update the component-level variables used by that component
141+
1. You wish to reference the component-level variables used by a component in external CSS (i.e. `--spectrum-divider-medium-height`)
142+
2. You have upgraded `@spectrum-css/vars`, but have not updated a component (such as `@spectrum-css/divider`) and do not want to update the component-level variables used by that component
143143

144-
When this file is imported, if in updated version of `@spectrum-css/vars` changed global variables (such as a global color, `--spectrum-global-color-gray-300`), you will get those updates. However, if the updated version of `@spectrum-css/vars` changed component-level variables (such as the height of a medium Rule, `--spectrum-rule-medium-height`), you will not get those updates. As such, this file can be used to lock-in the basic visual style of a component while still allowing for system-level updates.
144+
When this file is imported, if in updated version of `@spectrum-css/vars` changed global variables (such as a global color, `--spectrum-global-color-gray-300`), you will get those updates. However, if the updated version of `@spectrum-css/vars` changed component-level variables (such as the height of a medium divider, `--spectrum-divider-medium-height`), you will not get those updates. As such, this file can be used to lock-in the basic visual style of a component while still allowing for system-level updates.
145145

146146
In most cases, this file will not be required, so you can safely ignore it. If you see unexpected visual changes creeping into components that you have not updated, `dist/vars.css` may correct them.
147147

@@ -236,37 +236,28 @@ The following tasks are available:
236236
237237
## Testing
238238
239-
Visual regression testing is implemented by [BackstopJS](https://github.com/garris/BackstopJS). In order to avoid browser rendering inconsistent issue on different environments, the test needs to run inside of docker container.
239+
Visual regression testing is implemented by [BackstopJS](https://github.com/garris/BackstopJS). To avoid browser rendering inconsistent issue, the test needs to run with a docker container.
240240
241241
### Setup docker
242242
243243
Install docker on your machine [Download Docker](https://hub.docker.com/search/?type=edition&offering=community&architecture=amd64)
244244
245-
### Backstop reference bitmap
245+
### Reference bitmap images
246246
247-
The reference bitmaps are hosted in a adobe internal repo and published as [@spectrum-css/spectrum-css-vr-test-asset](https://www.npmjs.com/package/@spectrum-css/spectrum-css-vr-test-asset). All the reference bitmaps are generated within docker instance. If you want to run test with native environment, you have to regenerate the reference yourself.
247+
The reference bitmap images are published as an NPM package [@spectrum-css/spectrum-css-vr-test-assets-essential](https://www.npmjs.com/package/@spectrum-css/spectrum-css-vr-test-assets-essential). Before the test, please try to upgrade this package.
248248
249-
### Start dev server with Browsersync notification turnoff
249+
`yarn upgrade @spectrum-css/spectrum-css-vr-test-assets-essential`
250250
251-
`gulp dev`
251+
### Start VRT dev server mode
252252
253-
### Testing CLI targets
254-
255-
The following npm scripts are available for testing:
253+
`VRT=true yarn run dev`
256254
257-
- `npm run backstop:approve` - Identical to [backstop approve](https://github.com/garris/BackstopJS#approving-changes)
258-
- `npm run backstop:test` - Run test in your local native environment
259-
- `npm run backstop:clean` - Clean up all the testing reports and test images
260-
- `npm run backstop:docker:test` - Run test in your local docker container
261-
- `npm run backstop:ci:test` - Run test in a continuous integration environment like [Travis-CI](https://travis-ci.org/adobe/spectrum-css)
262-
- `npm run kill-zombies` - Kill zombies Chromium instances on your local machine
255+
### Testing CLI targets
263256
264-
Both `backstop:test` and `backstop:docker:test` accept arguments to customize your test run:
257+
The following yarn scripts are available for testing:
265258
266-
- `npm run backstop:docker:test` - Run test for all the components with color stop as `light` and scale as `medium`.
267-
- `npm run backstop:docker:test button` - Run test for `button` and its dependents components like action bar, toast etc with color stop as `light` and scale as `medium`.
268-
- `npm run backstop:docker:test themes=lightest,light scales=medium,large radio` - Run test for `radio` and its dependents components with color stop as `lightest` and `light` and scale as `medium` and `large`. It means that a single scenario will run 4 times.
269-
- `npm run backstop:docker:test themes=lightest,light,dark,darkest scales=medium,large` - Run test for all the components with all the color and scale combinations. It means that a single scenario will be run 8 times.
259+
- `yarn run backstop:docker:test` - Run all the visual regression tests.
260+
- `yarn run backstop:docker:test button` - Run test for `button` component only.
270261
271262
___
272263

backstop_data/backstop_scenarios.json

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -187,11 +187,6 @@
187187
"url": "divider.html",
188188
"package": "@spectrum-css/divider"
189189
},
190-
{
191-
"label": "dropdown",
192-
"url": "dropdown.html",
193-
"package": "@spectrum-css/dropdown"
194-
},
195190
{
196191
"label": "dropindicator",
197192
"url": "dropindicator.html",
@@ -336,11 +331,6 @@
336331
"url": "rating.html",
337332
"package": "@spectrum-css/rating"
338333
},
339-
{
340-
"label": "rule",
341-
"url": "rule.html",
342-
"package": "@spectrum-css/rule"
343-
},
344334
{
345335
"label": "search",
346336
"url": "search.html",
@@ -506,4 +496,4 @@
506496
"url": "wrapping.html",
507497
"package": "@spectrum-css/wrapping"
508498
}
509-
]
499+
]

backstop_data/packageDependentMap.json

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,12 +129,17 @@
129129
[
130130
"@spectrum-css/dialog",
131131
[
132-
"@spectrum-css/popover"
132+
"@spectrum-css/popover",
133+
"@spectrum-css/tray"
133134
]
134135
],
135136
[
136137
"@spectrum-css/divider",
137-
[]
138+
[
139+
"@spectrum-css/dialog",
140+
"@spectrum-css/popover",
141+
"@spectrum-css/tray"
142+
]
138143
],
139144
[
140145
"@spectrum-css/dropindicator",
@@ -342,4 +347,4 @@
342347
"@spectrum-css/well",
343348
[]
344349
]
345-
]
350+
]

bundles/spectrum-css-compat/diff.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ cd $CWD
2222
# components=$(ls components/)
2323

2424
# Ignores commons, other new components
25-
components="accordion checkbox fieldlabel rule stepper
25+
components="accordion checkbox fieldlabel divider stepper
2626
actionbar circleloader search table
2727
actionmenu coachmark illustratedmessage searchwithin tabs
2828
alert inputgroup sidenav tags
@@ -32,7 +32,7 @@ avatar menu toggle
3232
banner cyclebutton miller tooltip
3333
barloader decoratedtextfield page treeview
3434
breadcrumb dialog pagination typography
35-
button dropdown popover splitbutton underlay
35+
button picker popover splitbutton underlay
3636
buttongroup dropindicator quickaction splitview well
3737
calendar dropzone radio statuslight
3838
card fieldgroup rating steplist"

components/button/index.css

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,10 +112,8 @@ governing permissions and limitations under the License.
112112
bottom: 0;
113113
top: 0;
114114
margin: calc(var(--spectrum-alias-focus-ring-gap) * -1);
115-
116-
transition: box-shadow var(--spectrum-global-animation-duration-100)
117-
ease-out,
118-
margin var(--spectrum-global-animation-duration-100) ease-out;
115+
transition: opacity var(--spectrum-global-animation-duration-100) ease-out,
116+
margin var(--spectrum-global-animation-duration-100) ease-out;
119117
}
120118

121119
&:focus-ring {

components/checkbox/index.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ governing permissions and limitations under the License.
161161

162162
transition: box-shadow var(--spectrum-global-animation-duration-100) ease-out,
163163
margin var(--spectrum-global-animation-duration-100) ease-out;
164-
164+
165165
/* force ff to render on the pixel grid */
166166
transform: translate(0, 0);
167167
}

components/checkbox/skin.css

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ governing permissions and limitations under the License.
3030

3131
.spectrum-Checkbox-box {
3232
&:before {
33+
forced-color-adjust: none;
3334
border-color: var(--spectrum-checkbox-box-border-color);
3435
background-color: var(--spectrum-checkbox-box-background-color);
3536
}
@@ -111,6 +112,7 @@ governing permissions and limitations under the License.
111112
}
112113

113114
&:disabled ~ .spectrum-Checkbox-label {
115+
forced-color-adjust: none;
114116
color: var(--spectrum-checkbox-text-color-disabled);
115117
}
116118
}
@@ -225,3 +227,36 @@ governing permissions and limitations under the License.
225227
}
226228
}
227229
}
230+
231+
@media (forced-colors: active) {
232+
.spectrum-Checkbox-input {
233+
&:focus-ring + .spectrum-Checkbox-box {
234+
forced-color-adjust: none;
235+
outline-color: var(--spectrum-checkbox-focus-ring-color-key-focus);
236+
outline-style: auto;
237+
outline-offset: var(--spectrum-checkbox-focus-ring-gap-key-focus);
238+
outline-width: var(--spectrum-checkbox-focus-ring-size-key-focus); }
239+
}
240+
:root {
241+
--spectrum-checkbox-emphasized-box-background-color : var(--spectrum-alias-background-color-transparent);
242+
--spectrum-checkbox-emphasized-box-background-color-disabled : var(--spectrum-alias-background-color-transparent);
243+
--spectrum-checkbox-emphasized-box-border-color-disabled : GrayText;
244+
--spectrum-checkbox-text-color-disabled : GrayText;
245+
--spectrum-checkbox-box-border-color-key-focus: FieldText;
246+
--spectrum-checkbox-emphasized-box-border-color: FieldText;
247+
--spectrum-checkbox-quiet-box-border-color: FieldText;
248+
--spectrum-checkbox-box-border-color-selected-hover : Highlight;
249+
--spectrum-checkbox-emphasized-box-border-color-selected-hover : Highlight;
250+
--spectrum-checkbox-quiet-box-border-color-selected-hover : Highlight;
251+
--spectrum-checkbox-emphasized-box-border-color-selected: Highlight;
252+
--spectrum-checkbox-quiet-box-border-color-selected: Highlight;
253+
--spectrum-checkbox-checkmark-color: HighlightText;
254+
--spectrum-checkbox-focus-ring-color-key-focus: Highlight;
255+
--spectrum-checkbox-focus-ring-gap-key-focus: var(--spectrum-global-dimension-static-size-25);
256+
--spectrum-checkbox-focus-ring-size-key-focus: var(--spectrum-global-dimension-static-size-40);
257+
--spectrum-checkbox-box-border-color-error: FieldText;
258+
--spectrum-checkbox-box-border-color-error-hover: FieldText;
259+
--spectrum-checkbox-box-border-color-error-selected: FieldText;
260+
--spectrum-checkbox-text-color-error: FieldText;
261+
}
262+
}

components/dialog/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
"peerDependencies": {
1919
"@spectrum-css/button": "^3.0.0-beta.3",
2020
"@spectrum-css/buttongroup": "3.0.0-beta.3",
21+
"@spectrum-css/divider": "^1.0.0-beta.1",
2122
"@spectrum-css/icon": "^2.0.0",
2223
"@spectrum-css/modal": "^3.0.0-beta.0",
2324
"@spectrum-css/underlay": "^2.0.0",
@@ -26,6 +27,7 @@
2627
"devDependencies": {
2728
"@spectrum-css/button": "^3.0.0-beta.3",
2829
"@spectrum-css/buttongroup": "3.0.0-beta.3",
30+
"@spectrum-css/divider": "^1.0.0-beta.1",
2931
"@spectrum-css/component-builder": "^1.2.0",
3032
"@spectrum-css/icon": "^2.1.1",
3133
"@spectrum-css/modal": "^3.0.0-beta.0",

components/divider/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# @spectrum-css/divider
2-
> The Spectrum CSS rule component
2+
> The Spectrum CSS divider component
33
44
This package is part of the [Spectrum CSS project](https://github.com/adobe/spectrum-css).
55

components/divider/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@spectrum-css/divider",
3-
"version": "1.0.0-beta.0",
3+
"version": "1.0.0-beta.1",
44
"description": "The Spectrum CSS divider component",
55
"license": "Apache-2.0",
66
"main": "dist/index-vars.css",

0 commit comments

Comments
 (0)