-
Notifications
You must be signed in to change notification settings - Fork 190
✨ Implement DocsDetailPage component and related functionality #1016
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
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
4 Skipped Deployments
|
|
- Created `DocsDetailPage` component to display document content based on project ID, branch or commit, and file path. - Added CSS module for styling the document detail page. - Implemented `getProjectRepository` function to fetch repository information and integrated it with the document fetching logic. - Added tests for `getProjectRepository` to ensure correct functionality and data structure. - Established a new page component to handle routing and parameter validation for document details.
f2b8765 to
1c85bb9
Compare
PR Reviewer Guide 🔍(Review updated until commit 1c85bb9)Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Latest suggestions up to 1c85bb9
Previous suggestionsSuggestions up to commit 1c85bb9
|
||||||||||||||||||||||||||||||
|
Updates to Preview Branch (show-github-doc-file-path) ↗︎
Tasks are run on every commit but only new migration files are pushed.
View logs for this Workflow Run ↗︎. |
- Updated the `getDocumentContent` function to return the content of the fetched file data instead of the entire file data object. - Improved variable naming for clarity by changing `content` to `fileData`.
|
|
||
| // Fail the test if project or repository doesn't exist | ||
| expect(project).not.toBeNull() | ||
| expect(repository).not.toBeNull() |
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.
nits
It looks like running the test command ($ pnpm --filter @liam-hq/app test) requires resetting the database beforehand ($ pnpm --filter @liam-hq/db supabase:reset).
This is because the second run will fail due to a unique constraint violation when inserting into the Repository table.
But this is ok for CI. 👍
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.
@hoshinotsuyoshi You're right, the second run will fail. I'd like to do something about it!
hoshinotsuyoshi
left a comment
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.
LGTM!

Issue
Why is this change needed?
DocsDetailPagecomponent to display document content based on project ID, branch or commit, and file path.getProjectRepositoryfunction to fetch repository information and integrated it with the document fetching logic.getProjectRepositoryto ensure correct functionality and data structure.What would you like reviewers to focus on?
Testing Verification
What was done
🤖 Generated by PR Agent at 1c85bb9
DocsDetailPagecomponent for displaying document content.getDocumentContentandgetProjectRepositoryfunctions.getProjectRepositoryto ensure functionality.Detailed Changes
getDocumentContent.ts
Add `getDocumentContent` function for document fetchingfrontend/apps/app/app/(app)/app/projects/[projectId]/ref/[branchOrCommit]/docs/[...docFilePath]/getDocumentContent.ts
getDocumentContentfunction to fetch document content.getProjectRepository.ts
Implement `getProjectRepository` for repository detailsfrontend/apps/app/app/(app)/app/projects/[projectId]/ref/[branchOrCommit]/docs/[...docFilePath]/getProjectRepository.ts
getProjectRepositoryto fetch repository details.DocsDetailPage.module.css
Add CSS module for `DocsDetailPage` stylingfrontend/apps/app/app/(app)/app/projects/[projectId]/ref/[branchOrCommit]/docs/[...docFilePath]/DocsDetailPage.module.css
DocsDetailPage.tsx
Create `DocsDetailPage` component for document renderingfrontend/apps/app/app/(app)/app/projects/[projectId]/ref/[branchOrCommit]/docs/[...docFilePath]/DocsDetailPage.tsx
DocsDetailPagecomponent for rendering document content.getDocumentContentfor fetching content.page.tsx
Add page component for document routingfrontend/apps/app/app/(app)/app/projects/[projectId]/ref/[branchOrCommit]/docs/[...docFilePath]/page.tsx
DocsDetailPagefor document display.valibotfor schema validation of parameters.getProjectRepository.test.ts
Add tests for `getProjectRepository` functionfrontend/apps/app/app/(app)/app/projects/[projectId]/ref/[branchOrCommit]/docs/[...docFilePath]/getProjectRepository.test.ts
getProjectRepositoryfunction.Additional Notes