Skip to content

feat(SelectTable): add ShowToolbar parameter#7668

Merged
ArgoZhang merged 8 commits intomainfrom
feat-select-table
Feb 14, 2026
Merged

feat(SelectTable): add ShowToolbar parameter#7668
ArgoZhang merged 8 commits intomainfrom
feat-select-table

Conversation

@ArgoZhang
Copy link
Member

@ArgoZhang ArgoZhang commented Feb 14, 2026

Link issues

fixes #7663

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

Add toolbar customization support to SelectTable and align empty state styling and table width behavior.

New Features:

  • Expose ShowToolbar, ToolbarTemplate, and TableExtensionToolbarTemplate parameters on SelectTable to enable configurable table toolbars.

Bug Fixes:

  • Correct the Empty component's template CSS class name from empty-telemplate to empty-template and update related usage.
  • Adjust the SelectTable dropdown table default minimum width from 580px to 602px to match documented behavior.

Tests:

  • Add a SelectTable toolbar template unit test to verify toolbar visibility and custom toolbar content rendering behavior.

Copilot AI review requested due to automatic review settings February 14, 2026 02:34
@bb-auto bb-auto bot added the enhancement New feature or request label Feb 14, 2026
@bb-auto bb-auto bot added this to the v10.3.0 milestone Feb 14, 2026
@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Feb 14, 2026

Reviewer's Guide

Adds toolbar customization support to SelectTable, aligns Empty component template naming and styling, adjusts SelectTable minimum width handling, and updates associated tests and JavaScript behavior.

Class diagram for updated SelectTable toolbar parameters

classDiagram
    class SelectTable {
        +int? TableMinWidth
        +bool ShowAppendArrow
        +string? MultiSelectedItemMaxWidth
        +bool ShowToolbar
        +RenderFragment? ToolbarTemplate
        +RenderFragment? TableExtensionToolbarTemplate
    }

    class Table {
        +bool ShowToolbar
        +RenderFragment? ToolbarTemplate
        +RenderFragment? TableExtensionToolbarTemplate
        +bool ShowDefaultButtons
        +bool ShowRefresh
    }

    SelectTable --> Table : uses
Loading

File-Level Changes

Change Details Files
Add configurable toolbar support to SelectTable and wire it through to the inner Table component.
  • Introduce ShowToolbar boolean parameter on SelectTable to control toolbar visibility
  • Add ToolbarTemplate and TableExtensionToolbarTemplate RenderFragment parameters for toolbar content customization
  • Pass new toolbar parameters to the underlying Table component in SelectTable.razor and disable default toolbar buttons and refresh
src/BootstrapBlazor/Components/Select/SelectTable.razor.cs
src/BootstrapBlazor/Components/Select/SelectTable.razor
Update SelectTable layout behavior and associated JavaScript for min-width handling.
  • Clarify XML doc comments for TableMinWidth to indicate the 602px default style value
  • Change JavaScript min width default from 580 to 602 to match documented default
src/BootstrapBlazor/Components/Select/SelectTable.razor.cs
src/BootstrapBlazor/Components/Select/SelectTable.razor.js
Rename the Empty component template CSS class from the misspelled 'empty-telemplate' to 'empty-template' and update tests.
  • Update Empty.razor markup to use the corrected CSS class name
  • Update Empty.razor.scss styles to target the new CSS class name
  • Fix the SelectTable empty template unit test expectation to match the corrected class name
src/BootstrapBlazor/Components/Empty/Empty.razor
src/BootstrapBlazor/Components/Empty/Empty.razor.scss
test/UnitTest/Components/SelectTableTest.cs
Add unit coverage for the new SelectTable toolbar behavior.
  • Create a ToolbarTemplate_Ok test that renders SelectTable with ShowToolbar and both toolbar templates set
  • Verify that toolbar content is present when ShowToolbar is true and absent when ShowToolbar is toggled to false via re-rendering
test/UnitTest/Components/SelectTableTest.cs

Assessment against linked issues

