Skip to content

Conversation

@lcy0620
Copy link
Collaborator

@lcy0620 lcy0620 commented Mar 28, 2025

PR

PR Checklist

fix(tooltip): [tooltip] update dark theme
修改tooltip组件检视问题
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
    • Refined tooltip appearance with updated color settings for backgrounds, text, and borders in both dark and light themes.
    • Simplified the transfer panel interface by removing footer-specific styling for a cleaner layout.

@coderabbitai
Copy link

coderabbitai bot commented Mar 28, 2025

Walkthrough

The pull request updates two Less files. In the tooltip file, several CSS custom properties have been changed to reference new variable names for dark and light themes, adjusting background, text, and border colors. In the transfer panel file, footer-related styles—including nested footer classes and positioning properties—have been removed. No changes were made to exported entities.

Changes

File Change Summary
packages/.../tooltip/vars.less Updated tooltip variables: dark background now uses --tv-color-bg-dark-1; light background updated to --tv-color-bg-2; text and border color variables modified.
packages/.../transfer/index.less Removed footer styles: deleted nested .is-with-footer styling and removed absolute positioning properties from the footer class.

Possibly related PRs

Suggested labels

bug, enhancement

Suggested reviewers

  • zzcr

Poem

I'm just a hopping rabbit,
Skipping through CSS meadows so fine,
New variables and cleaned-up code,
Make my style palette shine.
With each tweak, my heart feels light—
Carrots and code keep me in flight!

Warning

Review ran into problems

🔥 Problems

Git: Failed to clone repository. Please run the @coderabbitai full review command to re-trigger a full review. If the issue persists, set path_filters to include or exclude specific files.


📜 Recent review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 1a05bd6 and 5fa97a8.

📒 Files selected for processing (2)
  • packages/theme/src/tooltip/vars.less (1 hunks)
  • packages/theme/src/transfer/index.less (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: PR E2E Test (pnpm test:e2e3)
🔇 Additional comments (4)
packages/theme/src/tooltip/vars.less (2)

57-57: Dark Theme Tooltip Background Update

The dark theme tooltip background now uses var(--tv-color-bg-dark-1), aligning with the new theming conventions. Please ensure that this variable is defined globally and consistently used across the theme.


64-68: Light Theme Tooltip Styling Updates

The light theme tooltip-related properties have been updated as follows:

  • The background color now uses var(--tv-color-bg-2).
  • The text color is set to var(--tv-color-text).
  • The border color now references var(--tv-Tooltip-popper-normal-bg-color) instead of the previously used background variable.

These changes help streamline the styling for the light theme. Please verify that the corresponding variables are updated in your global stylesheet and that documentation reflects these modifications.

packages/theme/src/transfer/index.less (2)

152-162: Simplified Transfer Panel Body Sizing

The body section now sets its height with var(--tv-Transfer-panel-body-height) after removing the previously conditional .is-with-footer styles. This simplification should lead to a more consistent vertical layout; however, please verify that panels displaying a footer still render correctly and that no unintended spacing issues occur.


335-360: Footer Style Streamlining

Footer-related styles have been refactored to remove absolute positioning and extra nested classes, resulting in a simpler, more flexible layout configuration. Confirm that these changes meet your design requirements and that the footer content remains correctly positioned across various panel states.


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 bug Something isn't working enhancement New feature or request (功能增强) labels Mar 28, 2025
@petercat-assistant
Copy link

Walkthrough

This PR updates the dark theme for the tooltip component by modifying background and text color variables. It also includes changes to the transfer component's layout, specifically removing footer-related styles.

Changes

Files Summary
packages/theme/src/tooltip/vars.less Updated dark and light theme background and text color variables for the tooltip component.
packages/theme/src/transfer/index.less Removed footer-related styles and adjusted layout properties for the transfer component.


// dark主题弹框背景色
--tv-Tooltip-popper-dark-bg-color: var(--tv-color-bg-dark, #191919);
--tv-Tooltip-popper-dark-bg-color: var(--tv-color-bg-dark-1);

Choose a reason for hiding this comment

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

Ensure that the new variable --tv-color-bg-dark-1 is defined and used consistently across the theme to avoid any undefined variable issues.


// light主题弹框背景色
--tv-Tooltip-popper-light-bg-color: var(--tv-color-bg-inverse, #ffffff);
--tv-Tooltip-popper-light-bg-color: var(--tv-color-bg-2);

Choose a reason for hiding this comment

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

Ensure that the new variable --tv-color-bg-2 is defined and used consistently across the theme to avoid any undefined variable issues.

--tv-Tooltip-popper-light-bg-color: var(--tv-color-bg-2);
// light主题|禁用弹框文本色
--tv-Tooltip-popper-light-text-color: var(--tv-color-text-inverse-black, #191919);
--tv-Tooltip-popper-light-text-color: var(--tv-color-text);

Choose a reason for hiding this comment

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

Ensure that the new variable --tv-color-text is defined and used consistently across the theme to avoid any undefined variable issues.

--tv-Tooltip-popper-light-text-color: var(--tv-color-text);
// light主题|禁用时弹框边框色
--tv-Tooltip-popper-light-border-color: var(--tv-Tooltip-popper-light-bg-color);
--tv-Tooltip-popper-light-border-color: var(--tv-Tooltip-popper-normal-bg-color);

Choose a reason for hiding this comment

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

Ensure that the new variable --tv-Tooltip-popper-normal-bg-color is defined and used consistently across the theme to avoid any undefined variable issues.

@zzcr zzcr merged commit 322a8d4 into dev Mar 28, 2025
10 of 11 checks passed
@kagol kagol removed the enhancement New feature or request (功能增强) label Mar 31, 2025
@kagol kagol deleted the fix_tooltip branch April 14, 2025 12:29
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