Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 21 additions & 16 deletions ui/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,17 @@ Adopting consistent naming conventions helps in understanding and navigating the

#### 4. How to add a feature?

4.1. Use scaffdog to create the page folder
Adding a new feature may seem daunting at first, but by following these steps and working together can ensure a smooth and efficient process.

4.1 If there is no related issue then create a new one and clearly describe the feature.

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.

4.3 Wait for feedback and approval before proceeding. Make any necessary revisions based on the feedback received.

4.4 Once the mockup is approved, you can begin the development process. Remember to write clean, readable, and maintainable code.

4.5. Use scaffdog to create the page folder

```shell
npx scaffdog generate
Expand All @@ -233,31 +243,26 @@ PageA/
|── index.ts
```

4.2. Update

`ui/src/pages/index.ts`
4.6. Update files

4.3. Update
- `ui/src/pages/index.ts`

`ui/src/data/featureData.ts`
- `ui/src/data/featureData.ts`

4.4. Update
- `ui/src/data/helpData.ts`

`ui/src/data/helpData.ts`
- `ui/src/data/menuData.ts`

4.5. Update
- `ui/src/data/routeData.tsx`

`ui/src/data/menuData.ts`

4.6. Update

`ui/src/data/routeData.tsx`

#### 5. How to add tests for a feature?
4.7 Add tests for a feature

- Identify the key functionalities of your feature that need testing.
- Define test cases for these functionalities, including both positive and negative scenarios.
- Ensure your test cases cover all critical paths and edge cases.
- Place your test scripts in the `__tests__` folder within your feature directory (in this case, `PageA/__tests__`).
- Mock any external dependencies or modules that your feature interacts with. This ensures that your tests are focused solely on the feature's functionality.
- Use faker to generate fake data for your tests.

4.8 Raise a PR for your feature