feat(Table): add MoreButtonText/Color parameter#7429
Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideAdds configurable text and color parameters for the table row "More" dropdown button, wires them into rendering and localization, and updates demos and localization resources accordingly. Sequence diagram for resolving MoreButtonText and rendering DropdownsequenceDiagram
actor Developer
participant Table_TItem as Table_TItem
participant Localizer as Localizer
participant Dropdown as Dropdown
Developer->>Table_TItem: Set parameters (MoreButtonColor, MoreButtonText)
activate Table_TItem
Table_TItem->>Table_TItem: OnInitLocalization()
alt MoreButtonText is null
Table_TItem->>Localizer: Get(nameof(MoreButtonText))
Localizer-->>Table_TItem: localized text
Table_TItem->>Table_TItem: MoreButtonText = localized text
else MoreButtonText is provided
Table_TItem->>Table_TItem: Keep provided MoreButtonText
end
Table_TItem-->>Developer: Parameters initialized
deactivate Table_TItem
Developer->>Table_TItem: Render table row more button
activate Table_TItem
Table_TItem->>Dropdown: Create with Color = MoreButtonColor
Table_TItem->>Dropdown: Set FixedButtonText = MoreButtonText
Table_TItem-->>Developer: Rendered more button dropdown
deactivate Table_TItem
Class diagram for updated Table more button customizationclassDiagram
class Table_TItem {
+bool ShowMoreButton
+Color MoreButtonColor
+string MoreButtonText
+RenderFragment_TItem MoreButtonDropdownTemplate
+RenderFragment_TItem RenderMoreButton
+void OnInitLocalization()
}
class Dropdown {
+Color Color
+bool IsFixedButtonText
+string FixedButtonText
+Size Size
+bool IsPopover
+string Icon
}
Table_TItem ..> Dropdown : uses RenderMoreButton
File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7429 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 748 748
Lines 32798 32801 +3
Branches 4551 4552 +1
=========================================
+ Hits 32798 32801 +3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR adds customizable MoreButtonText and MoreButtonColor parameters to the Table component, allowing developers to override the default "More" button text and color. The changes replace the previously hardcoded text value with a localizable parameter and introduce color customization.
- Adds
MoreButtonTextparameter with localization support for Chinese and English - Adds
MoreButtonColorparameter with default value ofColor.Secondary - Updates documentation and demo samples to showcase the new parameters
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/BootstrapBlazor/Locales/zh.json | Adds Chinese localization for "MoreButtonText" |
| src/BootstrapBlazor/Locales/en.json | Adds English localization for "MoreButtonText" |
| src/BootstrapBlazor/Components/Table/Table.razor.Localization.cs | Initializes MoreButtonText with localized value |
| src/BootstrapBlazor/Components/Table/Table.razor.Edit.cs | Defines MoreButtonText and MoreButtonColor parameters; removes BOM character |
| src/BootstrapBlazor/Components/Table/Table.razor | Updates Dropdown to use new parameters instead of hardcoded values |
| src/BootstrapBlazor/BootstrapBlazor.csproj | Increments version to 10.1.5-beta03; adds BOM character |
| src/BootstrapBlazor.Server/Locales/zh-CN.json | Adds Chinese documentation text for new parameters |
| src/BootstrapBlazor.Server/Locales/en-US.json | Adds English documentation text for new parameters |
| src/BootstrapBlazor.Server/Components/Samples/Table/TablesColumn.razor | Updates demo documentation to describe new parameters |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Link issues
fixes #7428
Summary By Copilot
Regression?
Risk
Verification
Packaging changes reviewed?
☑️ Self Check before Merge
Summary by Sourcery
Add configurable text and color parameters for the table row "More" action button and wire them into localization and samples.
New Features:
Enhancements:
Documentation: