Skip to content

feat(Editor): support ShowLabel parameter#655

Merged
ArgoZhang merged 2 commits intomasterfrom
dev-summer
Nov 7, 2025
Merged

feat(Editor): support ShowLabel parameter#655
ArgoZhang merged 2 commits intomasterfrom
dev-summer

Conversation

@ArgoZhang
Copy link
Copy Markdown
Member

@ArgoZhang ArgoZhang commented Nov 7, 2025

Link issues

fixes #654

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

Enable conditional label rendering in the Editor component by switching its base class and removing redundant value parameters.

New Features:

  • Support ShowLabel and ShowLabelTooltip parameters on Editor to conditionally display a BootstrapLabel.

Enhancements:

  • Have Editor inherit from ValidateBase instead of BootstrapModuleComponentBase to unify value and validation handling
  • Remove explicit Value, ValueChanged, and OnValueChanged parameters from Editor now provided by the base class

Copilot AI review requested due to automatic review settings November 7, 2025 07:29
@bb-auto bb-auto Bot added the enhancement New feature or request label Nov 7, 2025
@bb-auto bb-auto Bot added this to the v9.2.0 milestone Nov 7, 2025
@sourcery-ai
Copy link
Copy Markdown

sourcery-ai Bot commented Nov 7, 2025

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Enhanced the Editor component by migrating its base class to ValidateBase to support the ShowLabel parameter with built-in label rendering and cleaning up legacy binding parameters.

Class diagram for updated Editor component inheritance and parameters

classDiagram
    class Editor {
        +bool IsShowLabel
        +bool Required
        +string? DisplayText
        +string? Id
        +string? PlaceHolder
        +string? EditClassString
        +string? LanguageUrl
        +bool ShowLabelTooltip
        +Dictionary<string, object>? AdditionalAttributes
        +bool ShowSubmitString
    }
    class ValidateBase~string~ {
    }
    Editor --|> ValidateBase~string~
Loading

File-Level Changes

Change Details Files
Introduce ShowLabel support and migrate to ValidateBase
  • Changed base class from BootstrapModuleComponentBase to ValidateBase
  • Added conditional BootstrapLabel rendering using IsShowLabel, Required, ShowLabelTooltip, and DisplayText
  • Injected label markup above the editor div when ShowLabel is enabled
Editor.razor
Remove legacy two-way binding parameters
  • Removed the Value parameter
  • Removed the ValueChanged EventCallback
  • Removed the OnValueChanged callback delegate
Editor.razor.cs

Assessment against linked issues

Issue Objective Addressed Explanation
#654 Add support for a ShowLabel parameter to the Editor component, enabling conditional display of a label.

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 8790060 into master Nov 7, 2025
5 of 6 checks passed
@ArgoZhang ArgoZhang deleted the dev-summer branch November 7, 2025 07:30
Copy link
Copy Markdown

@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 there - 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.

@ArgoZhang ArgoZhang review requested due to automatic review settings March 23, 2026 22:47
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(Editor): support ShowLabel parameter

1 participant