TINY-14188: fix ai code output background#11060
Conversation
WalkthroughChanged the CSS Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
92c0ab9 to
12909bb
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
modules/oxide/src/less/theme/components/ai-chat/ai-chat-html-content.less (1)
`107-114`: **Consider adding padding to code blocks.**Now that code wraps with `white-space: pre-wrap`, wrapped text may appear cramped against the edges. Consider adding padding similar to inline code (line 102).📦 Proposed padding addition
pre code { display: block; font-family: ui-monospace, monospace; background: var(--tox-private-separator-color, `@tinymce-separator-color`); border-radius: 4px; white-space: pre-wrap; + padding: 0.5em; margin: 1em 0; }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.In
@modules/oxide/src/less/theme/components/ai-chat/ai-chat-html-content.less
around lines 107 - 114, The pre code block lacks inner spacing after enabling
white-space: pre-wrap; update the pre code rule to add padding consistent with
the inline code rule (use the same padding values used for the inlinecode
selector) so wrapped lines don't touch the edges; locate thepre codeselector
in ai-chat-html-content.less and apply the same padding property used by the
inlinecodestyle to maintain visual parity.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@modules/oxide/src/less/theme/components/ai-chat/ai-chat-html-content.less`:
- Line 112: The PR title is misleading: the diff only changes the CSS
white-space property (white-space: pre-wrap) in ai-chat-html-content.less to
enable text wrapping, while the background styling (set earlier near the
background declaration around line 110) was not modified; update the PR title
and description to reflect the actual change (e.g., "enable wrapping for AI
code/output text" or similar) and ensure any mention of background is removed or
corrected so the title matches the modification to white-space in
ai-chat-html-content.less.
---
Nitpick comments:
In `@modules/oxide/src/less/theme/components/ai-chat/ai-chat-html-content.less`:
- Around line 107-114: The pre code block lacks inner spacing after enabling
white-space: pre-wrap; update the pre code rule to add padding consistent with
the inline code rule (use the same padding values used for the inline `code`
selector) so wrapped lines don't touch the edges; locate the `pre code` selector
in ai-chat-html-content.less and apply the same padding property used by the
inline `code` style to maintain visual parity.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: e70c352c-8ba9-47e0-bba1-71dfb7263ba9
📒 Files selected for processing (1)
modules/oxide/src/less/theme/components/ai-chat/ai-chat-html-content.less
12909bb to
7a97017
Compare

Related Ticket: TINY-14188
Description of Changes:
white-spaceproperty for code blocks frompretopre-wrapto allow text wrappingPre-checks:
Tests have been added (if applicable)feature/,hotfix/orspike/Review:
Docs ticket created (if applicable)GitHub issues (if applicable):
Summary by CodeRabbit