-
Notifications
You must be signed in to change notification settings - Fork 962
fix(desktop): collapse v2 sidebar count + actions into one slot #3842
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
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
1239735
fix(desktop): collapse v2 sidebar count + actions into one slot
Kitenite 9990de3
fix(desktop): indent v2 sidebar group header to match workspace rows
Kitenite 7851a1a
fix(desktop): ensure v2 sidebar group count is visible at rest
Kitenite cbe0537
fix(desktop): nudge group header indent below workspace level
Kitenite 764e47a
fix(desktop): align v2 sidebar group header with project row spacing
Kitenite 1a1ca41
fix(desktop): align v2 sidebar group header indent with workspace rows
Kitenite 2b02355
fix(desktop): indent grouped workspaces deeper than ungrouped ones
Kitenite 3373194
fix(desktop): address bot review on v2 sidebar count/action slot
Kitenite b4fa4df
fix(desktop): swap count/action via display instead of stacked opacity
Kitenite 8ac6408
fix(desktop): swap thumbnail/chevron via display for project row cons…
Kitenite abc7700
fix(desktop): keep v2 sidebar count visible when row is self-focused
Kitenite File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -58,13 +58,13 @@ export const DashboardSidebarSectionHeader = forwardRef< | |||||
| } | ||||||
| } | ||||||
| className={cn( | ||||||
| "group flex min-h-8 w-full items-center pl-0.5 pr-2 py-1.5 text-[13px] font-medium", | ||||||
| "group flex min-h-8 w-full items-center pl-5 pr-2 py-1.5 text-[13px] font-medium", | ||||||
| "text-muted-foreground hover:bg-muted/50 transition-colors", | ||||||
| className, | ||||||
| )} | ||||||
| {...props} | ||||||
| > | ||||||
| <div className="grid h-5 w-5 shrink-0 cursor-grab items-center justify-center active:cursor-grabbing [&>*]:col-start-1 [&>*]:row-start-1"> | ||||||
| <div className="mr-2 grid h-5 w-5 shrink-0 cursor-grab items-center justify-center active:cursor-grabbing [&>*]:col-start-1 [&>*]:row-start-1"> | ||||||
| <HiChevronRight | ||||||
| className={cn( | ||||||
| "size-3 text-muted-foreground transition-[opacity,transform] duration-150 group-hover:opacity-0", | ||||||
|
|
@@ -86,24 +86,31 @@ export const DashboardSidebarSectionHeader = forwardRef< | |||||
| ) : ( | ||||||
| <span className="truncate">{section.name}</span> | ||||||
| )} | ||||||
|
|
||||||
| {!isRenaming && ( | ||||||
| <span className="shrink-0 text-[10px] font-normal tabular-nums"> | ||||||
| ({section.workspaces.length}) | ||||||
| </span> | ||||||
| )} | ||||||
| </div> | ||||||
|
|
||||||
| {!isRenaming && actions ? ( | ||||||
| // biome-ignore lint/a11y/noStaticElementInteractions: Nested action controls handle their own semantics; this wrapper only isolates events from the header toggle. | ||||||
| <div | ||||||
| className="flex items-center" | ||||||
| onClick={(event) => event.stopPropagation()} | ||||||
| onKeyDown={(event) => event.stopPropagation()} | ||||||
| > | ||||||
| {actions} | ||||||
| {!isRenaming && ( | ||||||
| <div className="ml-1 flex size-5 shrink-0 items-center justify-center"> | ||||||
| {actions ? ( | ||||||
| // biome-ignore lint/a11y/noStaticElementInteractions: Nested action controls handle their own semantics; this wrapper only isolates events from the header toggle. | ||||||
| <div | ||||||
| className="peer hidden size-full items-center justify-center group-hover:flex group-has-[:focus]:flex has-[[data-state=open]]:flex" | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P2: Using Prompt for AI agents
Suggested change
|
||||||
| onClick={(event) => event.stopPropagation()} | ||||||
| onKeyDown={(event) => event.stopPropagation()} | ||||||
| > | ||||||
| {actions} | ||||||
| </div> | ||||||
| ) : null} | ||||||
| <span | ||||||
| className={cn( | ||||||
| "text-[10px] font-normal tabular-nums text-muted-foreground", | ||||||
| actions && | ||||||
| "group-hover:hidden group-has-[:focus]:hidden peer-has-[[data-state=open]]:hidden", | ||||||
| )} | ||||||
| > | ||||||
| {section.workspaces.length} | ||||||
| </span> | ||||||
| </div> | ||||||
| ) : null} | ||||||
| )} | ||||||
| </div> | ||||||
| ); | ||||||
| }, | ||||||
|
|
||||||
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.