Skip to content

Conversation

@zzcr
Copy link
Member

@zzcr zzcr commented Mar 31, 2025

更新svg资源文件

PR

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 alert components with refreshed background colors and enhanced clickable link appearances.
    • Enhanced checkboxes, grid checkboxes, and option components with refined visual feedback for active, disabled, checked, and hover states using dynamic theming.
    • Improved radio button and radio group components to support dynamic styling and consistent visual alignment.
  • Tests
    • Adjusted visual verification to align with the updated alert background appearance.

@coderabbitai
Copy link

coderabbitai bot commented Mar 31, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

This pull request updates the visual styling and attribute binding across several components. In example alert components, the background color for the custom class shifts from a static value to a dynamic CSS variable, with tests updated to expect new RGB values. In theme files, changes include updated styling for alert operation links, checkboxes, grids, and options, along with the addition of new CSS custom properties. Additionally, mobile-first Vue components in the radio module now bind extra attributes via a new directive, and minor adjustments have been made to radio token class definitions.

Changes

File(s) Change Summary
examples/sites/demos/pc/app/alert/custom-class-composition-api.vue, .../alert/custom-class.vue, .../alert/custom-class.spec.ts Updated Vue component styles: background color changed from static pink to var(--tv-color-bg-disabled-control-active); test expectations updated from rgb(255, 192, 203) to rgb(179, 214, 255).
packages/theme/src/alert/index.less, packages/theme/src/alert/vars.less Revised alert operation link styles: removed placeholder style and added anchor tag color rules with hover effects; introduced new CSS variables for link colors.
packages/theme/src/checkbox/index.less Modified checkbox styles: added fill properties for icons in active and disabled states and updated hover effect for .icon-check.
packages/theme/src/grid/checkbox.less, packages/theme/src/grid/vars.less Adjusted grid checkbox styling: updated fill colors for hover, checked, half-select, and disabled states; introduced several new CSS variables for grid checkbox appearance.
packages/theme/src/option/index.less, packages/theme/src/option/vars.less Enhanced option component SVG styling: defined updated fill rules for checked, halfselect, and unchecked states (including hover and disabled); added new CSS custom properties.
packages/vue/src/radio-button/src/mobile-first.vue, packages/vue/src/radio-group/src/mobile-first.vue Added new binding directives on <label> and <component> elements to forward extra attributes (excluding class and style).
packages/vue/src/radio/src/token.ts Updated CSS class definitions: removed and added alignment and cursor properties (e.g., adjusted radio-default, added cursor-default to readonly classes, and included align-middle in common styles).

Sequence Diagram(s)

sequenceDiagram
    participant Parent as Parent Component
    participant RB as Radio Button (mobile-first)
    participant RG as Radio Group (mobile-first)
    participant Elem as Rendered Element

    Parent->>RB: Pass $attrs (incl. extra attributes)
    RB->>RB: Filter out 'class' & 'style' via directive
    RB->>Elem: Bind remaining attributes

    Parent->>RG: Pass $attrs (incl. extra attributes)
    RG->>RG: Filter out 'class' & 'style' via directive
    RG->>Elem: Bind remaining attributes
Loading

Possibly related PRs

  • opentiny/tiny-vue#3040: The changes in the main PR, which modify the CSS styling for the .customClass class, are related to the retrieved PR as both involve updates to CSS properties using CSS variables, specifically changing static values to dynamic ones.
  • opentiny/tiny-vue#2898: The changes in the main PR, which involve modifying the CSS styling for the .customClass class using a CSS variable, are related to the retrieved PR that updates color properties to utilize CSS variables, indicating a shared focus on enhancing styling flexibility through CSS variables.
  • opentiny/tiny-vue#2157: The changes in the main PR, which involve updating the CSS variable for the .customClass class, are related to the retrieved PR that optimizes theme style variables by renaming and standardizing CSS custom properties, including those that may affect the same styling context.

Suggested reviewers

  • MomoPoppy

Poem

I’m just a rabbit in a code garden,
Hopping through CSS with carrots a-burden.
New colors and styles spring to life on screen,
Directives dancing, attributes serene.
With joyful hops, I celebrate this bright scene!
🥕✨

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

