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
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+27-1Lines changed: 27 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -46,14 +46,40 @@ As artificial intelligence evolves, AI-generated code is becoming valuable for m
46
46
47
47
Please see our [guideline for AI-generated code contributions to SAP Open Source Software Projects](https://github.com/SAP/.github/blob/main/CONTRIBUTING_USING_GENAI.md) for these requirements.
48
48
49
+
## Development Setup
50
+
51
+
> **Before you start, read the [Development Conventions and Guidelines](/docs/Guidelines.md)** for commit message format, naming conventions, and coding standards.
52
+
53
+
### Prerequisites
54
+
55
+
-[Node.js](https://nodejs.org/) (see `.nvmrc` for the required version)
56
+
-[Yarn](https://yarnpkg.com/) v4 (managed via corepack, see `packageManager` in `package.json`)
1. Please let us know, that you want to work on the issue you've filed in the [issue tracker](https://github.com/UI5/webcomponents-react/issues).
52
79
2. If the issue is marked with the `contribution welcome` tag, we'll assign you right away, otherwise we will check if some more information our guidance is needed and only then assign you to it.
53
80
3. Once you are assigned to the issue, you are ready to go.
54
81
4. Fork the `ui5-webcomponents-react` repository into your GitHub account, create a branch and apply your change. Please don't work directly on the `main` branch of your fork. This will help to update your fork in the future more easily.
55
82
5. Commit and push your change on that branch.
56
-
Please follow our [Development Conventions and Guidelines](/docs/Guidelines.md).
57
83
6. Create a pull request from your branch into `ui5-webcomponents-react`-`main` branch.
58
84
7. Follow the link posted by the CLA assistant to your pull request and accept it, as described above.
59
85
8. Wait for our code review and approval, possibly enhancing your change on request.
Please make sure you have installed a [LTS](https://github.com/nodejs/release?tab=readme-ov-file#release-schedule)`node` version (check by running `node -v`) and yarn v1 (check by running `yarn -v`).
11
-
12
-
First, you need to clone the git repository by running
13
-
14
-
```sh
15
-
# this git url points to the original repository, you can exchange it with the address of your fork
Then, go into that cloned directory and run `yarn install`. At this point, you are ready to start local development. You can now run:
20
-
21
-
-`yarn start` <br />
22
-
This starts the local storybook, so you can check if your components are rendered correctly. _If the storybook doesn't open automatically after executing the command, you can use this link: http://localhost:6006/_
23
-
-`yarn test` <br />
24
-
This command is running all tests in the project.
25
-
-`yarn test:open` <br />
26
-
This command is opening all cypress tests in Chrome.
27
-
-`yarn build` <br />
28
-
This command executes the full build of the project.
29
-
30
3
## TypeScript
31
4
32
-
Please use TypeScript to write your components. A good introduction to TypeScript in React can be found [here](https://levelup.gitconnected.com/ultimate-react-component-patterns-with-typescript-2-8-82990c516935).
5
+
All components must be written in TypeScript.
33
6
34
7
## Naming Convention for Props
35
8
@@ -38,12 +11,11 @@ Please use TypeScript to write your components. A good introduction to TypeScrip
38
11
All Events must pass an instance of the `Event`-Class as single parameter.
39
12
- When passing additional elements into a component, a slot should be used. This prop should contain a `ReactNode` or an array of ReactNodes (`ReactNode[]`)
40
13
41
-
You must follow the coding style as best you can when submitting code. Take note of naming conventions, separation of concerns, and formatting rules. You can use the code formatter [Prettier](https://prettier.io/) to handle some of this for you automatically.
42
-
When you are finished with your implementation please run `yarn prettier:all`, this will auto format all files for you.
14
+
Follow the coding style as best you can when submitting code. Take note of naming conventions, separation of concerns, and formatting rules. Prettier runs automatically as a pre-commit hook.
43
15
44
-
## Unit testing
16
+
## Testing
45
17
46
-
All components should have associated unit tests created with a code coverage score of at least 80%. Be an overachiever and shoot for 100% :)
18
+
All components should have associated Cypress component tests with a code coverage score of at least 80%.
0 commit comments