Issue Objective Addressed Explanation
#7663 Expose toolbar-related parameters on SelectTable so that consumers can provide custom toolbar content (similar to Table's TableToolbarTemplate functionality).
#7663 Wire the new toolbar parameters from SelectTable through to the inner Table component so that the custom toolbar content actually renders when the popover/modal is shown.

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 - I've left some high level feedback:

  • In SelectTable.razor, the inner Table now forces ShowDefaultButtons="false" and ShowRefresh="false"; if consumers might want the standard toolbar buttons in addition to custom templates, consider exposing pass-through parameters instead of hard-coding these to false.
  • The default min width 602 is now duplicated in both the TableMinWidth XML doc comment and SelectTable.razor.js; consider centralizing this value (or deriving the JS default from the component parameter) to avoid these getting out of sync in future changes.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- In `SelectTable.razor`, the inner `Table` now forces `ShowDefaultButtons="false"` and `ShowRefresh="false"`; if consumers might want the standard toolbar buttons in addition to custom templates, consider exposing pass-through parameters instead of hard-coding these to false.
- The default min width `602` is now duplicated in both the `TableMinWidth` XML doc comment and `SelectTable.razor.js`; consider centralizing this value (or deriving the JS default from the component parameter) to avoid these getting out of sync in future changes.

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.

@codecov
Copy link

codecov bot commented Feb 14, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (def30fc) to head (d3894bf).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #7668   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          749       749           
  Lines        33196     33199    +3     
  Branches      4605      4605           
=========================================
+ Hits         33196     33199    +3     
Flag Coverage Δ
BB 100.00% <100.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

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

This pull request adds toolbar support to the SelectTable component, addressing issue #7663 which requested the ability to add custom controls inside the SelectTable's modal/popover. The PR also includes a typo fix for "empty-telemplate" → "empty-template" and bumps the version to 10.3.3-beta01.

Changes:

  • Added ShowToolbar, ToolbarTemplate, and TableExtensionToolbarTemplate parameters to SelectTable component
  • Updated minimum width default from 580px to 602px to accommodate toolbar display
  • Fixed typo "telemplate" to "template" in Empty component
  • Added comprehensive unit tests for the new toolbar functionality

Reviewed changes

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

Show a summary per file
File Description
src/BootstrapBlazor/Components/Select/SelectTable.razor.cs Added three new parameters: ShowToolbar (bool), ToolbarTemplate (RenderFragment), and TableExtensionToolbarTemplate (RenderFragment) with proper documentation
src/BootstrapBlazor/Components/Select/SelectTable.razor Passed new toolbar parameters to inner Table component with ShowDefaultButtons="false" and ShowRefresh="false"
src/BootstrapBlazor/Components/Select/SelectTable.razor.js Updated minimum width default from 580px to 602px to accommodate toolbar
test/UnitTest/Components/SelectTableTest.cs Added comprehensive test for toolbar functionality and fixed typo in existing test
src/BootstrapBlazor/Components/Empty/Empty.razor Fixed typo "empty-telemplate" to "empty-template"; removed UTF-8 BOM character
src/BootstrapBlazor/Components/Empty/Empty.razor.scss Fixed CSS class name typo from "empty-telemplate" to "empty-template"; removed UTF-8 BOM character
src/BootstrapBlazor/BootstrapBlazor.csproj Bumped version from 10.3.2 to 10.3.3-beta01

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@@ -1,4 +1,4 @@
@use "../../wwwroot/scss/variables" as *;
@use "../../wwwroot/scss/variables" as *;
Copy link

Copilot AI Feb 14, 2026

Choose a reason for hiding this comment

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

The UTF-8 BOM character () should be preserved at the beginning of this file to maintain consistency with the codebase convention. All .scss files that start with @use in the codebase use UTF-8 BOM encoding (see examples: src/BootstrapBlazor/Components/Alert/Alert.razor.scss:1, src/BootstrapBlazor/Components/Avatar/Avatar.razor.scss:1, and many others). The line should start with @use instead of @use.

Copilot uses AI. Check for mistakes.
@ArgoZhang ArgoZhang merged commit 9642a80 into main Feb 14, 2026
4 checks passed
@ArgoZhang ArgoZhang deleted the feat-select-table branch February 14, 2026 02:41
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(SelectTable): add TableToolbarTemplate parameter

1 participant