Skip to content

feat(SelectCity): disable AutoClose when set IsMultiple to true#612

Merged
ArgoZhang merged 2 commits intomasterfrom
feat-city
Oct 18, 2025
Merged

feat(SelectCity): disable AutoClose when set IsMultiple to true#612
ArgoZhang merged 2 commits intomasterfrom
feat-city

Conversation

@ArgoZhang
Copy link
Copy Markdown
Member

@ArgoZhang ArgoZhang commented Oct 18, 2025

Link issues

fixes #611

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

Disable auto-close behavior for SelectCity component when multiple selection is enabled

Bug Fixes:

  • Prevent dropdown from auto-closing in SelectCity when IsMultiple is true

Documentation:

  • Update AutoClose parameter documentation to note it’s ignored when multiple selection is enabled

Copilot AI review requested due to automatic review settings October 18, 2025 02:35
@bb-auto bb-auto Bot added the enhancement New feature or request label Oct 18, 2025
@bb-auto bb-auto Bot added this to the v9.2.0 milestone Oct 18, 2025
@sourcery-ai
Copy link
Copy Markdown

sourcery-ai Bot commented Oct 18, 2025

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

This PR enhances the SelectCity component by making AutoClose conditional on the IsMultiple flag: when multiple selection is enabled, the dropdown remains open, with supporting documentation added.

Sequence diagram for city selection with multiple selection enabled

sequenceDiagram
    participant User
    participant SelectCity
    User->>SelectCity: Select a city (IsMultiple = true)
    SelectCity->>SelectCity: OnSelectCity(item)
    Note over SelectCity: AutoClose ignored, dropdown remains open
Loading

Sequence diagram for city selection with single selection enabled

sequenceDiagram
    participant User
    participant SelectCity
    User->>SelectCity: Select a city (IsMultiple = false)
    SelectCity->>SelectCity: OnSelectCity(item)
    alt AutoClose = true
        SelectCity->>SelectCity: InvokeVoidAsync("hide", Id)
        Note over SelectCity: Dropdown closes
    else AutoClose = false
        Note over SelectCity: Dropdown remains open
    end
Loading

Class diagram for updated SelectCity component

classDiagram
    class SelectCity {
        +bool AutoClose
        +bool IsMultiple
        +Task OnSelectCity(string item)
    }
    SelectCity : OnSelectCity(string item)
    SelectCity : AutoClose
    SelectCity : IsMultiple
Loading

File-Level Changes

Change Details Files
Disable AutoClose when IsMultiple is true
  • Add a note to the AutoClose parameter documentation
  • Change OnSelectCity logic to check !IsMultiple && AutoClose before hiding the dropdown
src/components/BootstrapBlazor.Region/Components/SelectCity.razor.cs

Assessment against linked issues

Issue Objective Addressed Explanation
#611 Disable AutoClose functionality in SelectCity component when IsMultiple is set to true.
#611 Update documentation/comments to clarify that AutoClose does not apply when IsMultiple is true.

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

@ArgoZhang ArgoZhang merged commit 35b2018 into master Oct 18, 2025
1 of 2 checks passed
@ArgoZhang ArgoZhang deleted the feat-city branch October 18, 2025 02:35
Copy link
Copy Markdown

@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 there - I've reviewed your changes and they look great!


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.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Disable dropdown auto-close in SelectCity when multiple selection is enabled

  • Gate auto-close on selection behind IsMultiple to prevent closing when selecting multiple items
  • Clarify AutoClose XML doc to note it’s ineffective when IsMultiple is true
  • Bump package version from 9.0.4 to 9.0.5

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/components/BootstrapBlazor.Region/Components/SelectCity.razor.cs Add IsMultiple check to auto-close logic and update AutoClose doc comment to reflect behavior
src/components/BootstrapBlazor.Region/BootstrapBlazor.Region.csproj Increment package version to 9.0.5

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

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(SelectCity): disable AutoClose when set IsMultiple to true

2 participants