Skip to content

Commit 7089189

Browse files
authored
Merge pull request #1 from interactivellama/sudowork-global-header-avatar
Add global header tests
2 parents b26f1b1 + a679cdd commit 7089189

File tree

277 files changed

+9832
-6047
lines changed

Some content is hidden

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

277 files changed

+9832
-6047
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

.github/config.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Configuration for new-issue-welcome - https://github.com/behaviorbot/new-issue-welcome
2+
3+
# Comment to be posted to on first time issues
4+
newIssueWelcomeComment: >
5+
Thanks for opening your first issue! :wave:
6+
7+
If you have found this library helpful, please star it. A maintainer will try to respond within 7 days. If you haven’t heard anything by then, please bump this thread.
8+
9+
# Configuration for new-pr-welcome - https://github.com/behaviorbot/new-pr-welcome
10+
11+
# Comment to be posted to on PRs from first time contributors in your repository
12+
newPRWelcomeComment: >
13+
Thanks for opening this pull request! :100:
14+
15+
This is a community-driven project, and we can't do it without your participation. Please check out our [contributing guidelines](https://github.com/salesforce/design-system-react/blob/master/CONTRIBUTING.md) and review the Contributor Checklist if you haven't already, to make sure everything is squared away. TravisCI will take about 10 minutes to run through the same items that are on the Contributor checklist with a pass/fail check below. Please fix any issues that cause TravisCI to fail or ask for clarification--we try, but sometimes the errors can be unclear.
16+
17+
A maintainer will try to respond within 7 days. If you haven’t heard anything by then, please bump this thread.
18+
19+
# Configuration for first-pr-merge - https://github.com/behaviorbot/first-pr-merge
20+
21+
# Comment to be posted to on pull requests merged by a first time user
22+
firstPRMergeComment: >
23+
Congrats on merging your first pull request to Design System React! :tada:
24+
25+
On behalf of Salesforce's customers, partners, product specialists and employees, we would like offer sincere thanks and appreciation for helping make our user experience better. We look forward to working with you more in the future.
26+
27+
![Alt Text](https://media.giphy.com/media/lcYFNTaz4U9jy/giphy.gif)
28+

.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: 104 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -31,55 +31,133 @@ These are changes that have backwards-compatible solutions present and that comp
3131

3232
### Latest Release
3333

34+
## Release 0.8.21
35+
36+
**Bugfixes**
37+
38+
* 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+
40+
* 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+
49+
50+
## Release 0.8.20
51+
52+
**Bugfixes**
53+
54+
* Fix bug in `Dropdown` component where getIndexByValue() needs to look at nextProps.options when componentWillreceiveProps() is called.
55+
* Datepicker: Make year Combobox menu width match the width of its input/button.
56+
57+
**Maintenance**
58+
59+
* Documentation update on how to use Design System React within Create React App.
60+
* Consolidate assistiveText props under one object for the following: `DataTable`, `Icon`, `Search`, `PanelFilterGroup`, `Spinner`, `Tree`, `TextArea`.
61+
62+
## Release 0.8.19
63+
64+
**Major Features**
65+
66+
* Add Illustration Component
67+
68+
**Bugfixes**
69+
70+
* Make `Slider` a controlled component. Use `value` and `onChange` props.
71+
* `Combobox`: Allow PopperJS to position menu correctly when menu hits the screen or overflow ancestor boundary.
72+
* Update `Tree` branch and item to use latest SLDS HTML tags
73+
* Update `Alert` error icon
74+
75+
**Maintenance**
76+
77+
* Add `getting-started.md` to NPM module
78+
* Document copying over SLDS fonts to public for Create React App
79+
* Update `Radio` component examples
80+
* Remove `Object.assign()` from codebase and replace with spread
81+
* Consolidate `assistiveText` props under one object. This is going to deprecate many props, but will make props more consistent across all the components.
82+
* `AppLauncherSection`
83+
* `Avatar`
84+
* `Breadcrumb`
85+
* `ButtonStateful`
86+
* `Button`
87+
* `GlobalHeader`
88+
* `GlobalNavigationBarDropdown`
89+
90+
## Release 0.8.18
91+
92+
**Bugfixes**
93+
94+
* `Icon` uses new values for `name` and `category` when changed.
95+
* Fixes console error that appears when using keyboard navigation to navigate the tree.
96+
97+
**Maintenance**
98+
99+
* `url-exists` utility uses `fetch` instead of `xmlHttpRequest`.
100+
101+
## Release 0.8.17
102+
103+
**Bugfixes**
104+
105+
* 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.
106+
107+
**Minor features**
108+
109+
* `dropdown` prop added to `DataTableRowActions` to increase customization of the dropdown menu
110+
* `tabIndex` added to `MenuDropdown` component
111+
* `Picklist` has been removed from examples. Please use a Combobox instead.
112+
34113
## Release 0.8.16
35114

36115
**Deprecation**
37116
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.
117+
38118
* 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.
39119
* `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.
40120
* 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.
41121
* For more information, please review #1350.
42122

43123
**Minor features**
124+
44125
* 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.
45126
* Add `tabIndex` prop to `MenuDropdown`
46127
* Update SLDS version to 2.6.0 and test
47128

48129
**Bug fix**
130+
49131
* Dialog components such as Dropdown when used with `menuPosition='overflowBoundaryElement'` now respect `max-width` instead of inherited children width
50132
* Remove duplicate logo in `GlobalHeader`
51133

52134
**Maintenance**
135+
53136
* Upgrade Babel to v7 and Jest to v23
54137

55138
**Documentation**
56-
* Remove deprecated Picklist from code base and examples
57-
58-
## Release 0.8.16
59139

60-
**Bugfixes**
61-
* 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.
62-
63-
**Minor features**
64-
* `dropdown` prop added to `DataTableRowActions` to increase customization of the dropdown menu
65-
* `tabIndex` added to `MenuDropdown` component
66-
* `Picklist` has been removed from examples. Please use a Comboboxe instead.
140+
* Remove deprecated Picklist from code base and examples
67141

68142
## Release 0.8.15
143+
69144
**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`.
70145
**Require `iconCategory` if `iconName` is set.** `utility` used to be the default icon category. `iconCategory` is now required.
71146

72147
**Major features**
148+
73149
* `@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.
74150
* Tree is now a production component and supports [single selection keyboard navigation](https://www.lightningdesignsystem.com/components/trees/).
75151

76152
**Minor features**
153+
77154
* DataTable: Align header markup with SLDS to fix alignment issues. Remove error for non-boolean attribute `focusable`.
78155
* Upgrade React Modal to 3.4.4. This is a dependency of `Modal`.
79156
* Modal: Adds `assistiveText.dialogLabel` to define modal label when there is no header.
80157
* DataTable: Adds `noHint` prop to actions and makes hints an optional field.
81158

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

92170
**Maintenance**
171+
93172
* Require `iconCategory` if `iconName` is set. `utility` used to be the default icon category. `iconCategory` is now required.
94173
* App Launcher - `assistiveText` is now an object with keys. Please update your component props.
95174
* Popover - `assistiveText` is now an object with keys. Please update your component props.
@@ -102,50 +181,61 @@ Adds new script storyshots:start that allows interactive viewing of what is bein
102181
## Release 0.8.14
103182

104183
**Minor features**
184+
105185
* Tooltip: "Learn more" variant added. Deprecation notice added for `variant: info || error`. Please use `theme` prop going forward instead.
106186

107187
**Bug fix**
188+
108189
* Data Table: Remove console warning when DataTableColumn `sortable` is `true`.
109190
* Combobox: Trigger onOpen callback when menu opens
110191
* Datepicker: Focus input if menu was actually open and not just requested to close
111192

112193
## Release 0.8.13
113194

114195
**Major features**
196+
115197
* Add SLDS Slider
116198

117199
**Minor features**
200+
118201
* Allow importing Lookup [deprecated] subcomponents in CommonJS modules
119202

120203
## Release 0.8.12
121204

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

126210
## Release 0.8.11
127211

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

132217
**Maintenance**
218+
133219
* Lint warnings from a third-party package have been removed from CI tests.
134220

135221
**Documentation**
222+
136223
* Prop doc typos:
137-
* replaced rendered input block to code block
138-
* fixed broken link to source of Inline Edit Inputs
224+
* replaced rendered input block to code block
225+
* fixed broken link to source of Inline Edit Inputs
139226

140227
## Release 0.8.10
141228

142229
**Minor features**
143-
* Combobox supports error messages.
230+
231+
* Combobox supports error messages.
144232

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

148237
**Maintenance**
238+
149239
* Update Dropdown Menu children description
150240
* Update SLDS peer dependency to allow 2.6.0-alphas
151241
* Remove plus-plus (`var++`) instances from library for clarity
@@ -160,6 +250,7 @@ Adds new script storyshots:start that allows interactive viewing of what is bein
160250
* Combobox menu supports subheadings and line separators.
161251

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

165256
## Release 0.8.8
@@ -182,7 +273,6 @@ Adds new script storyshots:start that allows interactive viewing of what is bein
182273
* Document child nodes of `IconSettings`
183274
* Update `Modal` footer prop description
184275

185-
186276
## Release 0.8.7
187277

188278
**Bugfix**

0 commit comments

Comments
 (0)