Skip to content

Conversation

@ArgoZhang
Copy link
Member

@ArgoZhang ArgoZhang commented Aug 11, 2025

Link issues

fixes #6591

Summary By Copilot

Regression?

  • Yes
  • No

Risk

  • High
  • Medium
  • Low

Verification

  • Manual (required)
  • Automated

Packaging changes reviewed?

  • Yes
  • No
  • N/A

☑️ Self Check before Merge

⚠️ Please check all items below before review. ⚠️

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • Merge the latest code from the main branch

Summary by Sourcery

Update Dropdown component to use a primary button style by default by changing the default Color value to Primary and adjusting the CSS builder logic

Bug Fixes:

  • Remove conditional btn-primary class fallback and apply primary styling by default for Dropdown button

Enhancements:

  • Set default Dropdown component Color parameter to Primary instead of None

@bb-auto bb-auto bot added the enhancement New feature or request label Aug 11, 2025
@bb-auto bb-auto bot added this to the 9.9.0 milestone Aug 11, 2025
@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Aug 11, 2025

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Updates the Dropdown component to use Color.Primary as its default and revises the CSS class builder by removing the fallback logic for Color.None.

File-Level Changes

Change Details Files
Default color changed from None to Primary with CSS logic updated
  • Set Color parameter default to Color.Primary
  • Removed AddClass fallback for btn-primary when Color was None
  • Updated XML doc comment to reflect new default value
src/BootstrapBlazor/Components/Dropdown/Dropdown.razor.cs

Assessment against linked issues

Issue Objective Addressed Explanation
#6591 Update the default value of the Color property in the Dropdown component.

Possibly linked issues


Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @ArgoZhang - I've reviewed your changes - here's some feedback:

  • Add an entry in the CHANGELOG to document the breaking change of Dropdown’s default color from None to Primary.
  • Update any demo pages or examples to reflect the new default Primary color behavior in Dropdown components.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Add an entry in the CHANGELOG to document the breaking change of Dropdown’s default color from None to Primary.
- Update any demo pages or examples to reflect the new default Primary color behavior in Dropdown components.

## Individual Comments

### Comment 1
<location> `src/BootstrapBlazor/Components/Dropdown/Dropdown.razor.cs:70` </location>
<code_context>
         .Build();

     /// <summary>
-    /// 获得/设置 颜色 默认 Color.None 无设置
+    /// 获得/设置 颜色 默认 Color.Primary 无设置
     /// </summary>
     [Parameter]
</code_context>

<issue_to_address>
The summary comment update should clarify that Color.Primary is now the default.

The phrase '无设置' may cause confusion, as a default is now always present. Please reword to clarify that Color.Primary is used unless overridden.
</issue_to_address>

<suggested_fix>
<<<<<<< SEARCH
    /// <summary>
    /// 获得/设置 颜色 默认 Color.Primary 无设置
    /// </summary>
=======
    /// <summary>
    /// 获得/设置 颜色。默认值为 Color.Primary,除非被显式设置为其他值。
    /// </summary>
>>>>>>> REPLACE

</suggested_fix>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@ArgoZhang ArgoZhang merged commit e88f9f0 into main Aug 11, 2025
4 checks passed
@ArgoZhang ArgoZhang deleted the refactor-dropdown branch August 11, 2025 00:36
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.

feat(Dropdown): update Color default value

2 participants