fix(ui): allow horizontal scroll for long code block lines#957
Merged
Conversation
Comment content clips long code lines because `.tk-content` uses `overflow: hidden` without a scrollable pre wrapper. Add horizontal overflow scrolling for rendered code blocks in comments and preview. Fixes #839 Co-authored-by: Cursor <cursoragent@cursor.com>
Closed
Contributor
审阅者指南(在小型 PR 上折叠)审阅者指南为评论内容和预览中的代码块添加水平滚动,并保留预格式化空白字符,使单行较长的代码块可以滚动查看而不是被裁剪。 文件级更改
与关联 Issue 的对照评估
可能相关的 Issue
提示与命令与 Sourcery 交互
自定义你的体验打开你的 控制面板 以:
获取帮助Original review guide in EnglishReviewer's guide (collapsed on small PRs)Reviewer's GuideAdds horizontal scrolling and preserves preformatted whitespace for code blocks in comment content and preview so long single-line code blocks are scrollable instead of clipped. File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Contributor
There was a problem hiding this comment.
Hey - 我已经审查了你的改动,看起来非常棒!
帮我变得更有用!请在每条评论上点击 👍 或 👎,我会根据你的反馈改进审查质量。
Original comment in English
Hey - I've reviewed your changes and they look great!
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
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
<pre>blocks inside comment content and previewwhite-space: preon code lines so long lines scroll instead of being clippedProblem
Fixes #839. Long single-line code blocks were clipped by
.tk-content { overflow: hidden }with no way to view the hidden portion.Test plan
Summary by Sourcery
为评论内容和预览中的长代码块启用横向滚动,以确保在现有布局中完整代码行仍然可访问。
Bug Fixes:
Enhancements:
Original summary in English
Summary by Sourcery
Enable horizontal scrolling for long code blocks in comment content and preview to ensure full lines remain accessible within the existing layout.
Bug Fixes:
Enhancements: