Skip to content

Commit 93ee8bf

Browse files
Merge branch 'master' of github.com:salesforce/design-system-react into progress-indicator-assistive-text
2 parents 5d89951 + 4da7d86 commit 93ee8bf

File tree

207 files changed

+55053
-13833
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

207 files changed

+55053
-13833
lines changed

.babelrc

Lines changed: 49 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,62 @@
11
{
2-
"env": {
3-
"development": {
4-
"presets": [["env", {
2+
"presets": [
3+
[
4+
"@babel/preset-env",
5+
{
56
"targets": {
6-
"browsers": ["last 2 versions", "ie 11"],
7+
"browsers": [
8+
"last 2 versions",
9+
"ie 11"
10+
],
711
"node": "8.9.4"
812
}
9-
}], "react"],
10-
"plugins": ["transform-object-rest-spread", "transform-class-properties", "transform-export-extensions"]
11-
},
13+
}
14+
],
15+
"@babel/preset-react"
16+
],
17+
"plugins": [
18+
"@babel/plugin-proposal-object-rest-spread",
19+
"@babel/plugin-proposal-class-properties",
20+
"@babel/plugin-proposal-export-default-from",
21+
"@babel/plugin-proposal-export-namespace-from",
22+
"root-import"
23+
],
24+
"env": {
1225
"amd": {
13-
"presets": [["env", {
14-
"targets": {
15-
"browsers": ["last 2 versions", "ie 11"],
16-
"node": "8.9.4"
17-
}
18-
}], "react"],
19-
"plugins": ["import-noop", "transform-object-rest-spread", "transform-class-properties", "transform-export-extensions"]
20-
},
21-
"commonjs": {
22-
"presets": [["env", {
23-
"targets": {
24-
"browsers": ["last 2 versions", "ie 11"],
25-
"node": "8.9.4"
26-
}
27-
}], "react"],
28-
"plugins": ["import-noop", "transform-object-rest-spread", "transform-class-properties", "transform-export-extensions"]
26+
"plugins": ["import-noop"]
2927
},
3028
"esm": {
31-
"presets": [["env", {
32-
"targets": {
33-
"browsers": ["last 2 versions", "ie 11"],
34-
"node": "8.9.4"
35-
},
36-
"modules": false
37-
}], "react"],
38-
"plugins": ["transform-object-rest-spread", "transform-class-properties", "transform-export-extensions"]
29+
"presets": [
30+
[
31+
"@babel/preset-env",
32+
{
33+
"targets": {
34+
"browsers": [
35+
"last 2 versions",
36+
"ie 11"
37+
],
38+
"node": "8.9.4"
39+
},
40+
"modules": false
41+
}
42+
],
43+
"@babel/preset-react"
44+
],
45+
"plugins": [
46+
"@babel/plugin-proposal-object-rest-spread",
47+
"@babel/plugin-proposal-class-properties",
48+
"@babel/plugin-proposal-export-default-from",
49+
"@babel/plugin-proposal-export-namespace-from"
50+
]
51+
},
52+
"commonjs": {
53+
"plugins": ["import-noop"]
3954
},
4055
"test": {
41-
"presets": [["env", {
42-
"targets": {
43-
"browsers": ["last 2 versions", "ie 11"]
44-
}
45-
}], "react"],
46-
"plugins": ["istanbul", "transform-object-rest-spread", "transform-class-properties", "transform-export-extensions"]
56+
"plugins": ["istanbul"]
4757
}
4858
},
4959
"ignore": [
50-
"preset/**"
60+
"preset/**",
5161
],
52-
"plugins": [
53-
"root-import"
54-
]
55-
}
62+
}

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ design-system-react
1616
# Allow custom pre-commit
1717
scripts/pre-commit.sh
1818

19+
# Visual diff images. These are the images that compare differences
20+
# in the current and previous capture
21+
__diff_output__
22+
1923
# --- MACHINE GENERATED BELOW THIS LINE ---
2024

2125
### Node ###

.travis.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
sudo: false
12
language: node_js
23
node_js:
34
- "8"
@@ -7,9 +8,6 @@ install:
78
- npm ci
89
script:
910
- npm run travis-ci
10-
cache:
11-
directories:
12-
- node_modules
1311
env:
1412
- CXX=g++-4.8
1513
addons:

RELEASENOTES.md

