-
Notifications
You must be signed in to change notification settings - Fork 990
feat(desktop): add expanded changes sidebar view #858
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
6 commits
Select commit
Hold shift + click to select a range
cd41acd
Changes tab refactor
Kitenite e28b34c
Refactor components
Kitenite f8ae7a3
feat(desktop): add expanded changes view mode with sidebar toggle
Kitenite 152de68
Message
Kitenite 6073577
Clean up
Kitenite a2b4c08
Lint
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
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
7 changes: 7 additions & 0 deletions
7
...ktop/src/renderer/screens/main/components/WorkspaceView/ChangesContent/ChangesContent.tsx
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 |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| export function ChangesContent() { | ||
| return ( | ||
| <div className="h-full flex items-center justify-center text-muted-foreground"> | ||
| 🚧 GitHub style code review coming soon | ||
| </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
File renamed without changes.
1 change: 1 addition & 0 deletions
1
...eView/ContentView/ChangesContent/index.ts → ...nts/WorkspaceView/ChangesContent/index.ts
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 |
|---|---|---|
| @@ -1 +1,2 @@ | ||
| export { ChangesContent } from "./ChangesContent"; | ||
| export { DiffViewer } from "./components/DiffViewer"; |
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
7 changes: 6 additions & 1 deletion
7
apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/index.tsx
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
45 changes: 45 additions & 0 deletions
45
...op/src/renderer/screens/main/components/WorkspaceView/WorkspaceLayout/WorkspaceLayout.tsx
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 |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| import { | ||
| MAX_SIDEBAR_WIDTH, | ||
| MIN_SIDEBAR_WIDTH, | ||
| SidebarMode, | ||
| useSidebarStore, | ||
| } from "renderer/stores/sidebar-state"; | ||
| import { ResizablePanel } from "../../ResizablePanel"; | ||
| import { ChangesContent } from "../ChangesContent"; | ||
| import { ContentView } from "../ContentView"; | ||
| import { Sidebar } from "../Sidebar"; | ||
|
|
||
| export function WorkspaceLayout() { | ||
| const { | ||
| isSidebarOpen, | ||
| sidebarWidth, | ||
| setSidebarWidth, | ||
| isResizing, | ||
| setIsResizing, | ||
| currentMode, | ||
| } = useSidebarStore(); | ||
|
|
||
| const isExpanded = currentMode === SidebarMode.Changes; | ||
|
|
||
| return ( | ||
| <> | ||
| <div className="flex-1 min-w-0 overflow-hidden"> | ||
| {isExpanded ? <ChangesContent /> : <ContentView />} | ||
| </div> | ||
| {isSidebarOpen && ( | ||
| <ResizablePanel | ||
| width={sidebarWidth} | ||
| onWidthChange={setSidebarWidth} | ||
| isResizing={isResizing} | ||
| onResizingChange={setIsResizing} | ||
| minWidth={MIN_SIDEBAR_WIDTH} | ||
| maxWidth={MAX_SIDEBAR_WIDTH} | ||
| handleSide="left" | ||
| className={isExpanded ? "border-l-0" : undefined} | ||
| > | ||
| <Sidebar /> | ||
| </ResizablePanel> | ||
| )} | ||
| </> | ||
| ); | ||
| } |
1 change: 1 addition & 0 deletions
1
apps/desktop/src/renderer/screens/main/components/WorkspaceView/WorkspaceLayout/index.ts
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 |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| export { WorkspaceLayout } from "./WorkspaceLayout"; |
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.
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.
Tooltip text doesn't match PR objectives.
The PR objectives specify the tooltip should say "Open/Close Changes Sidebar", but the current implementation is static "Open Changes Sidebar". Meanwhile, the
aria-labelon Lines 127-129 correctly differentiates between "Hide" and "Show" states. Consider making the tooltip label dynamic to match the button's current state and align with the PR objectives.<TooltipContent side="bottom" showArrow={false}> <HotkeyTooltipContent - label="Open Changes Sidebar" + label={isSidebarOpen ? "Close Changes Sidebar" : "Open Changes Sidebar"} hotkeyId="TOGGLE_SIDEBAR" /> </TooltipContent>📝 Committable suggestion
🤖 Prompt for AI Agents