Skip to content

Conversation

@discreted66
Copy link
Collaborator

@discreted66 discreted66 commented Apr 3, 2025

PR

fix:暗色主题适配

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
    • Enhanced input icons with interactive cursor and hover color transitions.
    • Updated steps component styling for larger icons and improved text spacing.
    • Introduced distinct sizing options for medium and large step icon sizes.
    • Removed extra padding on upload list text descriptions for a cleaner layout.

@coderabbitai
Copy link

coderabbitai bot commented Apr 3, 2025

Walkthrough

This pull request applies styling enhancements across several theme components. The input component’s SVG icons now have a pointer cursor, defined fill colors via CSS variables, and a hover state that adjusts the icon color. The steps component sees updates to element dimensions, CSS variable adjustments, and the introduction of a new variable for larger icon sizes. Additionally, an obsolete text description style in the upload-list component has been removed. No changes were made to exported or public entities.

Changes

File(s) Summary
packages/theme/.../input/index.less Added interactive styles for SVG icons: pointer cursor, default fill with CSS variable, and hover state changing fill color.
packages/theme/.../steps/index.less
packages/theme/.../steps/vars.less
Updated dimensions for large step icons, adjusted CSS variables usage, introduced --tv-Steps-node-circle-size-lg, and modified spacing.
packages/theme/.../upload-list/index.less Removed the __text-desc class and its associated padding style.

Suggested labels

enhancement

Suggested reviewers

  • zzcr

Poem

Hop along the code trail I go,
Scanning styles where the fresh winds blow.
SVGs shine with a pointer’s grace,
Steps expand in their spacious place.
I’m the rabbit, dancing in CSS delight!
🐇✨ Enjoy these changes, crisp and bright!


📜 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 ece4e84 and 3be1084.

⛔ Files ignored due to path filters (1)
  • packages/theme/src/svgs/halfselect.svg is excluded by !**/*.svg
📒 Files selected for processing (4)
  • packages/theme/src/input/index.less (1 hunks)
  • packages/theme/src/steps/index.less (4 hunks)
  • packages/theme/src/steps/vars.less (1 hunks)
  • packages/theme/src/upload-list/index.less (0 hunks)
💤 Files with no reviewable changes (1)
  • packages/theme/src/upload-list/index.less
🚧 Files skipped from review as they are similar to previous changes (3)
  • packages/theme/src/input/index.less
  • packages/theme/src/steps/vars.less
  • packages/theme/src/steps/index.less

🪧 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 3, 2025
@petercat-assistant
Copy link

Walkthrough

This PR addresses style adjustments for dark themes across multiple components including input, steps, and loading. It introduces changes to CSS variables and styles to ensure proper visual consistency in dark mode.

Changes

Files Summary
packages/theme/src/input/index.less Added hover effects and pointer cursor for SVG icons.
packages/theme/src/steps/index.less Adjusted sizes for step icons and added line-height for text.
packages/theme/src/steps/vars.less Introduced new CSS variables for large step icon sizes.
packages/theme/src/upload-list/index.less Removed unused text description styles.

align-items: center;

svg {
cursor: pointer;

Choose a reason for hiding this comment

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

Ensure that the pointer cursor is appropriate for all interactive elements to enhance user experience.

.icon {
width: var(--tv-Steps-node-circle-size);
height: var(--tv-Steps-node-circle-size);
width: var(--tv-Steps-node-circle-size-lg);

Choose a reason for hiding this comment

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

Ensure that the new size variables are correctly applied throughout the component to maintain consistency.

// 节点圆圈尺寸-中
--tv-Steps-node-circle-size: var(--tv-size-height-md, 32px);
// 节点圆圈尺寸-large
--tv-Steps-node-circle-size-lg: var(--tv-size-height-lg, 40px);

Choose a reason for hiding this comment

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

Verify that the new large size variable is used consistently across all relevant components.

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/src/input/index.less (1)

305-314: Enhanced SVG Icon Interactivity
The new styles for the SVG inside the input mask now add a cursor: pointer, explicitly set the icon’s default fill color using var(--tv-Input-icon-color), and define a hover state with var(--tv-Input-icon-color-hover). These changes improve interactivity and visual feedback for users.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between a13b57e and ece4e84.

📒 Files selected for processing (4)
  • packages/theme/src/input/index.less (1 hunks)
  • packages/theme/src/steps/index.less (4 hunks)
  • packages/theme/src/steps/vars.less (1 hunks)
  • packages/theme/src/upload-list/index.less (0 hunks)
💤 Files with no reviewable changes (1)
  • packages/theme/src/upload-list/index.less
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: PR E2E Test (pnpm test:e2e3)
🔇 Additional comments (5)
packages/theme/src/steps/vars.less (1)

24-27: Updated Node Circle Size Variables
The comment for --tv-Steps-node-circle-size was updated to clarify that it represents the medium size, and a new variable --tv-Steps-node-circle-size-lg has been introduced (with a fallback value of 40px). This addition provides more granular control for sizing in different step scenarios.

packages/theme/src/steps/index.less (4)

382-386: Using New CSS Variable for Large Step Icons
Within the .large block, the inner .icon element’s width and height are now set to use var(--tv-Steps-node-circle-size-lg) instead of hardcoded values. This update ensures that the icon sizes adhere to the new large size design specification consistently.


482-486: Align Main Container Height with Large Icon Size
The main container (.@{steps-prefix-cls}-main) now uses height: var(--tv-Steps-node-circle-size-lg);. This change aligns the container’s height with the updated large icon dimensions, ensuring visual consistency.


701-705: Improved Title Readability with Line-Height Adjustment
A line-height: 1.5 has been added to the step title within the .title class. This adjustment should enhance text readability and vertical spacing. Please verify that it renders well across different viewports.


825-827: Revised Dimension Parameters for the Large Variant
The .block-size-mixin invocation for the large variant has been updated with new parameters (40px, 16px, 26px, 16px, 40px, 12px). These revised values better reflect the design updates for larger step elements. Ensure that this sizing works harmoniously with the overall layout.

@zzcr zzcr merged commit f28fd42 into opentiny:dev Apr 3, 2025
10 checks passed
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.

2 participants