Skip to content

Commit f6d1943

Browse files
Merge branch 'master' of github.com:salesforce/design-system-react into progress-indicator-assistive-text
# Conflicts: # package-lock.json # tests/__snapshots__/story-based-tests.snapshot-test.js.snap
2 parents a9671ee + 8fd3f2b commit f6d1943

File tree

200 files changed

+5431
-4769
lines changed

Some content is hidden

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

200 files changed

+5431
-4769
lines changed

.eslintrc.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"modules": true
1313
}
1414
},
15-
"plugins": ["filenames", "json"],
15+
"plugins": ["filenames", "json", "prefer-object-spread"],
1616
"env": {
1717
"browser": true
1818
},
@@ -112,6 +112,8 @@
112112
"no-tabs": "off",
113113
// _ is not really private.
114114
"no-underscore-dangle": ["error", { "allowAfterThis": true }],
115+
//
116+
"prefer-object-spread/prefer-object-spread": [2, "always"],
115117
// Increases readability of function name
116118
"space-before-function-paren": [2, "always"],
117119

.storybook/middleware.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,15 @@ const expressMiddleWare = (router) => {
1212
)
1313
)
1414
);
15+
router.use(
16+
'/assets',
17+
express.static(
18+
path.join(
19+
__dirname,
20+
'../assets/'
21+
)
22+
)
23+
);
1524
};
1625

1726
module.exports = expressMiddleWare;

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ node_js:
55
install:
66
- npm install npm -g
77
- npm config set audit false
8-
- npm ci
8+
- npm install
99
script:
1010
- npm run travis-ci
1111
env:

