Skip to content

Conversation

@webvs2
Copy link

@webvs2 webvs2 commented Jan 20, 2026

close #436

Summary by CodeRabbit

  • Refactor

    • Improved code structure and readability with consistent formatting across conditional statements.
  • Style

    • Updated template markup with enhanced structural organization.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Jan 20, 2026

📝 Walkthrough

Walkthrough

Modified the Sender component to standardize conditional return statements and wrapped the el-input element in an additional div container. These structural and formatting adjustments address height calculation issues when the component is nested within layout structures like el-splitter.

Changes

Cohort / File(s) Summary
Sender Component Structure
packages/core/src/components/Sender/index.vue
Simplified conditional return formatting by collapsing multi-line if statements into single-line forms; wrapped el-input in div container to improve height calculation within constrained layout contexts; minor spacing adjustments around else branches

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 A wrapper so fine, a div takes its place,
To hold the input in just the right space,
No more height despair in splitters so deep,
Now Sender components calculate and keep!
With cleaner conditions, the code flows so sweet,
This fix makes our textarea UI complete.

🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning The PR changes are limited to formatting and structural refactoring (removing line breaks, wrapping el-input in a div container) without addressing the core issue #436 requirement to fix textarea height computation within el-splitter panels. Implement logic changes to properly compute and maintain textarea height when rendered within el-splitter. The current changes are purely formatting and do not resolve the reported bug.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title mentions fixing an autosize resizable bug in the Sender component, which aligns with the PR objective to fix textarea height issues within el-splitter. However, the title contains formatting issues ('lose bug' with extra spaces) and lacks clarity about the specific problem being fixed.
Out of Scope Changes check ✅ Passed All changes to the Sender component are related to formatting and code structure, which while minor, appear intended to address the issue. However, the changes lack substantive bug-fix logic.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Fix all issues with AI agents
In `@packages/core/src/components/Sender/index.vue`:
- Around line 120-121: There are brace-style lint violations where "} else {" is
used; update all occurrences in the Sender component so the else begins on a new
line (replace "} else {" with "}\nelse {") — notably for the block that sets
popoverVisible.value = true and the other similar conditional blocks in
packages/core/src/components/Sender/index.vue (apply the same change for the
instances reported around the toggle/popover and related handlers).
- Around line 59-60: The single-line early-return statements in Sender component
violate the antfu/if-newline lint rule; change each single-line if-return into a
multi-line block (e.g., replace "if (props.readOnly || props.disabled) return;"
with a multi-line if { return; }) where they appear (notably around the call to
emits('update:modelValue', val) and the other occurrences flagged at lines
referenced in the review); apply the same fix to all similar single-line if
statements in this file so each if has its body on a new line, adjusting the
blocks that guard emits, event handlers, or any early returns in the Sender
component.
- Around line 429-453: The new plain <div> wrapper in the Sender component
breaks the flex layout of .el-sender-content; update the wrapper to <div
class="el-sender-input-wrap"> wrapping the <el-input> (in the Sender component)
and add CSS for .el-sender-input-wrap with "flex: 1;" and "min-width: 0;" in the
Sender component's styles (style.scss) so the input can grow and autosize
correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

sender组件在el-splitter之下,ui存在问题,计算后得textarea高度为0,设置父级高度或inputStyle 均无效

1 participant