Lines changed: 82 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,83 @@ These are changes that have backwards-compatible solutions present and that comp
3131

3232
### Latest Release
3333

34+
## Release 0.8.18
35+
36+
**Bugfixes**
37+
* `Icon` uses new values for `name` and `category` when changed.
38+
* Fixes console error that appears when using keyboard navigation to navigate the tree.
39+
40+
**Maintenance**
41+
* `url-exists` utility uses `fetch` instead of `xmlHttpRequest`.
42+
43+
## Release 0.8.17
44+
45+
**Bugfixes**
46+
* REVERT [Change inline edit for accessibility](https://github.com/salesforce/design-system-react/pull/1332). It will not be updated. There is a new View/Edit Record Input pattern that uses the [Docked Former Footer component](http://www.lightningdesignsystem.com/components/docked-form-footer/) and this should be used instead of the Inline Edit Input in the future.
47+
48+
**Minor features**
49+
* `dropdown` prop added to `DataTableRowActions` to increase customization of the dropdown menu
50+
* `tabIndex` added to `MenuDropdown` component
51+
* `Picklist` has been removed from examples. Please use a Combobox instead.
52+
53+
## Release 0.8.16
54+
55+
**Deprecation**
56+
TL:DR; If you use the source code directly, update your form component paths and the parameters in `onChange`. All others stay the same for now.
57+
* Moves `Input`, `Checkbox`, and `Textarea` out of `component/forms` and directly into `component/`. Old paths such as `component/forms/input` will still work, but include a console warning as deprecated.
58+
* `components/input`, `components/checkbox`, and `components/textarea` pass different parameters into the `onChange` callback. `onChange` now passes in `event, { checked }` if the new paths are used. The parameters used to be `checked, event, { checked }`. If you use the new paths such as `components/input`, please update your parameter variables. This aligns the callback's parameters with the rest of the library's callback functions.
59+
* If you consume the library with named imports `{[component]} from '@salesforce/design-system-react'`, you will recieve the warning and will need to use the old parameter order until the next breaking change.
60+
* For more information, please review #1350.
61+
62+
**Minor features**
63+
* Update `Tree` example to be hashmap in order to promote immutability. Please review `Tree` example on [documentation site](http://react.lightningdesignsystem.com/components/tree/) in order to understand flattened tree data.
64+
* Add `tabIndex` prop to `MenuDropdown`
65+
* Update SLDS version to 2.6.0 and test
66+
67+
**Bug fix**
68+
* Dialog components such as Dropdown when used with `menuPosition='overflowBoundaryElement'` now respect `max-width` instead of inherited children width
69+
* Remove duplicate logo in `GlobalHeader`
70+
71+
**Maintenance**
72+
* Upgrade Babel to v7 and Jest to v23
73+
74+
**Documentation**
75+
* Remove deprecated Picklist from code base and examples
76+
77+
## Release 0.8.15
78+
**Modals are now at `z-index: 8000`.** If there are items on the main page with a higher `z-index`, they will appear in front of the modal. This setting aligns with the [prescribed z-index in SLDS](https://www.lightningdesignsystem.com/design-tokens/#category-z-index) for `$z-index-overlay`.
79+
**Require `iconCategory` if `iconName` is set.** `utility` used to be the default icon category. `iconCategory` is now required.
80+
81+
**Major features**
82+
* `@salesforce/design-system-react/module` now contains tree-shaking compatible ES6 modules (Tested with Webpack 4). This should work out of the box (due to `package.json`'s `module` field) and replace CommonJS module usage in Webpack 3 and 4. See [pull request](https://github.com/salesforce/design-system-react/pull/1300) for more details.
83+
* Tree is now a production component and supports [single selection keyboard navigation](https://www.lightningdesignsystem.com/components/trees/).
84+
85+
**Minor features**
86+
* DataTable: Align header markup with SLDS to fix alignment issues. Remove error for non-boolean attribute `focusable`.
87+
* Upgrade React Modal to 3.4.4. This is a dependency of `Modal`.
88+
* Modal: Adds `assistiveText.dialogLabel` to define modal label when there is no header.
89+
* DataTable: Adds `noHint` prop to actions and makes hints an optional field.
90+
91+
**Bug fix**
92+
* Request icons (console warning) with HTTP GET, so Create React App's webpack dev server doesn't 404
93+
* Modal no longer jumps to 50% of page.
94+
* Documentation: Align button group example on site with SLDS example
95+
* Documentation site examples are more accessible (Page Headers and Stateful Buttons)
96+
* Datepicker: Change the year picklist initial focus to currently selected year
97+
* Datepicker: Focus input only if menu was previously open and not just requested to close
98+
* Inline Edit UX pattern updated for keyboard: New pattern is that it'll tab to the close button, and if you're focused on the close button and tab again, it'll blur the field.
99+
* `Dropdown` with `overflowBoundaryElement` and `align=right` use max-width instead of inherited children width.
100+
101+
**Maintenance**
102+
* Require `iconCategory` if `iconName` is set. `utility` used to be the default icon category. `iconCategory` is now required.
103+
* App Launcher - `assistiveText` is now an object with keys. Please update your component props.
104+
* Popover - `assistiveText` is now an object with keys. Please update your component props.
105+
* Modal - `assistiveText` is now an object with keys. Please update your component props.
106+
* NPM scripts update: “build-storybook" -> static:build, “build-storybook-for-tests” -> storyshots:build, “storybook” -> static:start
107+
* Switch `xml2json` to `xml2js` in tooling to make more compatible with Windows
108+
109+
Adds new script storyshots:start that allows interactive viewing of what is being tested with image snapshots to allow debugging.
110+
34111
## Release 0.8.14
35112

36113
**Minor features**
@@ -72,7 +149,7 @@ These are changes that have backwards-compatible solutions present and that comp
72149
## Release 0.8.10
73150

74151
**Minor features**
75-
* Combobox supports error messages.
152+
* Combobox supports error messages.
76153

77154
**Outside SLDS pattern added**
78155
* Multiple selection Combobox error messages should be placed after pillboxes with an additional `slds-has-error` wrapping div.
@@ -260,10 +337,10 @@ These are changes that have backwards-compatible solutions present and that comp
260337
import IconSettings from 'design-system-react/components/icon-settings';
261338
262339
ReactDOM.render(
263-
<IconSettings iconPath="/assets/icons">
264-
<MyApp />
265-
</IconSettings>,
266-
document.getElementById('app')
340+
<IconSettings iconPath="/assets/icons">
341+
<MyApp />
342+
</IconSettings>,
343+
document.getElementById('app')
267344
)
268345
269346
# This component can be wrapped around the entire app and/or individual components using Icons.

app.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,12 @@
33
/* eslint-disable import/no-extraneous-dependencies */
44
const compression = require('compression');
55
const express = require('express');
6+
const minimist = require('minimist');
67

78
const port = process.env.PORT || 9001;
9+
const argv = minimist(process.argv.slice(2));
10+
const buildFolder = argv.folder || 'storybook';
11+
// Setting buildFolder to 'storybook-based-tests' will allow interactive viewing of the Storyshots (story based tests).
812

913
// Create server
1014
const app = express();
@@ -19,10 +23,7 @@ app.use(
1923
`${__dirname}/node_modules/@salesforce-ux/design-system/assets/`
2024
)
2125
);
22-
app.use(express.static(`${__dirname}/storybook`));
23-
24-
// Use the following line to test Storyshots instead
25-
// app.use(express.static(`${__dirname}/storybook-based-tests`));
26+
app.use(express.static(`${__dirname}/${buildFolder}`));
2627

2728
// Listen
2829
const server = app.listen(port, () => {

components/accordion/__docs__/site-stories.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// This object is imported into the documentation site. An example for the documentation site should be part of the pull request for the component. The object key is the kabob case of the "URL folder". In the case of `http://localhost:8080/components/app-launcher/`, `app-launcher` is the `key`. The folder name is created by `components.component` value in `package.json`. Keep in mind, some components like `forms/checkbox` will be changed to `forms-checkbox`. The following uses webpack's raw-loader plugin to get "text files" that will be eval()'d by CodeMirror within the documentation site on page load.
1+
// This object is imported into the documentation site. An example for the documentation site should be part of the pull request for the component. The object key is the kabob case of the "URL folder". In the case of `http://localhost:8080/components/app-launcher/`, `app-launcher` is the `key`. The folder name is created by `components.component` value in `package.json`. The following uses webpack's raw-loader plugin to get "text files" that will be eval()'d by CodeMirror within the documentation site on page load.
22

33
/* eslint-env node */
44
/* eslint-disable global-require */

0 commit comments

Comments
 (0)