README.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Welcome to the project! :wave: This library is the [React](https://facebook.gith
2828

2929
### Quick Setup (CommonJS)
3030

31-
For a no hassle setup and compatibility with Create React App v1, a CommonJS version has been included within the NPM package to allow usage without transpiling. Use the following named `import` syntax to access CommonJS components from `/lib/index.js`:
31+
For a no hassle setup and compatibility with Create React App v1, a CommonJS version has been included within the NPM package. If using this setup, please re-write the `import` statement in the documentation site examples. Use the following named `import` syntax to access CommonJS components from `/lib/index.js`:
3232

3333
```
3434
import { Button } from '@salesforce/design-system-react';
@@ -59,10 +59,6 @@ import Button from '@salesforce/design-system-react/components/button';
5959

6060
This library does not contain any Cascading Style Sheets (CSS). You will need to add `<link rel="stylesheet" type="text/css" href="/node_modules/@salesforce-ux/design-system/assets/styles/salesforce-lightning-design-system.min.css" />` to your page and serve that file from a publicly available folder.
6161

62-
### Icon Usage
63-
64-
Prior to v0.7.0, SLDS icons were bundled with the JavaScript. The 400KB+ icons bundle from [SLDS](https://www.lightningdesignsystem.com/) is no longer included. You will need to download the SLDS CSS and icons separately.
65-
6662
#### Serve icons publicly
6763

6864
Typically, scripts should be downloaded in the background without blocking the DOM. With React, this works best with [server side rendering](https://reactjs.org/docs/react-dom-server.html#rendertostaticmarkup). SLDS recommends placeholder stencils while scripts are initializing if the HTML cannot be served immediately. If you can serve the HTML, then icon SVGs should not be bundled and served like any other file. Set a path `context` for all child components with `<IconSettings>` at the top of your render tree:
@@ -85,7 +81,7 @@ ReactDOM.render(
8581

8682
```
8783
// ExpressJS example
88-
app.use('/assets/icons', express.static('node_modules/@salesforce-ux/icons/dist/salesforce-lightning-design-system-icons/'));
84+
app.use('/assets/icons', express.static('node_modules/@salesforce-ux/design-system/assets/icons/'));
8985
```
9086

9187
#### Bundle icons
@@ -94,7 +90,6 @@ If you use a module bundler, like Webpack, you can let your module bundler manag
9490

9591
```
9692
import IconSettings from '@salesforce/design-system-react/components/icon-settings';
97-
9893
import standardSprite from '@salesforce-ux/design-system/assets/icons/standard-sprite/svg/symbols.svg';
9994
...
10095
...
@@ -107,6 +102,10 @@ ReactDOM.render(
107102
)
108103
```
109104

105+
### Icon Usage
106+
107+
Prior to v0.7.0, SLDS icons were bundled with the JavaScript. The 400KB+ icons bundle from [SLDS](https://www.lightningdesignsystem.com/) is no longer included. You will need to download the SLDS CSS and icons separately.
108+
110109
Bundled script files are provided _only_ for convenience. Do not use in production.
111110

112111
* `design-system-react.min.js` (700KB+) - includes icons in the JavaScript

RELEASENOTES.md

Lines changed: 68 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,21 +31,65 @@ These are changes that have backwards-compatible solutions present and that comp
3131

3232
### Latest Release
3333

34+
## Release 0.8.20
35+
36+
**Bugfixes**
37+
38+
* Fix bug in `Dropdown` component where getIndexByValue() needs to look at nextProps.options when componentWillreceiveProps() is called.
39+
* Datepicker: Make year Combobox menu width match the width of its input/button.
40+
41+
**Maintenance**
42+
43+
* Documentation update on how to use Design System React within Create React App.
44+
* Consolidate assistiveText props under one object for the following: `DataTable`, `Icon`, `Search`, `PanelFilterGroup`, `Spinner`, `Tree`, `TextArea`.
45+
46+
## Release 0.8.19
47+
48+
**Major Features**
49+
50+
* Add Illustration Component
51+
52+
**Bugfixes**
53+
54+
* Make `Slider` a controlled component. Use `value` and `onChange` props.
55+
* `Combobox`: Allow PopperJS to position menu correctly when menu hits the screen or overflow ancestor boundary.
56+
* Update `Tree` branch and item to use latest SLDS HTML tags
57+
* Update `Alert` error icon
58+
59+
**Maintenance**
60+
61+
* Add `getting-started.md` to NPM module
62+
* Document copying over SLDS fonts to public for Create React App
63+
* Update `Radio` component examples
64+
* Remove `Object.assign()` from codebase and replace with spread
65+
* Consolidate `assistiveText` props under one object. This is going to deprecate many props, but will make props more consistent across all the components.
66+
* `AppLauncherSection`
67+
* `Avatar`
68+
* `Breadcrumb`
69+
* `ButtonStateful`
70+
* `Button`
71+
* `GlobalHeader`
72+
* `GlobalNavigationBarDropdown`
73+
3474
## Release 0.8.18
3575

3676
**Bugfixes**
77+
3778
* `Icon` uses new values for `name` and `category` when changed.
3879
* Fixes console error that appears when using keyboard navigation to navigate the tree.
3980

4081
**Maintenance**
82+
4183
* `url-exists` utility uses `fetch` instead of `xmlHttpRequest`.
4284

4385
## Release 0.8.17
4486

4587
**Bugfixes**
88+
4689
* 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.
4790

4891
**Minor features**
92+
4993
* `dropdown` prop added to `DataTableRowActions` to increase customization of the dropdown menu
5094
* `tabIndex` added to `MenuDropdown` component
5195
* `Picklist` has been removed from examples. Please use a Combobox instead.
@@ -54,41 +98,50 @@ These are changes that have backwards-compatible solutions present and that comp
5498

5599
**Deprecation**
56100
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.
101+
57102
* 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.
58103
* `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.
59104
* 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.
60105
* For more information, please review #1350.
61106

62107
**Minor features**
108+
63109
* 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.
64110
* Add `tabIndex` prop to `MenuDropdown`
65111
* Update SLDS version to 2.6.0 and test
66112

67113
**Bug fix**
114+
68115
* Dialog components such as Dropdown when used with `menuPosition='overflowBoundaryElement'` now respect `max-width` instead of inherited children width
69116
* Remove duplicate logo in `GlobalHeader`
70117

71118
**Maintenance**
119+
72120
* Upgrade Babel to v7 and Jest to v23
73121

74122
**Documentation**
123+
75124
* Remove deprecated Picklist from code base and examples
76125

77126
## Release 0.8.15
127+
78128
**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`.
79129
**Require `iconCategory` if `iconName` is set.** `utility` used to be the default icon category. `iconCategory` is now required.
80130

81131
**Major features**
132+
82133
* `@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.
83134
* Tree is now a production component and supports [single selection keyboard navigation](https://www.lightningdesignsystem.com/components/trees/).
84135

85136
**Minor features**
137+
86138
* DataTable: Align header markup with SLDS to fix alignment issues. Remove error for non-boolean attribute `focusable`.
87139
* Upgrade React Modal to 3.4.4. This is a dependency of `Modal`.
88140
* Modal: Adds `assistiveText.dialogLabel` to define modal label when there is no header.
89141
* DataTable: Adds `noHint` prop to actions and makes hints an optional field.
90142

91143
**Bug fix**
144+
92145
* Request icons (console warning) with HTTP GET, so Create React App's webpack dev server doesn't 404
93146
* Modal no longer jumps to 50% of page.
94147
* Documentation: Align button group example on site with SLDS example
@@ -99,6 +152,7 @@ TL:DR; If you use the source code directly, update your form component paths and
99152
* `Dropdown` with `overflowBoundaryElement` and `align=right` use max-width instead of inherited children width.
100153

101154
**Maintenance**
155+
102156
* Require `iconCategory` if `iconName` is set. `utility` used to be the default icon category. `iconCategory` is now required.
103157
* App Launcher - `assistiveText` is now an object with keys. Please update your component props.
104158
* Popover - `assistiveText` is now an object with keys. Please update your component props.
@@ -111,50 +165,61 @@ Adds new script storyshots:start that allows interactive viewing of what is bein
111165
## Release 0.8.14
112166

113167
**Minor features**
168+
114169
* Tooltip: "Learn more" variant added. Deprecation notice added for `variant: info || error`. Please use `theme` prop going forward instead.
115170

116171
**Bug fix**
172+
117173
* Data Table: Remove console warning when DataTableColumn `sortable` is `true`.
118174
* Combobox: Trigger onOpen callback when menu opens
119175
* Datepicker: Focus input if menu was actually open and not just requested to close
120176

121177
## Release 0.8.13
122178

123179
**Major features**
180+
124181
* Add SLDS Slider
125182

126183
**Minor features**
184+
127185
* Allow importing Lookup [deprecated] subcomponents in CommonJS modules
128186

129187
## Release 0.8.12
130188

131189
**Minor features**
190+
132191
* Affix position of Dialogs with `hasStaticAlignment` prop. Allows greater control of Tooltip, Popover, and dialog components.
133192
* Set Datepicker's initial year dropdown menu highlight selection to current selected date.
134193

135194
## Release 0.8.11
136195

137196
**Minor features**
197+
138198
* Allow `input` label of combobox to show as required
139199
* Input, Checkbox, and Radio support initial state (uncontrolled) in order to support applications with server-side form submission that are transitioning to atomic state.
140200

141201
**Maintenance**
202+
142203
* Lint warnings from a third-party package have been removed from CI tests.
143204

144205
**Documentation**
206+
145207
* Prop doc typos:
146-
* replaced rendered input block to code block
147-
* fixed broken link to source of Inline Edit Inputs
208+
* replaced rendered input block to code block
209+
* fixed broken link to source of Inline Edit Inputs
148210

149211
## Release 0.8.10
150212

151213
**Minor features**
214+
152215
* Combobox supports error messages.
153216

154217
**Outside SLDS pattern added**
218+
155219
* Multiple selection Combobox error messages should be placed after pillboxes with an additional `slds-has-error` wrapping div.
156220

157221
**Maintenance**
222+
158223
* Update Dropdown Menu children description
159224
* Update SLDS peer dependency to allow 2.6.0-alphas
160225
* Remove plus-plus (`var++`) instances from library for clarity
@@ -169,6 +234,7 @@ Adds new script storyshots:start that allows interactive viewing of what is bein
169234
* Combobox menu supports subheadings and line separators.
170235

171236
**Outside SLDS pattern added**
237+
172238
* UX pattern created for Combobox autocomplete that limits subheadings to those that have "child" matching items.
173239

174240
## Release 0.8.8
@@ -191,7 +257,6 @@ Adds new script storyshots:start that allows interactive viewing of what is bein
191257
* Document child nodes of `IconSettings`
192258
* Update `Modal` footer prop description
193259

194-
195260
## Release 0.8.7
196261

197262
**Bugfix**
Lines changed: 49 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)