fix(editable-table): expand values cells on focus#8187
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
💤 Files with no reviewable changes (1)
WalkthroughEditor components are standardized with consistent CodeMirror styling, line wrapping is enabled across single-line and multi-line editors, and keyboard shortcuts are refined. EditableTable cell sizing is adjusted to manage editor overflow and focus transitions. ChangesEditor Layout Standardization
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/bruno-app/src/components/EditableTable/StyledWrapper.js`:
- Around line 104-124: The CSS contains a duplicated rule selector ">
div:not(.drag-handle) > * { min-height: 0; }" inside StyledWrapper.js (present
under the initial collapsed state and again under :focus-within); remove the
redundant occurrence so only a single declaration for that selector remains,
keeping whichever placement best reflects intended cascade (prefer keeping the
one outside :focus-within) and ensure no visual regressions.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: c915b6e0-f0ee-4fbb-b79c-805496bc78d8
📒 Files selected for processing (5)
packages/bruno-app/src/components/EditableTable/StyledWrapper.jspackages/bruno-app/src/components/MultiLineEditor/StyledWrapper.jspackages/bruno-app/src/components/MultiLineEditor/index.jspackages/bruno-app/src/components/SingleLineEditor/StyledWrapper.jspackages/bruno-app/src/components/SingleLineEditor/index.js
Description
Issue #8179 pretty much explains the entire problem. The two main causes were:
lineWrappingwas set tofalse. Long lines would never wrap.Changes
TL;DR: After the changes, writing multi-line text on the table's key cells automatically makes them expand vertically just enough so the content can be clearly visualized. The change applies to the tables in params, body and header tabs.
MultiLineEditor/index.js— enabledlineWrapping: trueso CodeMirror wraps long text and calculates content height correctly.MultiLineEditor/StyledWrapper.js— replaced hardcodedline-height: 30pxwith proportionalline-height: 1.5for proper multi-line spacing. Removedheight/margin-top!importantoverrides on.CodeMirror-cursorso CM5 sizes the cursor dynamically to match the line-height.SingleLineEditor/index.js— enabledlineWrapping: true(same as MultiLineEditor) for consistency in the request headers tab.SingleLineEditor/StyledWrapper.js— replaced hardcodedline-height: 1.875remwithline-height: 1.5. Removed cursor!importantoverrides (same pattern).EditableTable/StyledWrapper.js— added three:focus-withinrules:td:focus-within— removesheight/max-height/overflow/nowrapconstraints on the cell when its editor is focused, letting content grow vertically.td:focus-within > div— removes constraints on the content wrapper, withalign-items: centerfor proper centering.height: 1.5emwithalign-items: flex-startandmin-height: 0on children, clipping cleanly to exactly one line of text.Videos showing before vs. after
Before
old.behaviour.mp4
After
new.behaviour.mp4
Contribution Checklist:
Summary by CodeRabbit