feat(preview): add close animation when diff becomes empty after commit#471
Merged
Conversation
When a git commit is detected and the diff content becomes empty, the preview panel now plays a smooth 250ms fade-out + slide animation before being removed, instead of disappearing abruptly. The right panel is absolute-positioned during the exit animation so the left panel can expand without layout conflicts. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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
Root cause
之前的实现中,关闭动画期间右侧面板仍以
flex-1参与 flex 布局,与左侧flex: 1 1 auto互相争抢空间,导致左侧实际无法展开;等动画结束右侧 DOM 被移除后左侧才突然跳变到全宽,造成"卡顿突兀"的体感。Changes
tailwind.config.jspreview-slide-outkeyframes(opacity 1→0 + translateX 0→16px)及 animationMainArea.tsxclosing状态机;右侧面板在关闭时 absolute 定位脱离文档流;左侧面板 flex 过渡Test plan
🤖 Generated with Claude Code