examples/sites/demos/pc/app/alert/custom-class-composition-api.vue

Oops! Something went wrong! :(

ESLint: 8.57.1

ESLint couldn't find the plugin "eslint-plugin-vue".

(The package "eslint-plugin-vue" was not found when loaded as a Node module from the directory "".)

It's likely that the plugin isn't installed correctly. Try reinstalling by running the following:

npm install eslint-plugin-vue@latest --save-dev

The plugin "eslint-plugin-vue" was referenced from the config file in ".eslintrc.js » @antfu/eslint-config » @antfu/eslint-config-vue".

If you still can't figure out the problem, please stop by https://eslint.org/chat/help to chat with the team.

examples/sites/demos/pc/app/alert/custom-class.vue

Oops! Something went wrong! :(

ESLint: 8.57.1

ESLint couldn't find the plugin "eslint-plugin-vue".

(The package "eslint-plugin-vue" was not found when loaded as a Node module from the directory "".)

It's likely that the plugin isn't installed correctly. Try reinstalling by running the following:

npm install eslint-plugin-vue@latest --save-dev

The plugin "eslint-plugin-vue" was referenced from the config file in ".eslintrc.js » @antfu/eslint-config » @antfu/eslint-config-vue".

If you still can't figure out the problem, please stop by https://eslint.org/chat/help to chat with the team.

examples/sites/demos/pc/app/alert/custom-class.spec.ts

Oops! Something went wrong! :(

ESLint: 8.57.1

ESLint couldn't find the plugin "eslint-plugin-vue".

(The package "eslint-plugin-vue" was not found when loaded as a Node module from the directory "".)

It's likely that the plugin isn't installed correctly. Try reinstalling by running the following:

npm install eslint-plugin-vue@latest --save-dev

The plugin "eslint-plugin-vue" was referenced from the config file in ".eslintrc.js » @antfu/eslint-config » @antfu/eslint-config-vue".

If you still can't figure out the problem, please stop by https://eslint.org/chat/help to chat with the team.

  • 3 others

📜 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 1f45064 and 1366b4d.

⛔ Files ignored due to path filters (9)
  • packages/theme-saas/src/svgs/radio.svg is excluded by !**/*.svg
  • packages/theme/src/svgs/check.svg is excluded by !**/*.svg
  • packages/theme/src/svgs/checked-sur.svg is excluded by !**/*.svg
  • packages/theme/src/svgs/error.svg is excluded by !**/*.svg
  • packages/theme/src/svgs/halfselect.svg is excluded by !**/*.svg
  • packages/theme/src/svgs/help.svg is excluded by !**/*.svg
  • packages/theme/src/svgs/success.svg is excluded by !**/*.svg
  • packages/theme/src/svgs/warning-triangle.svg is excluded by !**/*.svg
  • packages/theme/src/svgs/warning.svg is excluded by !**/*.svg
📒 Files selected for processing (13)
  • examples/sites/demos/pc/app/alert/custom-class-composition-api.vue (1 hunks)
  • examples/sites/demos/pc/app/alert/custom-class.spec.ts (1 hunks)
  • examples/sites/demos/pc/app/alert/custom-class.vue (1 hunks)
  • packages/theme/src/alert/index.less (3 hunks)
  • packages/theme/src/alert/vars.less (1 hunks)
  • packages/theme/src/checkbox/index.less (3 hunks)
  • packages/theme/src/grid/checkbox.less (5 hunks)
  • packages/theme/src/grid/vars.less (2 hunks)
  • packages/theme/src/option/index.less (2 hunks)
  • packages/theme/src/option/vars.less (1 hunks)
  • packages/vue/src/radio-button/src/mobile-first.vue (1 hunks)
  • packages/vue/src/radio-group/src/mobile-first.vue (1 hunks)
  • packages/vue/src/radio/src/token.ts (2 hunks)
✨ Finishing Touches
  • 📝 Generate Docstrings

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 enhancement New feature or request (功能增强) label Mar 31, 2025
@github-actions
Copy link

[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

@zzcr zzcr merged commit f0b6b92 into dev Mar 31, 2025
11 of 13 checks passed
@kagol kagol deleted the sync-inopen-to-dev-0331 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

enhancement New feature or request (功能增强)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants