-
Notifications
You must be signed in to change notification settings - Fork 145
♻️ Refactor project layouts by introducing isolated layout groups #1514
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 ↗︎
1 Skipped Deployment
|
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
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!
import { getProjectRepository } from '../../../app/(app)/app/projects/[projectId]/ref/[branchOrCommit]/docs/[...docFilePath]/getProjectRepository' | ||
import { getProjectRepository } from '../../../app/(app)/app/(with-project-and-branch)/projects/[projectId]/ref/[branchOrCommit]/docs/[...docFilePath]/getProjectRepository' |
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.
Not directly related to this PR, but the dependency direction here is a bit unusual in this project?
Why is this change needed?
This PR addresses the issue mentioned in the comments of the previous PR.
ref. #1508 (comment)
This pull request refactors the layout handling for project-related routes by introducing isolated route groups using
(with-project)
and(with-project-and-branch)
directories.The goal is to decouple layout responsibilities per path depth and resolve issues caused by layout inheritance and central path parsing.
🐛 Context & Problem
Previously,
app/layout.tsx
was responsible for handling logic related toprojectId
andbranchOrCommit
paths.This involved parsing the path manually via
next/headers
, introducing unnecessary coupling and runtime dependency on headers.Moreover, using multiple
layout.tsx
files without isolation caused layout inheritance, which led to duplicated UI elements (e.g., multipleGlobalNav
orAppBar
components being rendered across nested layouts).✅ Solution
To address the above:
layout.tsx
files(xxx)
route groups to prevent unwanted layout inheritance and avoid UI duplicationWhat would you like reviewers to focus on?
Testing Verification
2025-04-25.17.19.41.mov
2025-04-25.20.17.43.mov
What was done
🤖 Generated by PR Agent at 55757c8
(with-project)
and(with-project-and-branch)
directories for layout isolation.Detailed Changes
56 files
Export SettingsHeader component for modular usage
Add centralized settings tab constants and schema
Add utility to fetch document content from repository
Add utility to fetch project repository info
Add utility to fetch documentation file paths
Remove obsolete project path extraction utility
Export ProjectHeader component for modular usage
Add centralized project tab constants and schema
Export ProjectLayout component for modular usage
Add and style SettingsHeader component CSS
Add and style DeleteConfirmationModal component CSS
Add and style DeleteOrganizationButtonClient component CSS
Add and style GeneralPage component CSS
Add and style organization settings layout CSS
Add and style DocsDetailPage component CSS
Add and style ProjectHeader component CSS
Add and style ProjectLayout component CSS
Implement invitation token detail page with validation
Refactor root layout to use CommonLayout directly
Implement new organization creation page
Implement organizations list page
Refactor root page to redirect based on user/org/project state
Implement new project creation page with installations
Implement projects list page with organization context
Implement placeholder billing settings page
Implement SettingsHeader tab navigation component
Implement DeleteConfirmationModal for organization deletion
Implement client-side delete organization button and modal
Implement server-side organization general settings page
Implement client-side general settings form and deletion logic
Implement general settings page with organization context
Implement tabbed organization settings layout with header
Implement organization members settings page
Implement placeholder projects settings page
Implement project branches list page
Implement isolated project layout for single-depth project routes
Redirect project root to default branch detail page
Implement placeholder project rule page
Implement project rule page with param validation
Implement placeholder project settings page
Implement project settings page with param validation
Implement documentation files list page for project/branch
Implement documentation detail page with content fetch
Implement documentation detail page route with param validation
Implement documentation list page route with param validation
Implement knowledge suggestion detail page route
Implement knowledge suggestions list page route
Implement isolated layout for project/branch routes
Implement migration detail page route with param validation
Implement migrations list page route with param validation
Implement branch detail page route with param validation
Implement schema file detail page route with param validation
Update AppBar props to accept optional project/branch params
Refactor CommonLayout to accept projectId/branchOrCommit as props
Implement ProjectHeader with tab navigation and suggestion badge
Refactor ProjectLayout for isolated usage and param-based navigation
2 files
Add tests for getProjectRepository utility
Add tests for getDocFilePaths utility
1 files
Update import path for getProjectRepository utility
1 files
Remove unused heading style from branch layout CSS
Additional Notes