Skip to content

Conversation

@gimmyhehe
Copy link
Member

@gimmyhehe gimmyhehe commented Apr 2, 2025

PR

修复表格textarea编辑器被截断问题

修改前:
image

修改后:
image

PR Checklist

Please check if your PR fulfills the following requirements:

  • The commit message follows our Commit Message Guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Other... Please describe:

What is the current behavior?

Issue Number: N/A

What is the new behavior?

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

Summary by CodeRabbit

  • Style
    • Updated grid layout to enable flexible vertical expansion of editor components for a more responsive display.
    • Refined background styling for grid sections to provide a cleaner and more consistent visual appearance.

@coderabbitai
Copy link

coderabbitai bot commented Apr 2, 2025

Walkthrough

The pull request updates CSS styling in two grid table-related files. In one file, the .grid-prefix-cls-editor class has its fixed height (h-7) replaced by a full height (h-full) and the leading-none style is removed. In the other file, a single-line background-image definition is reformatted into a multi-line structure for readability, and the .grid-editor class now uses a fixed height of 100% instead of a variable while removing the line-height property. No exported or public entities were modified.

Changes

File(s) Change Summary
packages/theme(-saas)/.../table.less - theme-saas: Updated .grid-prefix-cls-editor: replaced fixed height (h-7) with flexible height (h-full) and removed leading-none.
- theme: Reformatted background-image into a multi-line format; updated .grid-editor height from var(--tv-Grid-input-height) to 100% and removed line-height.

Suggested labels

bug

Suggested reviewers

  • zzcr

Poem

I'm a rabbit, hopping through the code,
Styling grids to lighten up the load,
Fixed heights now set to grow so tall,
Line by line, I’m thrilled with it all,
A joyful hop for changes that enthrall! 🐇✨


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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai plan to trigger planning for file edits and PR creation.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions github-actions bot added the bug Something isn't working label Apr 2, 2025
@petercat-assistant
Copy link

Walkthrough

此PR修复了表格中textarea编辑器被截断的问题。通过调整CSS样式,确保编辑器在表格中能够完整显示,避免被截断的情况。

Changes

文件 概要
packages/theme-saas/src/grid/table.less, packages/theme/src/grid/table.less 修改了textarea编辑器的高度属性,从固定高度改为全高度,以确保编辑器不被截断。

@apply w-full;
@apply h-7;
@apply leading-none;
@apply h-full;

Choose a reason for hiding this comment

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

Changed the height from a fixed value to full height to ensure the textarea editor is not clipped.

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


Walkthrough

This PR fixes the issue where the textarea editor is truncated in the table. By adjusting the CSS style, ensure that the editor can be displayed in the table in full and avoid truncation.

Changes

Documents Summary
packages/theme-saas/src/grid/table.less, packages/theme/src/grid/table.less Modified the height property of the textarea editor from fixed height to full height to ensure that the editor is not truncated.

@github-actions
Copy link

github-actions bot commented Apr 2, 2025

[e2e-test-warn]
The component to be tested is missing.

The title of the Pull request should look like "fix(vue-renderless): [action-menu, alert] fix xxx bug".

Please make sure you've read our contributing guide

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: 0

🧹 Nitpick comments (1)
packages/theme-saas/src/grid/table.less (1)

1139-1151: Enhance textarea editor styling for full container coverage.

The change in the .@{grid-prefix-cls}-editor block now applies h-full instead of a fixed height (previously h-7), which should resolve the issue of the textarea being truncated. Additionally, removing the leading-none property helps ensure the text inside aligns more naturally with the container’s spacing. Please verify that this change doesn’t adversely affect other components relying on the previous fixed-height style.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9f72b19 and 8067b03.

📒 Files selected for processing (2)
  • packages/theme-saas/src/grid/table.less (1 hunks)
  • packages/theme/src/grid/table.less (2 hunks)
🔇 Additional comments (1)
packages/theme/src/grid/table.less (1)

978-982: Ensure grid editor fills its container vertically.

The updated styling for the .@{grid-prefix-cls}-editor class now sets height: 100%, which replaces the previous variable-based height. This change directly addresses the grid textarea truncation issue by allowing the editor to expand fully. Double-check that the removal of any explicit line-height settings does not impact other text elements within the editor.

@zzcr zzcr merged commit efe473f into dev Apr 7, 2025
11 checks passed
@coderabbitai coderabbitai bot mentioned this pull request Apr 11, 2025
13 tasks
@kagol kagol deleted the cgm/fix-texteare-editor branch April 14, 2025 12:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants