Skip to content

Merges master #1

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

Merged
merged 76 commits into from
Apr 17, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
58acef7
add required field
Feb 27, 2018
8659cc7
Merge branch 'master' into combobox/required_prop
Feb 27, 2018
680889e
adding more tests
Mar 2, 2018
919c4e9
fix bug on assistive text
Mar 2, 2018
409e839
fix lint errors
Mar 2, 2018
7a08e35
refactor snapshot and fix generated id in snapshot tests
Mar 5, 2018
e1f5a77
fix generated id issue in snapshots and unrelated bug in props
Mar 7, 2018
325efe8
update docs
Mar 7, 2018
ccbbf13
revert fix of prop that was unnecessary
Mar 7, 2018
3c120d4
Remove module key from package.json
interactivellama Mar 13, 2018
cf8c76b
uplevel required prop, fix accessibility issues, and cleanup aria-des…
Mar 13, 2018
cae401a
remove unnecessary aria-describbedby in snapshot tests
Mar 13, 2018
62fec95
Move Combobox dialog before error message
interactivellama Mar 14, 2018
469e62b
Combobox: Move error message below pillbox
interactivellama Mar 14, 2018
e6d20f6
Combobox: Move error message below pillbox
interactivellama Mar 14, 2018
ded8636
Merge branch 'combobox/required_prop' of github.com:davidlygagnon/des…
interactivellama Mar 14, 2018
2631656
Merge branch 'combobox/required_prop' of github.com:davidlygagnon/des…
interactivellama Mar 14, 2018
a633adc
Merge branch 'combobox/required_prop' of github.com:davidlygagnon/des…
interactivellama Mar 14, 2018
d63e4f7
Promote functional code
interactivellama Mar 14, 2018
fb3b05c
Code overview typo
interactivellama Mar 14, 2018
0f1e7a2
Merge pull request #1299 from davidlygagnon/combobox/required_prop
interactivellama Mar 14, 2018
9000013
Merge pull request #1299 from davidlygagnon/combobox/required_prop
interactivellama Mar 14, 2018
45693d7
release patch
interactivellama Mar 14, 2018
6cf872b
Merge branch 'master' of github.com:salesforce/design-system-react
interactivellama Mar 14, 2018
4a20f39
Clean up for release
interactivellama Mar 14, 2018
5f25e7c
Bump package version
interactivellama Mar 14, 2018
d8ae9c3
Add project logotype
interactivellama Mar 20, 2018
bc43987
Move tree id into tree prop example
interactivellama Mar 22, 2018
ebed1c1
changeYearPicklistFocus
applepielyj Mar 22, 2018
443816a
update fix
applepielyj Mar 23, 2018
d56cd37
update fixII
applepielyj Mar 23, 2018
851a939
update fixIII
applepielyj Mar 23, 2018
11786a8
fixing lint errors
applepielyj Mar 27, 2018
c5d6c28
test checkin
applepielyj Mar 27, 2018
996bd5f
revert
applepielyj Mar 27, 2018
1eff0b0
Merge branch 'yujie/yearPickInitFocus' of github.com:applepielyj/desi…
applepielyj Mar 27, 2018
1a489f4
fix: #1302
ashu17706 Mar 27, 2018
ff893ee
Merge pull request #1308 from ashu17706/inline-edit-input-url-fix
interactivellama Mar 28, 2018
742a4e1
replaced rendered input block to code block in docs
ashu17706 Mar 28, 2018
d6889b8
Merge pull request #1311 from ashu17706/converting-input-element-to-i…
interactivellama Mar 28, 2018
04863c4
Update with David suggestions
applepielyj Mar 28, 2018
b08fd9e
fix lint
applepielyj Mar 28, 2018
9187e0f
Fix prettier-eslint-cli warning in CI
interactivellama Mar 30, 2018
e66ca25
Create browser-compatibility.md
interactivellama Mar 30, 2018
5c5c91d
Add browser-compatibility.md link
interactivellama Mar 30, 2018
d701294
Merge pull request #1316 from interactivellama/prettier-eslint-cli-wa…
interactivellama Mar 30, 2018
3517ebc
Add defaultValue to <Input>
3den Mar 22, 2018
d892d18
update version
3den Mar 22, 2018
0546716
revert image_snapshots
3den Mar 27, 2018
362d75a
update comments
3den Mar 30, 2018
cd1f07f
Merge pull request #1306 from devforce/master
interactivellama Mar 30, 2018
2a1024e
Release patch
interactivellama Mar 30, 2018
ed421c7
Clean up for release
interactivellama Mar 30, 2018
b5ef5cc
Bump package version
interactivellama Mar 30, 2018
f7f2cfd
Added slds slider component.
dlferro Apr 2, 2018
896844c
Merge remote-tracking branch 'refs/remotes/remote/master'
dlferro Apr 2, 2018
bb0dbc0
Set flip.enabled based on hasStaticAlignment prop
garygong Mar 29, 2018
32e51ea
disable boundariesElement
garygong Apr 3, 2018
1de170c
Add comments and lint
interactivellama Apr 5, 2018
7fd3014
Merge pull request #1313 from garygong/modal-flip
interactivellama Apr 5, 2018
2722784
Merge pull request #1307 from applepielyj/yujie/yearPickInitFocus
interactivellama Apr 5, 2018
9529d9a
dlferro Apr 6, 2018
e732ad6
Updated snapshot.
dlferro Apr 9, 2018
510994a
dlferro Apr 9, 2018
c4a6f19
Release patch
interactivellama Apr 9, 2018
4ccfdee
Clean up for release
interactivellama Apr 9, 2018
8a70abf
Bump package version
interactivellama Apr 9, 2018
3464af7
Updated event to be consistent in passing an object for second parameter
dlferro Apr 10, 2018
3a4f467
Merge pull request #1317 from DanFerro/slider
interactivellama Apr 11, 2018
eb4e576
Slider: Use string in event callback
interactivellama Apr 12, 2018
ce2610a
Merge pull request #1322 from interactivellama/slider-event-parameters
interactivellama Apr 12, 2018
39ea27c
Add link to blog announcement
interactivellama Apr 13, 2018
0555b73
Allow importing lookup DefaultSectionDivider
vintik Apr 5, 2018
7d80dde
Merge pull request #1326 from Vintik/vintik/add_section_divider
interactivellama Apr 17, 2018
5a25907
Merge master
futuremint Apr 17, 2018
ea88cb8
Updates package-lock.json
futuremint Apr 17, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,13 @@ $ npm install @salesforce-ux/design-system @salesforce/design-system-react
Welcome to the project! :wave: This library is the [React](https://facebook.github.io/react/) implementation of the [Salesforce Lightning Design System](https://www.lightningdesignsystem.com/). This library has a peer dependency on `@salesforce-ux/design-system`, `react`, and `react-dom`. It has been tested with React >=15.4.1 <16 and is stable despite its version number. Please polyfill this library in order to meet your target environment needs.

* [Usage](#usage)
* [Getting Started](https://react.lightningdesignsystem.com/getting-started/)
* [Getting started](https://react.lightningdesignsystem.com/getting-started/)
* [Documentation and interactive examples](https://react.lightningdesignsystem.com)
* [Contributing](CONTRIBUTING.md)
* [Codebase Overview](docs/codebase-overview.md)
* [Codebase overview](docs/codebase-overview.md)
* [Browser compatiblity and polyfills](docs/browser-compatibility.md)
* [Usage with Webpack](docs/webpack.md)
* [Open Sourcing Design System React](https://engineering.salesforce.com/open-sourcing-design-system-react-9be45b8bb127) - Medium article

## Usage

Expand Down
38 changes: 38 additions & 0 deletions RELEASENOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,49 @@ These are changes that have backwards-compatible solutions present and that comp

### Latest Release

## Release 0.8.12

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

## Release 0.8.11

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

**Maintenance**
* Lint warnings from a third-party package have been removed from CI tests.

**Documentation**
* Prop doc typos:
* replaced rendered input block to code block
* fixed broken link to source of Inline Edit Inputs

## Release 0.8.10

**Minor features**
* Combobox supports error messages.

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

**Maintenance**
* Update Dropdown Menu children description
* Update SLDS peer dependency to allow 2.6.0-alphas
* Remove plus-plus (`var++`) instances from library for clarity

**Notice**
`package.module` has been removed from the NPM module until a transpiled ES6 module build can be published to support it. The current `package.module` is considered broken already for Create React Apps--for instance, so this is not considered a breaking change. Your module bundler will just use the CommonJS build unless you are already transpiling the source code, so no changes should be need to be made.

## Release 0.8.9

**Minor features**

* Combobox menu supports subheadings and line separators.

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

## Release 0.8.8
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ exports[`Button Group Checkbox DOM Snapshot 1`] = `
aria-owns={undefined}
aria-required={undefined}
checked={undefined}
defaultChecked={undefined}
disabled={undefined}
id="ButtonGroupExampleMon"
name={undefined}
Expand Down Expand Up @@ -57,6 +58,7 @@ exports[`Button Group Checkbox DOM Snapshot 1`] = `
aria-owns={undefined}
aria-required={undefined}
checked={undefined}
defaultChecked={undefined}
disabled={undefined}
id="ButtonGroupExampleTue"
name={undefined}
Expand Down Expand Up @@ -90,6 +92,7 @@ exports[`Button Group Checkbox DOM Snapshot 1`] = `
aria-owns={undefined}
aria-required={undefined}
checked={undefined}
defaultChecked={undefined}
disabled={undefined}
id="ButtonGroupExampleWed"
name={undefined}
Expand Down Expand Up @@ -123,6 +126,7 @@ exports[`Button Group Checkbox DOM Snapshot 1`] = `
aria-owns={undefined}
aria-required={undefined}
checked={undefined}
defaultChecked={undefined}
disabled={undefined}
id="ButtonGroupExampleThu"
name={undefined}
Expand Down Expand Up @@ -156,6 +160,7 @@ exports[`Button Group Checkbox DOM Snapshot 1`] = `
aria-owns={undefined}
aria-required={undefined}
checked={undefined}
defaultChecked={undefined}
disabled={undefined}
id="ButtonGroupExampleFri"
name={undefined}
Expand Down Expand Up @@ -209,6 +214,7 @@ exports[`Button Group Checkbox Error DOM Snapshot 1`] = `
aria-owns={undefined}
aria-required={undefined}
checked={undefined}
defaultChecked={undefined}
disabled={undefined}
id="ButtonGroupExampleMon"
name={undefined}
Expand Down Expand Up @@ -242,6 +248,7 @@ exports[`Button Group Checkbox Error DOM Snapshot 1`] = `
aria-owns={undefined}
aria-required={undefined}
checked={undefined}
defaultChecked={undefined}
disabled={undefined}
id="ButtonGroupExampleTue"
name={undefined}
Expand Down Expand Up @@ -275,6 +282,7 @@ exports[`Button Group Checkbox Error DOM Snapshot 1`] = `
aria-owns={undefined}
aria-required={undefined}
checked={undefined}
defaultChecked={undefined}
disabled={undefined}
id="ButtonGroupExampleWed"
name={undefined}
Expand Down Expand Up @@ -308,6 +316,7 @@ exports[`Button Group Checkbox Error DOM Snapshot 1`] = `
aria-owns={undefined}
aria-required={undefined}
checked={undefined}
defaultChecked={undefined}
disabled={undefined}
id="ButtonGroupExampleThu"
name={undefined}
Expand Down Expand Up @@ -341,6 +350,7 @@ exports[`Button Group Checkbox Error DOM Snapshot 1`] = `
aria-owns={undefined}
aria-required={undefined}
checked={undefined}
defaultChecked={undefined}
disabled={undefined}
id="ButtonGroupExampleFri"
name={undefined}
Expand Down
1 change: 1 addition & 0 deletions components/combobox/__docs__/site-stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const siteStories = [
require('raw-loader!@salesforce/design-system-react/components/combobox/__examples__/inline-single.jsx'),
require('raw-loader!@salesforce/design-system-react/components/combobox/__examples__/readonly-single.jsx'),
require('raw-loader!@salesforce/design-system-react/components/combobox/__examples__/readonly-multiple.jsx'),
require('raw-loader!@salesforce/design-system-react/components/combobox/__examples__/required-input-error-state.jsx'),
];

module.exports = siteStories;
8 changes: 8 additions & 0 deletions components/combobox/__docs__/storybook-stories.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import Base from '../__examples__/base';
import BaseMenuSubHeader from '../__examples__/base-menu-subheader';
import BaseMenuSeparator from '../__examples__/base-menu-separator';
import BaseInheritMenuWidth from '../__examples__/base-inherit-menu-width.jsx';
import RequiredInputErrorState from '../__examples__/required-input-error-state';
import PredefinedOptionsOnly from '../__examples__/base-predefined-options-only';
import InlineSingle from '../__examples__/inline-single';
import InlineMultiple from '../__examples__/inline-multiple';
Expand All @@ -30,6 +31,7 @@ import SnapshotReadonlyMultipleSelection from '../__examples__/snapshot/readonly
import SnapshotReadonlyMultipleSelectionSingleItemSelected from '../__examples__/snapshot/readonly-multiple-selection-single-item-selected';
import SnapshotReadonlyMultipleSelectionMultipleItemsSelected from '../__examples__/snapshot/readonly-multiple-selection-multiple-items-selected';
import SnapshotReadonlySingleSelectionCustomMenuItemOpen from '../__examples__/snapshot/readonly-single-selection-custom-menu-item';
import SnapshotBaseLabelRequired from '../__examples__/snapshot/base-label-required';

storiesOf(COMBOBOX, module)
.addDecorator((getStory) => (
Expand All @@ -54,11 +56,17 @@ storiesOf(COMBOBOX, module)
.add('Readonly Single Selection Custom Menu Item', () => (
<ReadOnlySingleSelectionCustomMenuItem action={action} />
))
.add('Required Input in Error State', () => (
<RequiredInputErrorState action={action} />
))
.add('Snapshot Base Open', () => <SnapshotBaseOpen action={action} />)
.add('Snapshot Base Custom Menu Item Open', () => (
<SnapshotBaseCustomMenuItemOpen action={action} />
))
.add('Snapshot Base Selected', () => <SnapshotBaseSelected action={action} />)
.add('Snapshot Base Label Required', () => (
<SnapshotBaseLabelRequired action={action} />
))
.add('Snapshot Base Open Menu Sub Header Separator', () => (
<SnapshotBaseOpenMenuSubHeaderSeparator action={action} />
))
Expand Down
152 changes: 152 additions & 0 deletions components/combobox/__examples__/required-input-error-state.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
/* eslint-disable no-console, react/prop-types */
import React from 'react';
import Combobox from '~/components/combobox';
import Icon from '~/components/icon';
import comboboxFilterAndLimit from '~/components/combobox/filter';
import IconSettings from '~/components/icon-settings';

const accounts = [
{
id: '1',
label: 'Acme',
subTitle: 'Account • San Francisco',
type: 'account',
},
{
id: '2',
label: 'Salesforce.com, Inc.',
subTitle: 'Account • San Francisco',
type: 'account',
},
{
id: '3',
label: "Paddy's Pub",
subTitle: 'Account • Boston, MA',
type: 'account',
},
{
id: '4',
label: 'Tyrell Corp',
subTitle: 'Account • San Francisco, CA',
type: 'account',
},
{
id: '5',
label: 'Paper St. Soap Company',
subTitle: 'Account • Beloit, WI',
type: 'account',
},
{
id: '6',
label: 'Nakatomi Investments',
subTitle: 'Account • Chicago, IL',
type: 'account',
},
{ id: '7', label: 'Acme Landscaping', subTitle: '\u00A0', type: 'account' },
{
id: '8',
label: 'Acme Construction',
subTitle: 'Account • Grand Marais, MN',
type: 'account',
},
];

const accountsWithIcon = accounts.map((elem) =>
Object.assign(elem, {
icon: <Icon assistiveText="Account" category="standard" name={elem.type} />,
})
);

class Example extends React.Component {
constructor (props) {
super(props);

this.state = {
inputValue: '',
selection: [],
};
}

render () {
return (
<IconSettings iconPath="/assets/icons">
<Combobox
aria-describedby="description-unique-id"
id="combobox-unique-id"
disabled={this.props.disabled}
events={{
onChange: (event, { value }) => {
if (this.props.action) {
this.props.action('onChange')(event, value);
} else if (console) {
console.log('onChange', event, value);
}
this.setState({ inputValue: value });
},
onRequestRemoveSelectedOption: (event, data) => {
this.setState({
inputValue: '',
selection: data.selection,
});
},
onSubmit: (event, { value }) => {
if (this.props.action) {
this.props.action('onChange')(event, value);
} else if (console) {
console.log('onChange', event, value);
}
this.setState({
inputValue: 'input not found',
selection: [
...this.state.selection,
{
label: value,
icon: (
<Icon
assistiveText="Account"
category="standard"
name="account"
/>
),
},
],
});
},
onSelect: (event, data) => {
if (this.props.action) {
this.props.action('onSelect')(
event,
...Object.keys(data).map((key) => data[key])
);
} else if (console) {
console.log('onSelect', event, data);
}
this.setState({
inputValue: '',
selection: data.selection,
});
},
}}
errorText="This field is required"
labels={{
label: 'Search',
placeholder: 'Search Salesforce',
}}
multiple
options={comboboxFilterAndLimit({
inputValue: this.state.inputValue,
limit: 10,
options: accountsWithIcon,
selection: this.state.selection,
})}
required
selection={this.state.selection}
value={this.state.inputValue}
/>
</IconSettings>
);
}
}

Example.displayName = 'ComboboxExample';
export default Example; // export is replaced with `ReactDOM.render(<Example />, mountNode);` at runtime
12 changes: 12 additions & 0 deletions components/combobox/__examples__/snapshot/base-label-required.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/* eslint-disable no-console, react/prop-types */
import React from 'react';
import RequiredInputErrorStateComponent from '../required-input-error-state';

class Example extends React.Component {
render () {
return <RequiredInputErrorStateComponent />;
}
}

Example.displayName = 'ComboboxExample';
export default Example; // export is replaced with `ReactDOM.render(<Example />, mountNode);` at runtime
Loading