You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First, on behalf of the core maintainers, I'd like to thank you for wanting to contribute and make the user experience for your end-users better and improve the developer experience of this library. :+1::tada: -- [@interactivellama](https://github.com/interactivellama/)
4
+
5
+
## Contributing process
6
+
1. Read the [Codebase Overview](docs/codebase-overview.md) to learn concepts and best practices for the codebase and to confirm it is within project scope.
7
+
1. Create a new issue before starting your solution to keep track of what you are trying to contribute. That way, we can offer suggestions, collaborate on a public API (props), or let you know if there is already an effort in progress.
8
+
1. Fork this repository, clone your fork locally. Create a topic branch locally.
9
+
1. Add the new component to the `/components` folder
10
+
1. Add the component name to `/components/constants.js`
11
+
1. Add documentation site examples and dev storybook stories in `/components/[COMPONENT]/__examples__/`
12
+
1. Add Mocha and Snapshot tests to `/components/[COMPONENT]/__tests__/`
13
+
1. Hook up site and storybook examples in `/components/[COMPONENT]/__docs__/`
14
+
1. Hook up documentation site examples in `/components/site-stories.js`. Site examples only have access to variables exported in `/components/index.js`, so you should limit your imports to these within site examples.
15
+
1. Push to your username's forked repository.
16
+
1. Send us a well-documented pull request targeting `master` from your forked repository. GitHub pull requests should have a descriptive title, a brief summary, @mention several relevant people to review the code, add helpful GitHub comments on lines where you have questions or concerns. All contributors must sign a [Contributor License Agreement](https://cla.salesforce.com/sign-cla).
17
+
1. We'll review your code, suggest any needed changes, and hopefully merge it in. Thank you!
18
+
19
+
## Contributing Guidelines
20
+
- Are you a first-time contributor? If you would like a simple task to start out with, you might consider [these issues](https://deepscan.io/dashboard/#view=project&pid=1475&bid=4666&subview=issues) or run `npm run lint` and fix a few warnings.
21
+
- UX pattern / design must exist in [SLDS](https://www.lightningdesignsystem.com/). Components in the process of being added to SLDS will be considered as prototypes.
22
+
- All new props and components need tests. **Please review the [testing readme](/tests/README.md)**
23
+
- Follow Eslint settings.
24
+
- If you are adding a feature, [add a story](https://storybook.js.org/basics/writing-stories/) to the React Storybook that uses your feature, so that reviewers can test it.
25
+
- Add enough Storybook stories and testing examples to show use of all component prop and values--if they are enumerated. All examples that are present for a component in the [SLDS website](https://www.lightningdesignsystem.com/) should be created as a Storybook story _and_ imported into the documentaiton site examples.
26
+
- Prop description tables on the documentation site are generated from propType comments within the component. Use `npm run build-docs` to confirm comment compatibility. Introductory component descriptions are generated from the comment directly before the component declaration with [react-docgen](https://github.com/reactjs/react-docgen).
27
+
- All props descriptions should have a _Tested with snapshot testing._ or _Tested with Mocha framework._ notice in them.
28
+
29
+
## The review process
30
+
1. Read through the modified/added code in the pull request.
31
+
1.`git clone` this repository. Pull down the pull requested branch. It will be within the contributor's forked repository. For instance, `git checkout -b interactivellama-data-table-width master` then `git pull [email protected]:interactivellama/design-system-react.git data-table-width`. You could also create an additional remote and pull down the branch directly.
32
+
1. Run `npm install` and `npm start`.
33
+
1. Review the appropriate Storybook stories at `http://localhost:9001/`.
34
+
1. Review tests. Open `http://localhost:8001/` and confirm that tests are passing in your browser.
35
+
1. Compare component markup to SLDS markup. Reviewing the snapshot strings is the easiest way. Add year-first date and commit SHA to `last-slds-markup-review` in package.json and push to pull request branch.
36
+
1. Request a review of the new component/feature by the Salesforce UX Accessibility Team. Add year-first review date, and commit SHA, `last-accessibility-review`, to `package.json` and push to pull request branch.
37
+
```js
38
+
{
39
+
"component":"",
40
+
"status":"prod",
41
+
"display-name":"",
42
+
"last-accessibility-review": {
43
+
"date-iso-8601":"2017/12/31",
44
+
"commit-sha":""
45
+
},
46
+
"last-slds-markup-review": {
47
+
"date-iso-8601":"2017/12/30",
48
+
"commit-sha":""
49
+
},
50
+
"SLDS-component-path":""
51
+
},
52
+
```
53
+
1. While the contributor's branch is checked out, run `npm run local-update` within locally cloned [site repo](https://github.com/salesforce-ux/design-system-react-site) to confirm the site will function correctly at the next release. This will also build the bundle (`npm run dist`) and use the bundle in the documentation site and confirm that the bundle works.
54
+
55
+
## Testing the documentation site (internal)
56
+
1. Pull down the documentation site (currenly private) and place in the same parent folder as this library: `git clone [email protected]:salesforce-ux/design-system-react-site.git` and run `npm install`.
57
+
`.
58
+
1. Run `npm run local-update` from within `design-system-react-site` to build, copy, and serve a local version of this library into the site. You should be able to now view the updated site at `http://localhost:8080/` and resolve any issues with updated documentation.
Welcome to [Design System React](https://react.lightningdesignsystem.com/).
3
+
4
+
Presented here are Javascript components based on [Lightning Design System](https://www.lightningdesignsystem.com/) and designed for React.
5
+
6
+
* Tailored for building Salesforce apps: Using Design System React ensures that your app's UI reflect the Salesforce Lightning look, feel, and behaviors.
7
+
* Continuously updated: As long as you’re using the latest version of Design System React, your pages are always up to date with Salesforce UI changes.
8
+
9
+
## Documentation
10
+
11
+
[Design System React website](https://react.lightningdesignsystem.com/)
12
+
13
+
[Salesforce Lightning Design System website](https://www.lightningdesignsystem.com/)
// 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.
function_classCallCheck(instance,Constructor){if(!(instanceinstanceofConstructor)){thrownewTypeError("Cannot call a class as a function");}}
38
+
39
+
function_possibleConstructorReturn(self,call){if(!self){thrownewReferenceError("this hasn't been initialised - super() hasn't been called");}returncall&&(typeofcall==="object"||typeofcall==="function") ? call : self;}
40
+
41
+
function_inherits(subClass,superClass){if(typeofsuperClass!=="function"&&superClass!==null){thrownewTypeError("Super expression must either be null or a function, not "+typeofsuperClass);}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor: {value: subClass,enumerable: false,writable: true,configurable: true}});if(superClass)Object.setPrototypeOf ? Object.setPrototypeOf(subClass,superClass) : subClass.__proto__=superClass;}// `~` is replaced with design-system-react at runtime
42
+
// `~` is replaced with design-system-react at runtime
43
+
// `~` is replaced with design-system-react at runtime
44
+
45
+
46
+
// `~` is replaced with design-system-react at runtime
0 commit comments