Skip to content

doc(MethodTable): remove MethodTable component#7580

Merged
ArgoZhang merged 1 commit intomainfrom
doc-method
Jan 25, 2026
Merged

doc(MethodTable): remove MethodTable component#7580
ArgoZhang merged 1 commit intomainfrom
doc-method

Conversation

@ArgoZhang
Copy link
Member

@ArgoZhang ArgoZhang commented Jan 25, 2026

Link issues

fixes #7579

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

Remove the MethodTable documentation component and its usages from sample pages while simplifying related sample code.

Enhancements:

  • Delete the MethodTable component and its backing code-behind files from the samples project.
  • Remove method/event metadata helper methods (GetMethods/GetEvents/GetMethodAttributes/GetEvents, etc.) that existed solely to feed MethodTable across multiple sample components.
  • Tidy up sample components by updating some XML documentation to use , removing redundant comments, and making minor formatting cleanups.
  • Make ValidateForms sample more robust by null-checking FooForm and ComplexForm before calling SetError.

Copilot AI review requested due to automatic review settings January 25, 2026 05:34
@bb-auto bb-auto bot added the documentation Improvements or additions to documentation label Jan 25, 2026
@bb-auto bb-auto bot added this to the v10.2.0 milestone Jan 25, 2026
@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Jan 25, 2026

Reviewer's Guide

Removes the MethodTable documentation component from sample pages and their code-behind helpers, cleans up some sample component comments, and adds minor safety fixes to form validation demos.

File-Level Changes

Change Details Files
Remove MethodTable usage from all sample Razor pages and their supporting helper methods.
  • Deleted all <MethodTable ...> usages from sample .razor files (Buttons, Captchas, JSRuntimeExtensions, Charts Index, DragDrops, ListViews, Mermaids, Tabs, Translators, ValidateForms, Ajaxs, Clipboards, BrowserFingers).
  • Removed corresponding GetMethods/GetEvents helper methods and related MethodItem/EventItem arrays from the associated .razor.cs code-behind files.
  • Deleted the shared MethodTable component implementation files from the Components/Components folder.
src/BootstrapBlazor.Server/Components/Samples/BrowserFingers.razor
src/BootstrapBlazor.Server/Components/Samples/Clipboards.razor
src/BootstrapBlazor.Server/Components/Samples/Ajaxs.razor
src/BootstrapBlazor.Server/Components/Samples/Buttons.razor
src/BootstrapBlazor.Server/Components/Samples/Captchas.razor
src/BootstrapBlazor.Server/Components/Samples/JSRuntimeExtensions.razor
src/BootstrapBlazor.Server/Components/Samples/Charts/Index.razor
src/BootstrapBlazor.Server/Components/Samples/DragDrops.razor
src/BootstrapBlazor.Server/Components/Samples/ListViews.razor
src/BootstrapBlazor.Server/Components/Samples/Mermaids.razor
src/BootstrapBlazor.Server/Components/Samples/Tabs.razor
src/BootstrapBlazor.Server/Components/Samples/Translators.razor
src/BootstrapBlazor.Server/Components/Samples/ValidateForms.razor
src/BootstrapBlazor.Server/Components/Components/MethodTable.razor
src/BootstrapBlazor.Server/Components/Components/MethodTable.razor.cs
Tighten up sample component implementations after removing MethodTable, including minor safety and documentation adjustments.
  • Replaced explicit OnInitialized XML comments on some samples with to simplify documentation.
  • Removed redundant XML doc comments from various private handlers and helpers in sample code-behind files.
  • Made ValidateForms demo more defensive by null-checking FooForm and ComplexForm before calling SetError.
  • Minor whitespace/BOM normalization and markup spacing adjustments in sample Razor files.
src/BootstrapBlazor.Server/Components/Samples/DragDrops.razor.cs
src/BootstrapBlazor.Server/Components/Samples/ListViews.razor.cs
src/BootstrapBlazor.Server/Components/Samples/Captchas.razor.cs
src/BootstrapBlazor.Server/Components/Samples/Buttons.razor.cs
src/BootstrapBlazor.Server/Components/Samples/JSRuntimeExtensions.razor.cs
src/BootstrapBlazor.Server/Components/Samples/ValidateForms.razor.cs
src/BootstrapBlazor.Server/Components/Samples/BrowserFingers.razor
src/BootstrapBlazor.Server/Components/Samples/Clipboards.razor
src/BootstrapBlazor.Server/Components/Samples/Ajaxs.razor
src/BootstrapBlazor.Server/Components/Samples/JSRuntimeExtensions.razor
src/BootstrapBlazor.Server/Components/Samples/Charts/Index.razor
src/BootstrapBlazor.Server/Components/Samples/DragDrops.razor
src/BootstrapBlazor.Server/Components/Samples/ListViews.razor
src/BootstrapBlazor.Server/Components/Samples/Mermaids.razor
src/BootstrapBlazor.Server/Components/Samples/Tabs.razor
src/BootstrapBlazor.Server/Components/Samples/Translators.razor
src/BootstrapBlazor.Server/Components/Samples/ValidateForms.razor
src/BootstrapBlazor.Server/Locales/en-US.json
src/BootstrapBlazor.Server/Locales/zh-CN.json

Assessment against linked issues

Issue Objective Addressed Explanation
#7579 Remove all usages/references of the MethodTable component from sample and documentation Razor pages.
#7579 Remove the MethodTable component implementation from the codebase.

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 38ea0d9 into main Jan 25, 2026
6 of 7 checks passed
@ArgoZhang ArgoZhang deleted the doc-method branch January 25, 2026 05:34
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 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.

@codecov
Copy link

codecov bot commented Jan 25, 2026

Codecov Report

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

