Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(contribution-guidelines): add best practices section for coding guidelines #112

Merged
merged 2 commits into from
Nov 7, 2024

Conversation

AshwinSri23
Copy link
Contributor

@AshwinSri23 AshwinSri23 commented Sep 17, 2024

🚩 Linked issue

The issue is 104. The issue can be found here..

🛠 How does this PR address the issue(s)? How does it solve the problem?

The following PR is for adding a best practices section to the coding guidelines page. Best practices would describe to new contributors conventions for different areas within cuHacking's development infrastructure.
These areas are:

  • Testing
  • Frontend
  • Backend
  • API Design
  • Docs
  • Features

✅ Checklist

Make sure your PR follows the according checklist:

Code Quality

Done Checklist Item
Code is clean and readable (functions used appropriately)
Code is commented appropriately (no unnecessary comments, follows guidelines)
Code is DRY (no repeated code)
Functions are named appropriately (camelCase)
Variables are named appropriately (camelCase)
Files are named appropriately (kebab-case)
Code performs as expected (no errors or issues when running)
Code is committed and branched accordingly

PR Review Readiness

Done Checklist Item
PR is linked to an issue (if applicable)
PR is clear and comprehensible
PR is ready for review (if not, consider using a draft PR)
PR title follows template guidelines
PR description follows template guidelines

Summary by CodeRabbit

  • New Features

    • Introduced a comprehensive section on best practices for end-to-end (E2E) testing in the coding guidelines.
    • Detailed organization of E2E tests for different devices (desktop, mobile, tablet).
    • Provided instructions for running tests and managing configurations.
    • Expanded guidelines on backend practices, including commit descriptions and issue resolution.
  • Documentation

    • Added a new "Best Practices" section with subsections on testing, backend, features, and API best practices.

Copy link

netlify bot commented Sep 17, 2024

Deploy Preview for cuhacking-portal-dev failed. Why did it fail? →

Name Link
🔨 Latest commit 07da48d
🔍 Latest deploy log https://app.netlify.com/sites/cuhacking-portal-dev/deploys/66e8ca2b8875c400081f9253

Copy link

coderabbitai bot commented Sep 17, 2024

Warning

Rate limit exceeded

@MFarabi619 has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 11 minutes and 38 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 711b536 and 1b3dcb7.

📝 Walkthrough
📝 Walkthrough
📝 Walkthrough

Walkthrough

The changes introduce a comprehensive "Best Practices" section to the coding-guidelines.mdx file, enhancing documentation related to coding practices. This section includes detailed subsections on "Testing," "Backend," "Features," and "API," providing guidelines for each area. The "Testing" subsection outlines practices for end-to-end (E2E) testing, while the "Backend" subsection emphasizes descriptive commits and requirement definitions.

Changes

File Path Change Summary
apps/docs/src/content/docs/contribution-guidelines/coding-guidelines.mdx Added a comprehensive "Best Practices" section with subsections on "Testing," "Backend," "Features," and "API."

Possibly related issues

Possibly related PRs

Suggested labels

documentation, frontend

Poem

🐰 In the code where bunnies hop,
Best practices help us never stop.
With tests that run on every screen,
Our coding dreams are bright and green.
So let’s structure, name, and play,
Together we’ll code the bunny way! 🌼


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@AshwinSri23 AshwinSri23 linked an issue Sep 17, 2024 that may be closed by this pull request
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Outside diff range and nitpick comments (3)
apps/docs/src/content/docs/contribution-guidelines/coding-guidelines.mdx (3)

99-99: Remove redundant phrase.

As suggested by the static analysis tool, use "inside" instead of "inside of" to avoid redundancy and improve clarity.

Apply this diff to fix the issue:

-All E2E tests located inside of a directory(Organized based on what overall page/tool the tests are using)
+All E2E tests are located inside a directory (organized based on the overall page/tool the tests are using).
Tools
LanguageTool

