Skip to content

Conversation

@James-9696
Copy link
Collaborator

@James-9696 James-9696 commented Oct 22, 2025

PR

修改前:
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:
    修改badge组件样式

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

Release Notes

  • Style
    • Refined badge text styling for active and nested states
    • Enhanced text sizing for icon-only buttons with text variant

@github-actions github-actions bot added the bug Something isn't working label Oct 22, 2025
@coderabbitai
Copy link

coderabbitai bot commented Oct 22, 2025

Walkthrough

The changes modify styling rules in badge and button components: one removes text-color-text-inverse properties from badge selectors, and another adds a text-xs style rule for buttons with the text variant in the is-only-icon context.

Changes

Cohort / File(s) Summary
Badge styling cleanup
packages/theme-saas/src/badge/index.less
Removes text-color-text-inverse declarations from two badge selectors to reduce text color styling
Button icon text variant
packages/theme-saas/src/button/index.less
Adds new style rule applying text-xs to buttons with text variant within the is-only-icon context

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 A badge sheds its inverse hue so bright,
While buttons in icons now text-xs light,
Styling refined with a nibble and bite,
These theme tweaks make everything feel just right! ✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title Check ✅ Passed The PR title "fix(badge): modify the saas theme style" clearly relates to the actual changes in the pull request. The primary modification is in the badge component's LESS file where text-color-text-inverse styling is removed from specific selectors, which aligns with what the title describes. While the PR also includes changes to the button component's LESS file, the PR description and commit message focus is on the badge component style modifications, making badge the primary concern. The title is concise, specific, and follows conventional commit format, accurately summarizing the most important change from the developer's perspective.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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

🧹 Nitpick comments (1)
packages/theme-saas/src/button/index.less (1)

152-154: Minor: Remove extra whitespace in selector.

The selector has two spaces before the opening brace, which is inconsistent with CSS conventions used elsewhere in the file. Consider using a single space.

Apply this diff to align with standard CSS formatting:

-    &.@{button-prefix-cls}--text  {
+    &.@{button-prefix-cls}--text {
       @apply text-xs;
     }
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c8cfea3 and 26f484c.

📒 Files selected for processing (2)
  • packages/theme-saas/src/badge/index.less (0 hunks)
  • packages/theme-saas/src/button/index.less (1 hunks)
💤 Files with no reviewable changes (1)
  • packages/theme-saas/src/badge/index.less
🔇 Additional comments (1)
packages/theme-saas/src/button/index.less (1)

124-155: LGTM!

The new rule correctly targets icon-only buttons with the text variant and applies smaller text sizing (text-xs). The nesting is properly scoped, and the variable usage is consistent with the rest of the file.

@zzcr zzcr merged commit 83dfad0 into opentiny:dev Oct 29, 2025
12 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