-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
[WEB-2432]fix: project not found state and error page alignment #6095
Conversation
WalkthroughThe pull request introduces several modifications across multiple files. Key changes include an enhancement of the Changes
Possibly related PRs
Suggested labels
Suggested reviewers
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
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? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 2
🧹 Outside diff range and nitpick comments (2)
web/app/error.tsx (1)
42-42
: LGTM! Consider adding role="alert" for accessibility.The layout changes effectively address the alignment issues mentioned in the PR objectives. The use of flexbox for centering content is a solid approach.
Consider adding
role="alert"
to improve accessibility:- <div className="space-y-2 relative flex flex-col justify-center items-center"> + <div className="space-y-2 relative flex flex-col justify-center items-center" role="alert">web/core/layouts/auth-layout/project-wrapper.tsx (1)
Line range hint
1-179
: Well-structured component with robust error handling.The ProjectAuthWrapper component demonstrates good architectural patterns:
- Clear separation of concerns with distinct handling of loading, unauthorized, and not found states
- Efficient data fetching with SWR
- Proper permission checks before rendering content
Consider adding error boundaries to handle potential failures in the data fetching layer for additional resilience.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (3)
web/app/error.tsx
(1 hunks)web/core/constants/empty-state.ts
(2 hunks)web/core/layouts/auth-layout/project-wrapper.tsx
(2 hunks)
🔇 Additional comments (2)
web/core/layouts/auth-layout/project-wrapper.tsx (1)
10-14
: LGTM! Import changes are well-organized.
The imports are properly structured and the new EmptyState and EmptyStateType imports align with the PR objectives.
web/core/constants/empty-state.ts (1)
212-227
: LGTM! Empty state configuration is well structured
The configuration for the new empty state follows the established pattern and includes all necessary properties:
- Appropriate title and description
- Correct access control settings
- Well-defined primary button with comic box content
type={EmptyStateType.WORKSPACE_PROJECT_NOT_FOUND} | ||
layout="screen-detailed" | ||
primaryButtonOnClick={() => { | ||
setTrackElement("Projects page empty state"); | ||
toggleCreateProjectModal(true) |
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.
💡 Codebase verification
Fix typo in EmptyStateType.WORKSPACE_PROJECT_NOT_FOUND enum value
The enum value is indeed misspelled as "workspave-project-no-found" instead of "workspace-project-not-found". This needs to be corrected for consistency.
- In
web/core/constants/empty-state.ts
:- Change
"workspave-project-no-found"
to"workspace-project-not-found"
- Change
🔗 Analysis chain
EmptyState implementation looks good, but verify enum spelling.
The EmptyState component implementation aligns well with the PR objectives to fix the project not found state. The layout and click handler are properly configured.
Let's verify the enum value spelling mentioned in the AI summary:
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check the enum value spelling in empty-state.ts
rg -A 1 "WORKSPACE_PROJECT_NOT_FOUND" web/core/constants/empty-state.ts
Length of output: 343
Problem Statement
Summary
Reference
WEB-2432
Summary by CodeRabbit
New Features
EmptyState
component to streamline its configuration and improve user experience.Bug Fixes
Refactor
EmptyState
component.