fix(desktop): keep Create controls on empty Projects (#4009) - #4052
Open
iroiro147 wants to merge 1 commit into
Open
fix(desktop): keep Create controls on empty Projects (#4009)#4052iroiro147 wants to merge 1 commit into
iroiro147 wants to merge 1 commit into
Conversation
The Projects view returned its empty state before the PageHeader, toolbar, and ProjectsCreateMenu mounted, leaving no way to create the first project from an empty workspace. - Drop the projects.length === 0 early return; the main section now renders the empty state inside the page chrome so the Create menu stays mounted. - EmptyState gains an optional onCreateRepository CTA that opens the create-project dialog directly. - Covers both entry points (toolbar Create menu, empty-state button) with a Playwright smoke spec. Reimplements the approach from the closed PR block#3620, tracked in block#4009. Signed-off-by: iroiro147 <sarthak.singh@juspay.in>
|
+1 I'm hitting this exact issue on a fresh relay too. After enabling Projects, the empty Projects page only shows “No projects yet” and provides no + menu or other way to create the first repository from the Desktop UI. I've seen usage of Projects on X and would like to use it myself as well, looking forward to seeing this PR land :) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #4009.
When the Projects view had no visible projects it returned
<EmptyState />before thePageHeader, toolbar, andProjectsCreateMenumounted — so the Create menu was missing and there was no way to create the first project from the empty view.Approach
Reimplements the approach from the closed PR #3620 (which the issue body points to), adapted to current
main:projects.length === 0early return inProjectsView.tsx; the main content section now renders the empty state inside the page chrome, so the header, toolbar, and+Create menu stay mounted.EmptyStategains an optionalonCreateRepositorycallback that renders aCreate repositoryCTA button opening the create-project dialog.CreateProjectDialog.Test coverage
typecheck(tsc --noEmit) — cleanbiome checkon all touched files — cleantests/e2e/projects-empty-create.spec.tscovering the empty Projects view and both Create entry points — passes (1 passed)Notes
This is intentionally scoped to the empty-list Create-controls fix. The related "deleted + re-announced projects remain missing" behavior noted in the issue is a separate relay/query concern and is not changed here.