Skip to content

doc(Table): update ShowMoreButton documentation#7427

Merged
ArgoZhang merged 3 commits intomainfrom
dev-search
Dec 26, 2025
Merged

doc(Table): update ShowMoreButton documentation#7427
ArgoZhang merged 3 commits intomainfrom
dev-search

Conversation

@ArgoZhang
Copy link
Copy Markdown
Member

@ArgoZhang ArgoZhang commented Dec 26, 2025

Link issues

fixes #7426

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

Document and demonstrate the table ShowMoreButton dropdown actions in the column samples while cleaning up the search sample.

New Features:

  • Add a dedicated table column demo showcasing ShowMoreButton with a custom MoreButtonDropdownTemplate and action items.

Enhancements:

  • Move the toast-based action handler from the table search sample to the column sample to align with the new ShowMoreButton demo.
  • Remove the inline MoreButtonDropdownTemplate from the search sample to avoid duplication with the new dedicated demo.
  • Add localized text entries for the new ShowMoreButton demo content in the locale resources.

Copilot AI review requested due to automatic review settings December 26, 2025 03:17
@bb-auto bb-auto Bot added the documentation Improvements or additions to documentation label Dec 26, 2025
@bb-auto bb-auto Bot added this to the v10.1.0 milestone Dec 26, 2025
@sourcery-ai
Copy link
Copy Markdown
Contributor

sourcery-ai Bot commented Dec 26, 2025

Reviewer's Guide

Adds a dedicated ShowMoreButton demo and documentation to the table column samples, centralizes the MoreButton action handling and toast notification logic in TablesColumn instead of TablesSearch, and updates localization resources accordingly while performing minor formatting cleanups.

Sequence diagram for ShowMoreButton dropdown action handling

sequenceDiagram
    actor User
    participant Browser
    participant TablesColumn as TablesColumnComponent
    participant Table as TableComponent
    participant ToastService

    User->>Browser: Click ShowMoreButton
    Browser->>Table: Open MoreButtonDropdown
    User->>Table: Click DropdownItem with actionName
    Table->>TablesColumn: OnAction(contextFoo, actionName)
    TablesColumn->>ToastService: Information(foo.Name, "Trigger " + actionName)
    ToastService-->>Browser: Render toast notification
    Browser-->>User: Display toast with action feedback
Loading

File-Level Changes

Change Details Files
Add a dedicated ShowMoreButton demo section to the table columns sample demonstrating MoreButtonDropdownTemplate usage.
  • Introduce a new DemoBlock for ShowMoreButton with localized title, introduction, and description content.
  • Add a sample Table configured with pagination, toolbar, card view, multiple selection, and ShowMoreButton enabled.
  • Define a MoreButtonDropdownTemplate inside the new Table with two sample dropdown actions and a divider between them.
src/BootstrapBlazor.Server/Components/Samples/Table/TablesColumn.razor
Centralize ShowMoreButton action handling and toast notifications in TablesColumn code-behind.
  • Inject ToastService into TablesColumn component using [Inject, NotNull] attribute.
  • Implement OnAction(Foo foo, string actionName) helper that triggers an informational toast showing which action was invoked.
  • Condense GenerateComplexFoo method definition formatting onto a single line without changing behavior.
src/BootstrapBlazor.Server/Components/Samples/Table/TablesColumn.razor.cs
Remove ShowMoreButton dropdown demo logic from the table search sample and keep it focused on search behavior.
  • Delete the MoreButtonDropdownTemplate from the TablesSearch demo markup so it no longer showcases ShowMoreButton there.
  • Remove ToastService injection and the OnAction handler from TablesSearch code-behind since ShowMoreButton actions moved to TablesColumn.
  • Normalize file headers by removing stray BOM characters at the top of the razor and code-behind files.
src/BootstrapBlazor.Server/Components/Samples/Table/TablesSearch.razor
src/BootstrapBlazor.Server/Components/Samples/Table/TablesSearch.razor.cs
Update localization resources to support the new ShowMoreButton demo content.
  • Add or adjust localized strings for the ShowMoreButton demo (title, introduction, and description) in the English locale JSON.
  • Add or adjust corresponding localized strings for the ShowMoreButton demo in the Simplified Chinese locale JSON.
src/BootstrapBlazor.Server/Locales/en-US.json
src/BootstrapBlazor.Server/Locales/zh-CN.json

Assessment against linked issues

Issue Objective Addressed Explanation
#7426 Add or update documentation and sample code demonstrating the Table ShowMoreButton feature in the appropriate Table documentation component.
#7426 Clean up or relocate any outdated ShowMoreButton example from the Table search sample so that ShowMoreButton documentation is accurate and not duplicated or misplaced.

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 8c329b9 into main Dec 26, 2025
5 of 6 checks passed
@ArgoZhang ArgoZhang deleted the dev-search branch December 26, 2025 03:17
Copy link
Copy Markdown
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:

  • The OnClick attributes in the new MoreButtonDropdownTemplate (e.g., OnClick="@(() => OnAction(context, "Action1"))") will not compile due to nested double quotes; switch the inner string literals to single quotes or escape the quotes.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The `OnClick` attributes in the new `MoreButtonDropdownTemplate` (e.g., `OnClick="@(() => OnAction(context, "Action1"))"`) will not compile due to nested double quotes; switch the inner string literals to single quotes or escape the quotes.

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
Copy Markdown

codecov Bot commented Dec 26, 2025

Codecov Report

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

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #7427   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          748       748           
  Lines        32798     32798           
  Branches      4551      4551           
=========================================
  Hits         32798     32798           
Flag Coverage Δ
BB 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
Copy Markdown
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 PR adds documentation for the Table component's ShowMoreButton feature by introducing a new demo section with bilingual (English and Chinese) documentation.

  • Adds localization entries for ShowMoreButton documentation in both zh-CN and en-US locales
  • Relocates the MoreButtonDropdownTemplate demo from TablesSearch to TablesColumn component for better organization
  • Includes supporting code (ToastService injection and OnAction method) to demonstrate the feature functionality

Reviewed changes

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

Show a summary per file
File Description
src/BootstrapBlazor.Server/Locales/zh-CN.json Adds Chinese localization strings for ShowMoreButton documentation
src/BootstrapBlazor.Server/Locales/en-US.json Adds English localization strings for ShowMoreButton documentation
src/BootstrapBlazor.Server/Components/Samples/Table/TablesSearch.razor.cs Removes ToastService and OnAction method (relocated to TablesColumn)
src/BootstrapBlazor.Server/Components/Samples/Table/TablesSearch.razor Removes MoreButtonDropdownTemplate demo (relocated to TablesColumn)
src/BootstrapBlazor.Server/Components/Samples/Table/TablesColumn.razor.cs Adds ToastService injection and OnAction method to support the new demo
src/BootstrapBlazor.Server/Components/Samples/Table/TablesColumn.razor Adds comprehensive ShowMoreButton demo section with code examples

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

doc(Table): update ShowMoreButton documentation

2 participants