Additional details and impacted files
@@             Coverage Diff             @@
##             main     #7580      +/-   ##
===========================================
+ Coverage   99.98%   100.00%   +0.01%     
===========================================
  Files         749       749              
  Lines       32976     32976              
  Branches     4580      4580              
===========================================
+ Hits        32972     32976       +4     
+ Misses          3         0       -3     
+ Partials        1         0       -1     
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
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 removes the MethodTable component and its associated usage across the codebase as specified in issue #7579. The changes include deletion of the MethodTable component files, removal of all GetMethods() functions that populated the component, and cleanup of related localization entries. Additionally, some null-safety improvements and comment cleanups are included.

Changes:

  • Removed MethodTable component files (razor and code-behind)
  • Removed GetMethods() functions from 15 sample component files
  • Removed MethodTable localization entries from zh-CN.json and en-US.json
  • Added null-conditional operators for FooForm and ComplexForm in ValidateForms.razor.cs
  • Removed unused OnBeforeShowContextMenu method from Tabs.razor.cs
  • Cleaned up XML documentation comments in several files
  • Updated some comments to use <inheritdoc/> for better documentation

Reviewed changes

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

Show a summary per file
File Description
src/BootstrapBlazor.Server/Locales/zh-CN.json Removed Chinese localization for MethodTable component
src/BootstrapBlazor.Server/Locales/en-US.json Removed English localization for MethodTable component
src/BootstrapBlazor.Server/Components/Samples/ValidateForms.razor.cs Added null-conditional operators for defensive programming; removed GetMethods()
src/BootstrapBlazor.Server/Components/Samples/ValidateForms.razor Removed MethodTable usage
src/BootstrapBlazor.Server/Components/Samples/Translators.razor.cs Removed GetMethods() function
src/BootstrapBlazor.Server/Components/Samples/Translators.razor Removed MethodTable usage
src/BootstrapBlazor.Server/Components/Samples/Tabs.razor.cs Removed GetMethods() and unused OnBeforeShowContextMenu()
src/BootstrapBlazor.Server/Components/Samples/Tabs.razor Removed MethodTable usage
src/BootstrapBlazor.Server/Components/Samples/Mermaids.razor.cs Removed GetMethods() function
src/BootstrapBlazor.Server/Components/Samples/Mermaids.razor Removed MethodTable usage
src/BootstrapBlazor.Server/Components/Samples/ListViews.razor.cs Removed GetMethods(); updated comment to use inheritdoc
src/BootstrapBlazor.Server/Components/Samples/ListViews.razor Removed MethodTable usage
src/BootstrapBlazor.Server/Components/Samples/JSRuntimeExtensions.razor.cs Removed GetMethods() function
src/BootstrapBlazor.Server/Components/Samples/JSRuntimeExtensions.razor Removed MethodTable usage
src/BootstrapBlazor.Server/Components/Samples/DragDrops.razor.cs Removed GetMethods(); updated comment to use inheritdoc; removed XML doc comments from private methods
src/BootstrapBlazor.Server/Components/Samples/DragDrops.razor Removed MethodTable usage
src/BootstrapBlazor.Server/Components/Samples/Clipboards.razor.cs Removed GetMethods() function
src/BootstrapBlazor.Server/Components/Samples/Clipboards.razor Removed MethodTable usage
src/BootstrapBlazor.Server/Components/Samples/Charts/Index.razor.cs Removed GetMethodAttributes() function
src/BootstrapBlazor.Server/Components/Samples/Charts/Index.razor Removed MethodTable usage
src/BootstrapBlazor.Server/Components/Samples/Captchas.razor.cs Removed GetMethods() and GetEvents(); removed XML doc comments from private methods
src/BootstrapBlazor.Server/Components/Samples/Captchas.razor Removed both MethodTable and EventTable usage
src/BootstrapBlazor.Server/Components/Samples/Buttons.razor.cs Removed GetMethods() and GetEvents(); removed XML doc comment from private method
src/BootstrapBlazor.Server/Components/Samples/Buttons.razor Removed both MethodTable and EventTable usage
src/BootstrapBlazor.Server/Components/Samples/BrowserFingers.razor.cs Removed GetMethods() function
src/BootstrapBlazor.Server/Components/Samples/BrowserFingers.razor Removed MethodTable usage
src/BootstrapBlazor.Server/Components/Samples/Ajaxs.razor.cs Removed GetMethods() function
src/BootstrapBlazor.Server/Components/Samples/Ajaxs.razor Removed MethodTable usage
src/BootstrapBlazor.Server/Components/Components/MethodTable.razor.cs Deleted component code-behind file
src/BootstrapBlazor.Server/Components/Components/MethodTable.razor Deleted component markup file

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

@@ -157,7 +157,3 @@
</DemoBlock>

<AttributeTable Type="typeof(Button)" />
Copy link

Copilot AI Jan 25, 2026

Choose a reason for hiding this comment

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

This PR removes both EventTable and MethodTable references from this file. However, the PR title and linked issue #7579 only mention removing the MethodTable component. The removal of EventTable and the GetEvents method appears to be outside the scope of this PR. Consider either updating the PR description to reflect the additional changes or creating a separate PR for EventTable removals.

Copilot uses AI. Check for mistakes.
@@ -18,7 +18,3 @@
</DemoBlock>

<AttributeTable Type="typeof(Captcha)" />
Copy link

Copilot AI Jan 25, 2026

Choose a reason for hiding this comment

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

This PR removes both EventTable and MethodTable references from this file. However, the PR title and linked issue #7579 only mention removing the MethodTable component. The removal of EventTable and the GetEvents method appears to be outside the scope of this PR. Consider either updating the PR description to reflect the additional changes or creating a separate PR for EventTable removals.

Copilot uses AI. Check for mistakes.
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(MethodTable): remove MethodTable component

1 participant

Comments