Skip to content

feat(TreeViewToolbarEditButton): add Icon parameter#5647

Merged
ArgoZhang merged 2 commits intomainfrom
refact-treeview
Mar 17, 2025
Merged

feat(TreeViewToolbarEditButton): add Icon parameter#5647
ArgoZhang merged 2 commits intomainfrom
refact-treeview

Conversation

@ArgoZhang
Copy link
Copy Markdown
Member

@ArgoZhang ArgoZhang commented Mar 17, 2025

Link issues

fixes #5646

Summary By Copilot

This pull request includes updates to the BootstrapBlazor project, focusing on adding a new icon for the TreeViewToolbarEditButton component and updating its related files accordingly. The most important changes include modifying the project version, adding a new Icon parameter, and updating the icon mappings for different icon themes.

Version Update:

Component Enhancements:

Icon Theme Updates:

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

Adds an Icon parameter to the TreeViewToolbarEditButton component, allowing developers to customize the edit button's icon.

Enhancements:

  • Adds an Icon parameter to the TreeViewToolbarEditButton component for icon customization.
  • Updates the Icon property in the PopConfirmButton to use the new Icon parameter.
  • Sets a default icon for the TreeViewToolbarEditButton using the IIconTheme service if none is provided.
  • Maps the new TreeViewToolbarEditButton icon to different icons for Bootstrap, FontAwesome, and Material Design icon themes.
  • Increments project version to 9.5.0-beta01.

@bb-auto bb-auto bot added the enhancement New feature or request label Mar 17, 2025
@bb-auto bb-auto bot added this to the v9.4.0 milestone Mar 17, 2025
@sourcery-ai
Copy link
Copy Markdown
Contributor

sourcery-ai bot commented Mar 17, 2025

Reviewer's Guide by Sourcery

This pull request introduces a new Icon parameter to the TreeViewToolbarEditButton component, allowing for customization of the edit button's icon. It also updates the project version and adds icon mappings for different icon themes.

No diagrams generated as the changes look simple and do not need a visual representation.

File-Level Changes

Change Details Files
Introduced a new Icon parameter to the TreeViewToolbarEditButton component, allowing developers to customize the edit button's icon.
  • Added an Icon parameter to the TreeViewToolbarEditButton component.
  • Injected the IIconTheme service to provide a default icon if none is specified.
  • Updated the PopConfirmButton to use the new Icon parameter.
src/BootstrapBlazor/Components/TreeView/TreeViewToolbarEditButton.razor.cs
src/BootstrapBlazor/Components/TreeView/TreeViewToolbarEditButton.razor
Added a new TreeViewToolbarEditButton enum value to the ComponentIcons enum and mapped it to specific icons for Bootstrap, FontAwesome, and MaterialDesign icon themes.
  • Added TreeViewToolbarEditButton to the ComponentIcons enum.
  • Mapped TreeViewToolbarEditButton to 'bi bi-check2-square' in BootstrapIcons.
  • Mapped TreeViewToolbarEditButton to 'fa-regular fa-pen-to-square' in FontAwesomeIcons.
  • Mapped TreeViewToolbarEditButton to 'mdi mdi-file-edit-outline' in MaterialDesignIcons.
src/BootstrapBlazor/Enums/ComponentIcons.cs
src/BootstrapBlazor/Icons/BootstrapIcons.cs
src/BootstrapBlazor/Icons/FontAwesomeIcons.cs
src/BootstrapBlazor/Icons/MaterialDesignIcons.cs
Incremented the project version in the .csproj file.
  • Updated the project version from 9.4.9 to 9.5.0-beta01.
src/BootstrapBlazor/BootstrapBlazor.csproj

Assessment against linked issues

Issue Objective Addressed Explanation
#5646 Add an Icon parameter to the TreeViewToolbarEditButton component.

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!
  • Generate a plan of action for an issue: Comment @sourcery-ai plan on
    an issue to generate a plan of action for it.

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
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 @ArgoZhang - I've reviewed your changes - here's some feedback:

Overall Comments:

  • Consider adding a demo to showcase the new Icon parameter in the TreeViewToolbarEditButton component.
Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

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 Mar 17, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (4d0f444) to head (2f3a63b).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #5647   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          653       653           
  Lines        29387     29393    +6     
  Branches      4194      4195    +1     
=========================================
+ Hits         29387     29393    +6     

☔ 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.

@ArgoZhang ArgoZhang merged commit 3a7ffe4 into main Mar 17, 2025
6 checks passed
@ArgoZhang ArgoZhang deleted the refact-treeview branch March 17, 2025 02:35
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(TreeViewToolbarEditButton): add Icon parameter

1 participant