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
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.
5
+
1. Create a new issue before starting your solution to keep track of what you are trying to contribute. That way, we can also offer suggestions or let you know if there is already an effort in progress.
6
+
1. Fork this repository, clone your fork locally. Create a topic branch locally.
7
+
1. Add the component to `/components` folder
8
+
1. Add the component name to `constants.js`
9
+
1. Add Storybook examples to `/examples`
10
+
1. Add documentation site examples to `/examples/index.js`
11
+
1. Add tests to `/tests`.
12
+
1. Push to your username's forked repository.
13
+
1. Send us a well-documented pull request based on `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.
14
+
1. We'll review your code, suggest any needed changes, and hopefully merge it in. Thank you!
15
+
16
+
## Contributing Guidelines
17
+
- 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.
18
+
- All new props and components need tests. **Please review the [testing readme](/tests/README.md)**
19
+
- Follow Eslint settings.
20
+
- 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.
21
+
- Stories are stored in [examples folder](/examples) along with Documentation site examples. To add a story to the interactive examples on the [documentation site](https://react.lightningdesignsystem.com/components/), add the JSX file to [examples/index.js](/examples/index.js). All examples that are present for a component in the [SLDS website](https://www.lightningdesignsystem.com/) or it's internal site should be created as a Storybook story _and_ listed in `examples/index.js`.
22
+
- Prop description tables on the documentation site are generated from propType comments within the component. All props descriptions should have a _Tested with snapshot testing._ or _Tested with Mocha framework._ notice in them.
23
+
- Introductory component descriptions are generated from the comment directly before the component declaration with [react-docgen](https://github.com/reactjs/react-docgen).
24
+
25
+
## The review process (internal)
26
+
-`git clone` this repository
27
+
-`npm install`
28
+
- 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.
29
+
-`npm start` and review the appropriate React Story example at `http://localhost:9001/`. Open `http://localhost:8001/` and confirm that tests are passing in your environment.
30
+
- Check that any modified or added examples for the documentation site are working and are present in `examples/index.js`.
31
+
4. Request a review of the new component/feature by the Salesforce UX Accessibility Team.
32
+
33
+
## Testing the documentation site (internal)
34
+
1. Pull down the documentation site 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`.
35
+
`.
36
+
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