-
Notifications
You must be signed in to change notification settings - Fork 0
Fix editor scroll handling and enlarge preview area #5
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
Conversation
Summary of ChangesHello @Sunwood-ai-labs, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly improves the editor's user interface and stability by addressing critical scroll handling issues and optimizing the layout of key components. The changes eliminate a crash associated with the previous scroll area implementation and ensure a more fluid and visually consistent experience, particularly for the canvas preview and timeline sections, by preventing content clipping and enhancing space utilization. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
|
There is a problem with the Gemini CLI PR review. Please check the action logs for details. |
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.
Code Review
This pull request refactors the editor's layout to improve scrolling behavior and provide more space for the canvas preview. The key change is replacing the Radix UI ScrollArea component with a simpler, custom-styled div to resolve a crash. The layout logic is also updated to make the canvas preview area flexible while keeping the timeline view at a fixed size below it. My review focuses on improving maintainability by addressing hardcoded values and removing now-unused code. Overall, the changes are a good improvement for stability and layout.
|
|
||
| return ( | ||
| <section className="flex flex-1 flex-col gap-3 overflow-hidden"> | ||
| <section className="flex min-h-[420px] flex-1 flex-col gap-3 overflow-hidden"> |
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.
| </div> | ||
| </div> | ||
| <Card className="relative flex flex-1 items-center justify-center overflow-hidden border border-border/40 bg-zinc-950/80"> | ||
| <Card className="relative flex min-h-[360px] flex-1 items-center justify-center overflow-hidden border border-border/40 bg-zinc-950/80"> |
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.
|
|
||
| return ( | ||
| <section className="flex min-h-[240px] flex-col rounded-2xl border border-border/50 bg-zinc-950/70 p-4 shadow-inner shadow-black/40"> | ||
| <section className="flex min-h-[260px] shrink-0 flex-col rounded-2xl border border-border/50 bg-zinc-950/70 p-4 shadow-inner shadow-black/40"> |
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.
| const ScrollBar = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>( | ||
| ({ className, ...props }, ref) => ( | ||
| <div ref={ref} className={cn("hidden", className)} {...props} /> | ||
| ) | ||
| ); | ||
| ScrollBar.displayName = "ScrollBar"; | ||
|
|
||
| export { ScrollArea, ScrollBar }; |
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.
The ScrollBar component is now a stub that renders a hidden div. Since the new ScrollArea implementation doesn't use it and it appears to be unused elsewhere in the project, it would be cleaner to remove it entirely to avoid confusion and reduce dead code. The export statement should also be updated accordingly.
export { ScrollArea };
Summary
Testing
https://chatgpt.com/codex/tasks/task_e_68fe2588ccdc832c96c32834e531df7d