-
Notifications
You must be signed in to change notification settings - Fork 619
[Dashboard] Docs: Adds basic code organization instructions #5255
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
Conversation
|
Your org has enabled the Graphite merge queue for merging into mainAdd the label “merge-queue” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. Or use the label “hotfix” to add to the merge queue as a hot fix. You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link. |
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5255 +/- ##
=======================================
Coverage 45.36% 45.36%
=======================================
Files 1067 1067
Lines 55433 55433
Branches 3991 3991
=======================================
Hits 25148 25148
Misses 29594 29594
Partials 691 691
*This pull request uses carry forward flags. Click here to find out more. |
size-limit report 📦
|
Merge activity
|
<!-- start pr-codex -->
## PR-Codex overview
This PR updates the `README.md` file for the `dashboard` application to include guidelines on code structure and style, particularly focusing on component organization and data fetching practices.
### Detailed summary
- Added a section on code structure and style guide.
- Specified that components should be placed in a `components` folder next to their respective app pages.
- Clarified where to place reused components and low-level components.
- Recommended using RSC for data fetching.
- Suggested keeping data fetching functions in the same file as their components unless reused across multiple components.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
d0dddc3 to
13fc6f5
Compare
| ### Data fetching | ||
| - Use RSC wherever possible. | ||
| - Write data fetching code in its own function in the same file as the component it is used in, not exported. | ||
| - If the same data fetching function is used in multiple components, place it in a file in an `api` folder at the lowest level possible (just like components). If you need to do this you probable aren't organizing your components properly. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a small typo in this line: probable should be probably in "If you need to do this you probable aren't organizing your components properly."
Spotted by Graphite Reviewer
Is this helpful? React 👍 or 👎 to let us know.
PR-Codex overview
This PR updates the
README.mdfile for thedashboardapplication, adding guidelines on code structure and style, specifically for components and data fetching practices.Detailed summary
Code Structure and Style Guide.componentsfolder next to their respective app page.