-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a preliminary STYLE_GUIDE.md (#977)
**Related Ticket:** [956](#956) ### Description of Changes Add a preliminary style guide for contributing to the VEDA UI. This is an WIP and an evolving document and will be updated as the VEDA UI project develops and converts to a UI library. ### Notes & Questions About Changes @hanbyul-here @sandrahoang686 I've added a sample `settings.json` file for recommended VS Code settings for the `veda-ui` repository (based on the linting rules we already use). This will help ensure consistency in code formatting among contributors, including ourselves. Additionally, devs could further customize this file with their own preferences. Please let me know if there is anything else we should add to it as a recommended setting. ### Validation / Testing _{Update with info on what can be manually validated in the Deploy Preview link for example "Validate style updates to selection modal do NOT affect cards"}_
- Loading branch information
Showing
3 changed files
with
67 additions
and
1 deletion.
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 |
---|---|---|
|
@@ -72,4 +72,6 @@ nbproject | |
temp | ||
tmp | ||
.tmp | ||
dist | ||
dist | ||
.vscode/* | ||
!.vscode/settings.json.sample |
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,14 @@ | ||
{ | ||
"editor.defaultFormatter": "dbaeumer.vscode-eslint", | ||
"editor.formatOnSave": true, | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll.eslint": "explicit" | ||
}, | ||
"eslint.validate": [ | ||
"javascript", | ||
"javascriptreact", | ||
"typescript", | ||
"typescriptreact" | ||
] | ||
} | ||
|
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,50 @@ | ||
# Style Guide | ||
|
||
This style guide is an evolving document and will be updated as the VEDA UI project develops. The following guidelines are designed to streamline the current development experience and ensure consistency among contributors. Please review and adhere to these guidelines when contributing to the project. | ||
|
||
## Code Reviews | ||
|
||
### Who Resolves PR Comments? | ||
|
||
- The PR maker resolves the conversation once the issue is resolved / fixed. The reviewer can start another conversation if the problem persists. | ||
|
||
## PR Branching | ||
|
||
### Naming for Branches | ||
|
||
- Use the related GitHub issue number; if not available, use `hotfix` or `update`. | ||
|
||
## Tagging in PRs | ||
|
||
### Tagging Developers | ||
|
||
- Tag all developers in PRs for now. | ||
- Ping people in Slack if more than one developer's eyes are needed. | ||
|
||
### When to Tag Designer | ||
|
||
- Tag Designer when visual/UI changes are introduced. | ||
- Tag project owner when UX/functionality changes are introduced. Confirm with relevant stakeholders if there are potential conflicts. | ||
|
||
### Changes to Open PRs | ||
|
||
- When another developer introduces changes to an already open PR, it can go directly to the same branch unless it is an experimental or critical change for which a separate branch might be better. | ||
|
||
## Code Conventions | ||
|
||
### Inline Code Notes | ||
|
||
- Special cases use `@TODO`, `@FIXME`, and `@NOTE` tags for annotations in the code. We also use the temporary `@VEDA2-REFACTOR-WORK` note for core features while working to build a UI library out of VEDA UI | ||
|
||
### Folder/File Naming Conventions | ||
|
||
- Follow the patterns currently used throughout the project | ||
|
||
### Recommended VS Code Settings | ||
|
||
To maintain consistent code formatting and linting across all contributors, follow these steps to configure your VS Code settings according to the project's guidelines: | ||
|
||
1. Navigate to the `.vscode` directory at the root of the project | ||
2. Copy the `settings.json.sample` file from the veda-ui repository | ||
3. Rename the copied file to `settings.json` | ||
4. Customize the `settings.json` file with your personal preferences as needed |