-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
18 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Component Guidelines | ||
|
||
Guidelines with the 🤖 emoji are enforced through CI checks. | ||
|
||
- Keep custom components/CSS to a minimum. | ||
- Use [PrimeNG](https://primeng.org/) components whenever possible | ||
- A design might contain something that, with a few tweaks, could use a PrimeNG component instead of a custom one. Always prefer to push for and suggest those tweaks. | ||
- Use [Tailwind](https://tailwindcss.com) utility classes instead of (s)css files | ||
- When creating new components, delete the automatically generated (s)css files | ||
- Follow the tailwind recommendations for [reusing styles](https://tailwindcss.com/docs/reusing-styles) | ||
- Delete auto-generated spec files unless they are meaningful | ||
- 🤖 All components must be standalone | ||
- 🤖 All components must use the "OnPush" change detection strategy, to support [zoneless change detection](https://angular.dev/guide/experimental/zoneless) | ||
- Use the [new syntax for control flow](https://angular.dev/guide/templates/control-flow) rather than structural directives | ||
- ie. prefer @if and @for over NgIf and NgFor | ||
- Do not abstract by default | ||
- ie. only pull out a component into a separate file when you are certain it will be re-used, or when you are trying to re-use it in a different component | ||
- Nest page-specific components & services within the page folder |