Skip to content

Commit df7f626

Browse files
Merge branch 'master' of github.com:salesforce/design-system-react into react-16
# Conflicts: # package-lock.json
2 parents a509f67 + b581b39 commit df7f626

File tree

28 files changed

+1378
-236
lines changed

28 files changed

+1378
-236
lines changed

RELEASENOTES.md

Lines changed: 36 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,19 +33,46 @@ These are changes that have backwards-compatible solutions present and that comp
3333

3434
## Release 0.8.21
3535

36+
* DataTable's `onChange` replaced with `onRowChange`. `onChange`'s parameters are `(selectedArrayOfItems, event)`. `onRowChange` standardizes the parameters with the rest of the library with `event, { selection:[array] }`.
37+
38+
**Minor Features**
39+
40+
* Input: Add Field Level Help and Inline Help variants
41+
* Icon: Add Warning, error, light color options
42+
* Modal: Add additional warning when `Settings.setAppElement` is not set.
43+
* AppLauncher: Add to CommonJS and ES6 module library export
44+
* Add Spinner to doc site
45+
3646
**Bugfixes**
3747

48+
* Progress Indicator: Improved assistive tech user experience
49+
* DatePicker: Fixing issue where year picker doesn't show years correctly
50+
* GlobalHeaderButton: Invalid markup fixed when used within GlobalHeaderTrigger
51+
* Tree: Allow label to be a React node (more lenient proptypes)
3852
* Positioning behavior of Dialog components that use nubbins has changed. This applies to `Popover`, `Tooltip`, `Datepicker`, `Dropdown`. Previously the nubbin would be misaligned due to hardcoded margins that would get added onto the dialog component. It will now instead calculate the offsets and include them in the positioning logic and add/subtract from the left and top.
39-
4053
* Dialogs that use nubbins would previously have the nubbins point at the location on the reference trigger component (i.e. `Button`). Details:
41-
* If a Popover had an align of `top left`, that meant the nubbin would point at the top left hand side of the `Button`.
42-
* The behavior now is that the nubbin will always position the Dialog element as needed to ensure it points at the center of the desired side.
43-
* In the case of a `top left` align the left will only designate the location of the nubbin on the Dialog.
44-
* We may decide to bring back the ability to control both the nubbin location on the Dialog, but also the location at which it points to on the reference element. Much of the logic surrounding nubbins has been broken at the seams and edge cases for a long time. This change has been done in order to provide a more robust and dependable solution.
45-
* Any dialog that uses an `offset` prop will need to be manually readjusted.
46-
* Deprecate `offset` prop for `Dropdown` and `Popover`. The manual setting of positional offset of dialog components has been deemed unreliable. Position logic has been re-written to deliver better and more reliable positioning. Please create an issue if you have an edge case not covered by the built-in logic.
47-
* In the future we may change the props on some of these Dialog components to ensure a more consistent positioning API with hopefully some less head-scratching in terms of how to use it. This may include deprecating certain props and introduction of other props.
48-
54+
* If a Popover had an align of `top left`, that meant the nubbin would point at the top left hand side of the `Button`.
55+
* The behavior now is that the nubbin will always position the Dialog element as needed to ensure it points at the center of the desired side.
56+
* In the case of a `top left` align the left will only designate the location of the nubbin on the Dialog.
57+
* We may decide to bring back the ability to control both the nubbin location on the Dialog, but also the location at which it points to on the reference element. Much of the logic surrounding nubbins has been broken at the seams and edge cases for a long time. This change has been done in order to provide a more robust and dependable solution.
58+
* Any dialog that uses an `offset` prop will need to be manually readjusted.
59+
* Deprecate `offset` prop for `Dropdown` and `Popover`. The manual setting of positional offset of dialog components has been deemed unreliable. Position logic has been re-written to deliver better and more reliable positioning. Please create an issue if you have an edge case not covered by the built-in logic.
60+
61+
**Maintenance and documenation**
62+
63+
* Move `Navigation` to `VerticalNavigation` to align with SLDS.
64+
* Dropdown: Document that default menu height is 5
65+
* Datepicker: Increase default years, 5 to 10 years
66+
* Add warnings to `bread-crumb`, `forms/input`, `forms/radio`, `forms/textarea`, `navigation`, `popover-tooltip` to show that they have been moved. Warning only occurs when using source code files `import [COMPONENT] from`design-system-react/components/[COMPONENT]`
67+
* Modal: Deprecate rarely used Trigger Portal found at `/components/modal/trigger`
68+
* Combobox: Clarify prop docs
69+
* Update react-doc-gen version
70+
* Tree: Move to one render function and proptype object per file
71+
* Add url-slug to package.json components, Makes prompt easier to find
72+
* Update SLDS site URLs for doc site
73+
* Add NPM babel preset `package.json`
74+
* Prefer object spread instead of `object.assign` eslint rule
75+
* Revert to `npm install` from `npm ci` due to TravisCI issues
4976

5077
## Release 0.8.20
5178

components/component-docs.json

Lines changed: 54 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3248,10 +3248,19 @@
32483248
},
32493249
"items": {
32503250
"type": {
3251-
"name": "array"
3251+
"name": "arrayOf",
3252+
"value": {
3253+
"name": "shape",
3254+
"value": {
3255+
"id": {
3256+
"name": "string",
3257+
"required": true
3258+
}
3259+
}
3260+
}
32523261
},
32533262
"required": true,
3254-
"description": "The collection of items to render in the table."
3263+
"description": "The collection of items to render in the table. This is an array of objects with each object having keys that correspond with the `property` prop of each `DataTableColumn`."
32553264
},
32563265
"noRowHover": {
32573266
"type": {
@@ -3260,12 +3269,12 @@
32603269
"required": false,
32613270
"description": "A variant which removes hover style on rows"
32623271
},
3263-
"onChange": {
3272+
"onRowChange": {
32643273
"type": {
32653274
"name": "func"
32663275
},
32673276
"required": false,
3268-
"description": "This function fires when the selection of rows changes."
3277+
"description": "This function fires when the selection of rows changes. This component passes in `event, { selection }` to the function. `selection` is an array of objects from the `items` prop.\n\nThis used to be `onChange` which is deprecated now, so that the parameters can be consistent with other components. `onChange` passed in the selection first and the event wtihout a data object."
32693278
},
32703279
"onSort": {
32713280
"type": {
@@ -3279,7 +3288,7 @@
32793288
"name": "array"
32803289
},
32813290
"required": false,
3282-
"description": "The selected rows.",
3291+
"description": "An array of objects of selected rows. See `items` prop for shape of objects.",
32833292
"defaultValue": {
32843293
"value": "[]",
32853294
"computed": false
@@ -4447,11 +4456,19 @@
44474456
"spinner": {
44484457
"name": "string",
44494458
"required": false
4459+
},
4460+
"fieldLevelHelpButton": {
4461+
"name": "string",
4462+
"required": false
44504463
}
44514464
}
44524465
},
44534466
"required": false,
4454-
"description": "**Assistive text for accessibility**\n* `label`: Visually hidden label but read out loud by screen readers.\n* `spinner`: Text for loading spinner icon."
4467+
"description": "**Assistive text for accessibility**\n* `label`: Visually hidden label but read out loud by screen readers.\n* `spinner`: Text for loading spinner icon.\n* `fieldLevelHelpButton`: The field level help button, by default an 'info' icon.",
4468+
"defaultValue": {
4469+
"value": "{\n fieldLevelHelpButton: 'Help',\n}",
4470+
"computed": false
4471+
}
44554472
},
44564473
"children": {
44574474
"type": {
@@ -4507,6 +4524,13 @@
45074524
"required": false,
45084525
"description": "Message to display when the input is in an error state. When this is present, also visually highlights the component as in error."
45094526
},
4527+
"fieldLevelHelpTooltip": {
4528+
"type": {
4529+
"name": "node"
4530+
},
4531+
"required": false,
4532+
"description": "A [Tooltip](https://react.lightningdesignsystem.com/components/tooltips/) component that is displayed next to the label. The props from the component will be merged and override any default props."
4533+
},
45104534
"fixedTextLeft": {
45114535
"type": {
45124536
"name": "union",
@@ -4565,6 +4589,21 @@
45654589
"required": false,
45664590
"description": "Every input must have a unique ID in order to support keyboard navigation and ARIA support."
45674591
},
4592+
"inlineHelpText": {
4593+
"type": {
4594+
"name": "union",
4595+
"value": [
4596+
{
4597+
"name": "node"
4598+
},
4599+
{
4600+
"name": "string"
4601+
}
4602+
]
4603+
},
4604+
"required": false,
4605+
"description": "Displays help text under the input."
4606+
},
45684607
"inputRef": {
45694608
"type": {
45704609
"name": "func"
@@ -12074,7 +12113,15 @@
1207412113
"required": true
1207512114
},
1207612115
"label": {
12077-
"name": "string",
12116+
"name": "union",
12117+
"value": [
12118+
{
12119+
"name": "node"
12120+
},
12121+
{
12122+
"name": "string"
12123+
}
12124+
],
1207812125
"required": true
1207912126
},
1208012127
"type": {

components/date-picker/__tests__/__snapshots__/datepicker.snapshot-test.jsx.snap

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,11 @@ exports[`Datepicker
7575
>
7676
<div
7777
className="slds-datepicker__filter--month slds-grid slds-grid--align-spread slds-grow"
78+
style={
79+
Object {
80+
"flex": 1.75,
81+
}
82+
}
7883
>
7984
<div
8085
className="slds-align-middle"
@@ -922,6 +927,11 @@ exports[`Datepicker
922927
>
923928
<div
924929
className="slds-datepicker__filter--month slds-grid slds-grid--align-spread slds-grow"
930+
style={
931+
Object {
932+
"flex": 1.75,
933+
}
934+
}
925935
>
926936
<div
927937
className="slds-align-middle"
@@ -1767,6 +1777,11 @@ exports[`Datepicker Default DOM Snapshot 1`] = `
17671777
>
17681778
<div
17691779
className="slds-datepicker__filter--month slds-grid slds-grid--align-spread slds-grow"
1780+
style={
1781+
Object {
1782+
"flex": 1.75,
1783+
}
1784+
}
17701785
>
17711786
<div
17721787
className="slds-align-middle"
@@ -2560,7 +2575,7 @@ exports[`Datepicker Default HTML Snapshot 1`] = `
25602575
<div class=\\"slds-datepicker slds-dropdown slds-dropdown--left\\">
25612576
<div class=\\"\\" aria-hidden=\\"false\\" data-selection=\\"single\\">
25622577
<div class=\\"slds-datepicker__filter slds-grid\\">
2563-
<div class=\\"slds-datepicker__filter--month slds-grid slds-grid--align-spread slds-grow\\">
2578+
<div class=\\"slds-datepicker__filter--month slds-grid slds-grid--align-spread slds-grow\\" style=\\"flex:1.75;\\">
25642579
<div class=\\"slds-align-middle\\"><button class=\\"slds-button slds-button--icon-container\\" type=\\"button\\"><svg aria-hidden=\\"true\\" class=\\"slds-button__icon\\"><use xlink:href=\\"/assets/icons/utility-sprite/svg/symbols.svg#left\\"></use></svg><span class=\\"slds-assistive-text\\">Previous month</span></button></div>
25652580
<h2
25662581
id=\\"sample-datepicker-month\\" class=\\"slds-align-middle\\" aria-live=\\"assertive\\" aria-atomic=\\"true\\">July <span class=\\"slds-assistive-text\\">2014</span></h2>

components/date-picker/private/navigation.jsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,10 @@ const DatepickerMonthNavigation = createReactClass({
9191
render () {
9292
return (
9393
<div className="slds-datepicker__filter slds-grid">
94-
<div className="slds-datepicker__filter--month slds-grid slds-grid--align-spread slds-grow">
94+
<div
95+
className="slds-datepicker__filter--month slds-grid slds-grid--align-spread slds-grow"
96+
style={{ flex: 1.75 }}
97+
>
9598
<div className="slds-align-middle">
9699
<Button
97100
assistiveText={{ icon: this.props.assistiveTextPreviousMonth }}

components/date-picker/private/year-picklist.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ const DatepickerYearSelector = createReactClass({
4343
const opts = [];
4444

4545
for (let year = fromYear; year < toYear; year += 1) {
46-
opts.push({ label: `${year}`, value: year, id: opts.length });
46+
opts.push({ label: `${year}`, value: year, id: String(opts.length) });
4747
}
4848
return opts;
4949
},
@@ -73,6 +73,7 @@ const DatepickerYearSelector = createReactClass({
7373
<div className="slds-form-element slds-align-content-center">
7474
<Combobox
7575
className="slds-shrink-none"
76+
classNameMenu="slds-datepicker"
7677
events={{
7778
onSelect: this.handleSelect,
7879
}}

components/input/__docs__/site-stories.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ const siteStories = [
88
require('raw-loader!@salesforce/design-system-react/components/input/__examples__/icons.jsx'),
99
require('raw-loader!@salesforce/design-system-react/components/input/__examples__/error.jsx'),
1010
require('raw-loader!@salesforce/design-system-react/components/input/__examples__/inactiveInputs.jsx'),
11+
require('raw-loader!@salesforce/design-system-react/components/input/__examples__/inline-help.jsx'),
12+
require('raw-loader!@salesforce/design-system-react/components/input/__examples__/field-level-help.jsx'),
1113
];
1214

1315
module.exports = siteStories;

0 commit comments

Comments
 (0)