Skip to content

Commit 4ac263a

Browse files
authored
Merge pull request #428 from lifeparticle/lifeparticle-patch-2
Update CONTRIBUTING.md
2 parents 1be4a97 + 79340df commit 4ac263a

File tree

1 file changed

+21
-16
lines changed

1 file changed

+21
-16
lines changed

ui/CONTRIBUTING.md

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,17 @@ Adopting consistent naming conventions helps in understanding and navigating the
210210
211211
#### 4. How to add a feature?
212212
213-
4.1. Use scaffdog to create the page folder
213+
Adding a new feature may seem daunting at first, but by following these steps and working together can ensure a smooth and efficient process.
214+
215+
4.1 If there is no related issue then create a new one and clearly describe the feature.
216+
217+
4.2 Design a low-fidelity mockup of the feature. This helps in visualizing the user interface and the user experience. Ensure that the design aligns with the project's design guidelines and style.
218+
219+
4.3 Wait for feedback and approval before proceeding. Make any necessary revisions based on the feedback received.
220+
221+
4.4 Once the mockup is approved, you can begin the development process. Remember to write clean, readable, and maintainable code.
222+
223+
4.5. Use scaffdog to create the page folder
214224

215225
```shell
216226
npx scaffdog generate
@@ -233,31 +243,26 @@ PageA/
233243
|── index.ts
234244
```
235245
236-
4.2. Update
237-
238-
`ui/src/pages/index.ts`
246+
4.6. Update files
239247
240-
4.3. Update
248+
- `ui/src/pages/index.ts`
241249
242-
`ui/src/data/featureData.ts`
250+
- `ui/src/data/featureData.ts`
243251
244-
4.4. Update
252+
- `ui/src/data/helpData.ts`
245253
246-
`ui/src/data/helpData.ts`
254+
- `ui/src/data/menuData.ts`
247255
248-
4.5. Update
256+
- `ui/src/data/routeData.tsx`
249257
250-
`ui/src/data/menuData.ts`
251-
252-
4.6. Update
253-
254-
`ui/src/data/routeData.tsx`
255-
256-
#### 5. How to add tests for a feature?
258+
4.7 Add tests for a feature
257259
258260
- Identify the key functionalities of your feature that need testing.
259261
- Define test cases for these functionalities, including both positive and negative scenarios.
260262
- Ensure your test cases cover all critical paths and edge cases.
261263
- Place your test scripts in the `__tests__` folder within your feature directory (in this case, `PageA/__tests__`).
262264
- Mock any external dependencies or modules that your feature interacts with. This ensures that your tests are focused solely on the feature's functionality.
263265
- Use faker to generate fake data for your tests.
266+
267+
4.8 Raise a PR for your feature
268+

0 commit comments

Comments
 (0)