[style] ~99-~99: This phrase is redundant. Consider using “inside”.
Context: ...test organization All E2E tests located inside of a directory(Organized based on what ove...

(OUTSIDE_OF)


100-100: Remove redundant phrase.

As suggested by the static analysis tool, use "inside" instead of "inside of" to avoid redundancy and improve clarity.

Apply this diff to fix the issue:

-- For example, all E2E tests relating to the cuhacking portal are stored inside of the portal--e2e directory. 
+- For example, all E2E tests related to the cuhacking portal are stored inside the `portal-e2e` directory.
Tools
LanguageTool

[style] ~100-~100: This phrase is redundant. Consider using “inside”.
Context: ...ting to the cuhacking portal are stored inside of the portal--e2e directory. - All rela...

(OUTSIDE_OF)


140-140: Rephrase the sentence for clarity.

As suggested by the static analysis tool, consider rephrasing the sentence to strengthen the wording and improve clarity.

Apply this diff to rephrase the sentence:

-- Report is produced regardless of whether you push code that makes changes to these E2E tests. 
+- The report is generated even if the pushed code does not modify the E2E tests.
Tools
LanguageTool

[style] ~140-~140: Consider shortening or rephrasing this to strengthen your wording.
Context: ...egardless of whether you push code that makes changes to these E2E tests. When running differe...

(MAKE_CHANGES)

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 54c12dd and 07da48d.

Files selected for processing (1)
  • apps/docs/src/content/docs/contribution-guidelines/coding-guidelines.mdx (1 hunks)
Additional context used
LanguageTool
apps/docs/src/content/docs/contribution-guidelines/coding-guidelines.mdx

[grammar] ~89-~89: Did you mean the adjective “End-to-end” (spelled with hyphens)?
Context: ...Testing* #### E2E Test catagorization End to end Testing broken down into 2 different pa...

(END_TO_END_HYPHEN)


[style] ~99-~99: This phrase is redundant. Consider using “inside”.
Context: ...test organization All E2E tests located inside of a directory(Organized based on what ove...

(OUTSIDE_OF)


[style] ~100-~100: This phrase is redundant. Consider using “inside”.
Context: ...ting to the cuhacking portal are stored inside of the portal--e2e directory. - All rela...

(OUTSIDE_OF)


[style] ~140-~140: Consider shortening or rephrasing this to strengthen your wording.
Context: ...egardless of whether you push code that makes changes to these E2E tests. When running differe...

(MAKE_CHANGES)

Additional comments not posted (6)
apps/docs/src/content/docs/contribution-guidelines/coding-guidelines.mdx (6)

88-88: Great addition!

The "Best Practices" section is a valuable addition to the coding guidelines documentation. It will provide clear guidance to contributors and help maintain consistency across the codebase.


105-105: Informative note about the playwright.config file.

The information about using a playwright.config file for managing tests across different environments is helpful for contributors. It provides clarity on how to handle tests for various environments.


109-109: Appropriate subsection title.

The "Creating E2E tests" subsection title is clear and relevant to the content that follows. It provides a logical structure to the best practices section.


123-123: Clear naming convention guideline.

The "Naming conventions" subsection title is appropriate, and the guideline for constants (all caps with words separated by underscores) is a common and widely accepted practice. It helps maintain consistency in the codebase.


126-126: Helpful subsection on running tests.

The "Running tests" subsection title is appropriate, and providing information about the commands to run tests is helpful for contributors. It facilitates the testing process and ensures consistency.


137-137: Informative subsection on viewing tests.

The "Viewing tests" subsection title is appropriate, and mentioning that all tests can be viewed on the GitHub workflow is helpful for contributors. It provides clarity on where to find test results and reports.


## Best Practices
### **Testing**
#### E2E Test catagorization
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix typo and use hyphenated form.

  • Please fix the typo in the subsection title. It should be "categorization" instead of "catagorization".
  • As suggested by the static analysis tool, use the hyphenated form "End-to-end" instead of "End to end" for consistency and clarity.

Apply this diff to fix the issues:

-#### E2E Test catagorization
-End to end Testing broken down into 2 different parts
+#### End-to-End Test Categorization
+End-to-end testing is broken down into 2 different parts:
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
#### E2E Test catagorization
#### End-to-End Test Categorization
End-to-end testing is broken down into 2 different parts:
Tools
LanguageTool

[grammar] ~89-~89: Did you mean the adjective “End-to-end” (spelled with hyphens)?
Context: ...Testing* #### E2E Test catagorization End to end Testing broken down into 2 different pa...

(END_TO_END_HYPHEN)

Copy link

netlify bot commented Oct 12, 2024

Deploy Preview for website-cuhacking ready!

Name Link
🔨 Latest commit 711b536
🔍 Latest deploy log https://app.netlify.com/sites/website-cuhacking/deploys/670d3c4f80643100080a5e1c
😎 Deploy Preview https://deploy-preview-112--website-cuhacking.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Outside diff range and nitpick comments (2)
apps/docs/src/content/docs/contribution-guidelines/coding-guidelines.mdx (2)

144-155: LGTM: Backend guidelines provide valuable advice.

The Backend subsection offers useful guidance on commit descriptions, defining requirements, and cautions about modifying tsconfig files. This aligns well with good development practices.

Consider providing more specific examples or consequences of frequent tsconfig modifications to help developers understand the potential impact better. For example:

 Be cautious when modifying tsconfig files.
-Frequent modifications to tsconfig files can lead to a snowball effect when adding features
-  or modifying existing features. 
+Frequent modifications to tsconfig files can lead to unintended consequences:
+  - Compilation errors in seemingly unrelated parts of the codebase
+  - Inconsistent behavior between local development and CI/CD environments
+  - Difficulties in maintaining consistent code quality across the project

158-163: Consider improving or removing TBD sections.

The "Features" and "API" subsections are currently marked as TBD (To Be Determined). While it's good to have placeholders for these important topics, they don't provide value to contributors in their current state.

Consider one of the following approaches:

  1. Remove these sections until content is available.
  2. Provide a brief explanation of what these sections will cover in the future and when contributors can expect the content to be added.

For example:

### Features
This section will cover best practices for feature development, including:
- Feature flagging
- A/B testing
- Performance considerations
(Coming soon)

### API
This section will provide guidelines for API design and development, including:
- RESTful principles
- Authentication and authorization
- Versioning
(Coming soon)

This gives contributors an idea of what to expect and shows that these topics are planned for future updates.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 07da48d and d5854d3.

📒 Files selected for processing (1)
  • apps/docs/src/content/docs/contribution-guidelines/coding-guidelines.mdx (1 hunks)
🧰 Additional context used
🪛 LanguageTool
apps/docs/src/content/docs/contribution-guidelines/coding-guidelines.mdx

[grammar] ~89-~89: Did you mean the adjective “End-to-end” (spelled with hyphens)?
Context: ...Testing* #### E2E Test catagorization End to end Testing broken down into 2 different pa...

(END_TO_END_HYPHEN)


[style] ~99-~99: This phrase is redundant. Consider using “inside”.
Context: ...test organization All E2E tests located inside of a directory(Organized based on what ove...

(OUTSIDE_OF)


[style] ~100-~100: This phrase is redundant. Consider using “inside”.
Context: ...ting to the cuhacking portal are stored inside of the portal--e2e directory. - All rela...

(OUTSIDE_OF)


[uncategorized] ~140-~140: Possible missing article found.
Context: ... PR - Can get the report from here. - Report is produced regardless of whether you p...

(AI_HYDRA_LEO_MISSING_THE)


[style] ~140-~140: Consider shortening or rephrasing this to strengthen your wording.
Context: ...egardless of whether you push code that makes changes to these E2E tests. When running differe...

(MAKE_CHANGES)

🔇 Additional comments (2)
apps/docs/src/content/docs/contribution-guidelines/coding-guidelines.mdx (2)

87-87: LGTM: New "Best Practices" section added.

The addition of a "Best Practices" section aligns well with the PR objectives to enhance the coding guidelines documentation. This will provide valuable guidance for contributors.


87-173: Overall assessment: Significant improvements to coding guidelines

The additions to the coding guidelines document are a substantial step forward in providing clear and comprehensive guidance for contributors. The new "Best Practices" section, particularly the detailed "Testing" subsection, offers valuable insights that will help maintain code quality and consistency across the project.

Key points:

  1. The "Testing" subsection provides thorough guidance on E2E testing practices.
  2. The "Backend" subsection offers useful advice on commit descriptions and requirement definitions.
  3. Placeholder sections for "Features," "API," and "Design" indicate areas for future expansion.

While there are some minor issues to address (typos, formatting, and empty sections), the overall direction and content of these changes are positive and align well with the PR objectives.

To further improve this PR:

  1. Address the formatting and typo issues in the "Testing" subsection.
  2. Consider expanding or removing the TBD and empty sections as suggested in previous comments.
  3. Review the document for any additional opportunities to enhance clarity or provide examples where appropriate.

Great work on expanding these guidelines! These changes will significantly benefit contributors to the project.

🧰 Tools
🪛 LanguageTool

[grammar] ~89-~89: Did you mean the adjective “End-to-end” (spelled with hyphens)?
Context: ...Testing* #### E2E Test catagorization End to end Testing broken down into 2 different pa...

(END_TO_END_HYPHEN)


[style] ~99-~99: This phrase is redundant. Consider using “inside”.
Context: ...test organization All E2E tests located inside of a directory(Organized based on what ove...

(OUTSIDE_OF)


[style] ~100-~100: This phrase is redundant. Consider using “inside”.
Context: ...ting to the cuhacking portal are stored inside of the portal--e2e directory. - All rela...

(OUTSIDE_OF)


[uncategorized] ~140-~140: Possible missing article found.
Context: ... PR - Can get the report from here. - Report is produced regardless of whether you p...

(AI_HYDRA_LEO_MISSING_THE)


[style] ~140-~140: Consider shortening or rephrasing this to strengthen your wording.
Context: ...egardless of whether you push code that makes changes to these E2E tests. When running differe...

(MAKE_CHANGES)

Comment on lines +88 to +143
### **Testing**
#### E2E Test catagorization
End to end Testing broken down into 2 different parts
- Desktop
- Mobile
- Tablet
These above tests are broken down into further subsections:
- Mobile and tablet
- Desktop tabet
- Desktop
#### E2E test organization
All E2E tests located inside of a directory(Organized based on what overall page/tool the tests are using)
- For example, all E2E tests relating to the cuhacking portal are stored inside of the portal--e2e directory.
- All related tests are stored in a .ts file.
- For example, all tests related to the docs pages are stored inside one .ts file
- There may be other files that contain helper functions for these tests.
- These helper functions are stored in a dedicated
For tests involving different environments, a playwright.config file is used.

Once you think that all the tests are good to go, you can run the code using playwright or in visual studio code.

#### Creating E2E tests
Using code gen to generate the difference events that happen in the docs.

General structure of the tests:

``
test('name", async ((.docsLayoutPage))) => ({
events_from_codegen
})
``

pom.ts is used to create specific variables to represent different elements in the page.

#### Naming conventions
Constants are all caps with words being separated by underscores.

#### Running tests
2 commands to run tests:
For running the tests through cmd line->1. `pnpm nx run docs-e2e:e2e --verbose`

For running this command to run codegen event generator->npx playwright codegen http:localhost:3000/docs

For different tests, indicate DESKTOP, MOBILE, TABLET depending on the environment

If you run a bunch of tests at the same time, they might time out
It is advised to run each test individually

#### Viewing tests
All tests can be viewed on the github workflow.
- Can access them in the PR
- Can get the report from here.
- Report is produced regardless of whether you push code that makes changes to these E2E tests.

When running different tests, make sure you select the right environments for each of these tests.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Improve formatting and fix typo in the Testing subsection.

The Testing subsection provides valuable guidance on E2E testing practices. However, there are a few areas that could be improved:

  1. Fix the typo in "catagorization" (should be "categorization") at line 89.
  2. Use the hyphenated form "End-to-end" instead of "End to end" for consistency.
  3. Improve formatting for better readability, especially in code blocks and lists.

Here are some suggested changes:

-#### E2E Test catagorization
-End to end Testing broken down into 2 different parts
+#### E2E Test Categorization
+End-to-end testing is broken down into 2 different parts:

For code blocks, use triple backticks (```) with the language specified for syntax highlighting. For example:

-``
-test('name", async ((.docsLayoutPage))) => ({
-	events_from_codegen
-})
-``
+```typescript
+test('name', async ({ docsLayoutPage }) => {
+  // events_from_codegen
+});
+```

Consider using more consistent formatting for lists and indentation throughout the section to improve readability.

<details>
<summary>🧰 Tools</summary>

<details>
<summary>🪛 LanguageTool</summary><blockquote>

[grammar] ~89-~89: Did you mean the adjective “End-to-end” (spelled with hyphens)?
Context: ...*Testing** #### E2E Test catagorization End to end Testing broken down into 2 different pa...

(END_TO_END_HYPHEN)

---

[style] ~99-~99: This phrase is redundant. Consider using “inside”.
Context: ...test organization All E2E tests located inside of a directory(Organized based on what ove...

(OUTSIDE_OF)

---

[style] ~100-~100: This phrase is redundant. Consider using “inside”.
Context: ...ting to the cuhacking portal are stored inside of the portal--e2e directory.   - All rela...

(OUTSIDE_OF)

---

[uncategorized] ~140-~140: Possible missing article found.
Context: ... PR 	- Can get the report from here. 	- Report is produced regardless of whether you p...

(AI_HYDRA_LEO_MISSING_THE)

---

[style] ~140-~140: Consider shortening or rephrasing this to strengthen your wording.
Context: ...egardless of whether you push code that makes changes to these E2E tests.   When running differe...

(MAKE_CHANGES)

</blockquote></details>

</details>

<!-- This is an auto-generated comment by CodeRabbit -->

Comment on lines +165 to +173
### **Design**








Copy link

@coderabbitai coderabbitai bot Oct 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Address the empty "Design" subsection.

The "Design" subsection is currently empty. This doesn't provide any value to contributors and may cause confusion.

Consider one of the following actions:

  1. If the section is not needed at this time, remove it entirely.
  2. If it's intended for future content, add a brief description of what will be covered, similar to the suggestion for the "Features" and "API" sections.
  3. If it's ready to be populated, add some initial content or guidelines related to design practices in the project.

For example, if keeping the section for future content:

### Design
This section will cover best practices for design in our project, including:
- UI/UX principles
- Accessibility guidelines
- Design system usage
(Coming soon)

This approach provides context for the section's future content while making it clear that it's a work in progress.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👀

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@HasithDeAlwis, understood. Let me know if you need any further assistance.

@HasithDeAlwis HasithDeAlwis force-pushed the ashwin/docs/104-add-best-practices-as-a-subsection branch from d5854d3 to 711b536 Compare October 14, 2024 15:44
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Outside diff range and nitpick comments (2)
apps/docs/src/content/docs/contribution-guidelines/coding-guidelines.mdx (2)

144-156: Enhance clarity and consistency in the Backend subsection.

The Backend subsection provides valuable guidance. Consider the following suggestions to improve clarity and consistency:

  1. Rephrase the opening sentence for clarity:
-When working on an issue, making commits with description when necessary. 
+When working on an issue, make descriptive commits as necessary.
  1. Use consistent formatting for bullet points:
 - For example, when generating a library(ex: a database library) that will be used,
-  indicate the command used to generate that library in the commit description. 
+  indicate the command used to generate that library in the commit description.
 - Additionally, when working on an issue, begin with defining the requirements to a given issue 
-  before attempting to resolve it. 
+  before attempting to resolve it.
  1. Improve the clarity of the caution about tsconfig files:
 Be cautious when modifying tsconfig files.
-- Frequent modifications to tsconfig files can lead to a snowball effect when adding features
-  or modifying existing features. 
+- Frequent modifications to tsconfig files can lead to a snowball effect when adding or
+  modifying features, potentially causing unexpected issues throughout the project.

158-160: Enhance the Features subsection with a brief description.

While it's understandable that the content for this section is still to be determined, providing a brief description or outline of what will be covered can be helpful for contributors. Consider adding a short explanation of what kind of information will be included in this section in the future.

For example:

### **Features**
This section will cover best practices for feature development, including:
- Feature request process
- Implementation guidelines
- Feature testing and validation
- Documentation requirements
(Content to be added soon)

This approach gives context for the section's future content while making it clear that it's a work in progress.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between d5854d3 and 711b536.

📒 Files selected for processing (1)
  • apps/docs/src/content/docs/contribution-guidelines/coding-guidelines.mdx (1 hunks)
🧰 Additional context used
🪛 LanguageTool
apps/docs/src/content/docs/contribution-guidelines/coding-guidelines.mdx

[grammar] ~89-~89: Did you mean the adjective “End-to-end” (spelled with hyphens)?
Context: ...Testing* #### E2E Test catagorization End to end Testing broken down into 2 different pa...

(END_TO_END_HYPHEN)


[style] ~99-~99: This phrase is redundant. Consider using “inside”.
Context: ...test organization All E2E tests located inside of a directory(Organized based on what ove...

(OUTSIDE_OF)


[style] ~100-~100: This phrase is redundant. Consider using “inside”.
Context: ...ting to the cuhacking portal are stored inside of the portal--e2e directory. - All rela...

(OUTSIDE_OF)


[uncategorized] ~140-~140: Possible missing article found.
Context: ... PR - Can get the report from here. - Report is produced regardless of whether you p...

(AI_HYDRA_LEO_MISSING_THE)


[style] ~140-~140: Consider shortening or rephrasing this to strengthen your wording.
Context: ...egardless of whether you push code that makes changes to these E2E tests. When running differe...

(MAKE_CHANGES)

🔇 Additional comments (2)
apps/docs/src/content/docs/contribution-guidelines/coding-guidelines.mdx (2)

162-173: Improve the API and Design subsections.

  1. For the API subsection:
    Similar to the suggestion for the Features section, consider adding a brief description of what will be covered in the API section. For example:
### **API**
This section will cover best practices for API development, including:
- API design principles
- Documentation standards
- Versioning guidelines
- Security considerations
(Content to be added soon)
  1. For the Design subsection:
    The Design subsection is currently empty. Consider one of the following actions:

a. If the section is not needed at this time, remove it entirely.
b. If it's intended for future content, add a brief description of what will be covered, similar to the suggestion for the API section.
c. If it's ready to be populated, add some initial content or guidelines related to design practices in the project.

For example, if keeping the section for future content:

### **Design**
This section will cover best practices for design in our project, including:
- UI/UX principles
- Accessibility guidelines
- Design system usage
(Content to be added soon)

88-143: ⚠️ Potential issue

Improve formatting and fix remaining issues in the Testing subsection.

Thank you for adding this comprehensive Testing subsection. There are a few remaining issues that need to be addressed:

  1. Use consistent formatting for lists and subheadings throughout the section.
  2. Fix typos and grammatical errors.
  3. Improve code block formatting.

Here are some suggested changes:

  1. For the E2E Test categorization:
-#### E2E Test catagorization
-End to end Testing broken down into 2 different parts
+#### E2E Test Categorization
+End-to-end testing is broken down into 3 different parts:
 	- Desktop
 	- Mobile
 	- Tablet
-These above tests are broken down into further subsections: 
+These tests are further categorized into:
 	- Mobile and tablet 
-	- Desktop tabet
+	- Desktop tablet
 	- Desktop
  1. For the code block:
-``
-test('name", async ((.docsLayoutPage))) => ({
-	events_from_codegen
-})
-``
+```typescript
+test('name', async ({ docsLayoutPage }) => {
+  // events_from_codegen
+});
+```

3. Use consistent formatting for command examples:
```diff
-For running the tests through cmd line->1. `pnpm nx run docs-e2e:e2e --verbose`
+For running the tests through command line:
+1. `pnpm nx run docs-e2e:e2e --verbose`
    
-For running this command to run codegen event generator->npx playwright codegen http:localhost:3000/docs
+2. To run the codegen event generator:
+   `npx playwright codegen http://localhost:3000/docs`
  1. Improve clarity and grammar:
-When running different tests, make sure you select the right environments for each of these tests. 
+When running different tests, make sure to select the appropriate environment for each test.
🧰 Tools
🪛 LanguageTool

[grammar] ~89-~89: Did you mean the adjective “End-to-end” (spelled with hyphens)?
Context: ...Testing* #### E2E Test catagorization End to end Testing broken down into 2 different pa...

(END_TO_END_HYPHEN)


[style] ~99-~99: This phrase is redundant. Consider using “inside”.
Context: ...test organization All E2E tests located inside of a directory(Organized based on what ove...

(OUTSIDE_OF)


[style] ~100-~100: This phrase is redundant. Consider using “inside”.
Context: ...ting to the cuhacking portal are stored inside of the portal--e2e directory. - All rela...

(OUTSIDE_OF)


[uncategorized] ~140-~140: Possible missing article found.
Context: ... PR - Can get the report from here. - Report is produced regardless of whether you p...

(AI_HYDRA_LEO_MISSING_THE)


[style] ~140-~140: Consider shortening or rephrasing this to strengthen your wording.
Context: ...egardless of whether you push code that makes changes to these E2E tests. When running differe...

(MAKE_CHANGES)

@AshwinSri23 AshwinSri23 marked this pull request as ready for review October 14, 2024 20:38
Copy link
Collaborator

@HasithDeAlwis HasithDeAlwis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work on your first PR! Just gotta get it to the finish line now and make a couple changes, good work 👍

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Content is ok, but these should be their own directories/pages. Can you refer to how Farabi did his, here

Comment on lines +165 to +173
### **Design**








Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👀

Copy link
Contributor

@JeremyFriesenGitHub JeremyFriesenGitHub left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see discord private message abt design (help to get u to know design for the design section)

@JeremyFriesenGitHub JeremyFriesenGitHub added good first issue Good for newcomers frontend Frontend related labels Oct 17, 2024
@MFarabi619
Copy link
Member

Closing as stale

@MFarabi619 MFarabi619 closed this Oct 18, 2024
@MFarabi619 MFarabi619 reopened this Oct 31, 2024
@MFarabi619 MFarabi619 force-pushed the ashwin/docs/104-add-best-practices-as-a-subsection branch from 711b536 to 1b3dcb7 Compare November 7, 2024 02:37
@MFarabi619 MFarabi619 merged commit 98d24a9 into main Nov 7, 2024
4 of 5 checks passed
Copy link

netlify bot commented Nov 7, 2024

Deploy Preview for docs-cuhacking ready!

Name Link
🔨 Latest commit 1b3dcb7
🔍 Latest deploy log https://app.netlify.com/sites/docs-cuhacking/deploys/672c27fb59d3f800088e9d21
😎 Deploy Preview https://deploy-preview-112--docs-cuhacking.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
frontend Frontend related good first issue Good for newcomers
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

docs(contribution-guidelines): add best practices as a subsection
4 participants