improvement: copilot, dimensions#2636
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Greptile SummaryThis PR introduces two main improvements: a refactoring of dimension constants into a centralized location and UI/UX enhancements to the copilot interface. Dimension Refactoring
Copilot UI/UX Improvements
Settings Modal Enhancement
Note: The Confidence Score: 4/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant Browser
participant Layout
participant CSS
participant Store
participant Component
User->>Browser: Load workspace page
Browser->>Layout: Execute blocking script
Layout->>Layout: Read localStorage (sidebar/panel/terminal state)
Layout->>CSS: Set CSS variables (--sidebar-width, --panel-width, etc)
Note over Layout,CSS: Uses hardcoded constants (232px, 290px, 155px)
Browser->>Component: React hydration starts
Component->>Store: Initialize Zustand stores
Store->>Store: Load persisted state from localStorage
Note over Store: Uses SIDEBAR_WIDTH, PANEL_WIDTH, TERMINAL_HEIGHT from constants.ts
Component->>CSS: Read CSS variables for initial render
Note over Component,CSS: No layout shift - values already set
User->>Component: Resize panel/sidebar/terminal
Component->>Store: Update store state
Store->>CSS: Update CSS variables dynamically
Store->>Store: Persist to localStorage
|
| :root { | ||
| --sidebar-width: 232px; | ||
| --panel-width: 260px; | ||
| --toolbar-triggers-height: 300px; | ||
| --editor-connections-height: 200px; | ||
| --terminal-height: 155px; | ||
| --sidebar-width: 232px; /* SIDEBAR_WIDTH.DEFAULT */ | ||
| --panel-width: 290px; /* PANEL_WIDTH.DEFAULT */ | ||
| --toolbar-triggers-height: 300px; /* TOOLBAR_TRIGGERS_HEIGHT.DEFAULT */ | ||
| --editor-connections-height: 172px; /* EDITOR_CONNECTIONS_HEIGHT.DEFAULT */ | ||
| --terminal-height: 155px; /* TERMINAL_HEIGHT.DEFAULT */ | ||
| } |
There was a problem hiding this comment.
style: Editing globals.css should be avoided per project guidelines. Consider moving these CSS variable definitions to a separate layout-specific CSS file or using CSS-in-JS within the layout component.
Context Used: Context from dashboard - Avoid editing the globals.css file unless absolutely necessary. Move style changes to local componen... (source)
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/sim/app/_styles/globals.css
Line: 12:18
Comment:
**style:** Editing `globals.css` should be avoided per project guidelines. Consider moving these CSS variable definitions to a separate layout-specific CSS file or using CSS-in-JS within the layout component.
**Context Used:** Context from `dashboard` - Avoid editing the globals.css file unless absolutely necessary. Move style changes to local componen... ([source](https://app.greptile.com/review/custom-context?memory=c3b5e4b0-6580-4307-83aa-ba28f105b3c4))
<sub>Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!</sub>
How can I resolve this? If you propose a fix, please make it concise.
Summary
Copilot ui/ux; refactor: store dimensions.
Type of Change
Testing
Solo.
Checklist