-
-
Notifications
You must be signed in to change notification settings - Fork 363
feat(BootstrapBlazorOptions): add IsPopover parameter #6862
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Reviewer's GuideThis PR introduces a new global IsPopover flag in BootstrapBlazorOptions and wires it into popover-based input components by injecting the options and merging the default when parameters are set, with accompanying configuration and a minor documentation fix. Entity relationship diagram for BootstrapBlazorOptions configurationerDiagram
BOOTSTRAP_BLAZOR_OPTIONS {
bool IsPopover
int ToastDelay
int MessageDelay
int SwalDelay
}
APPSETTINGS {
BOOTSTRAP_BLAZOR_OPTIONS
}
APPSETTINGS_DEVELOPMENT {
BOOTSTRAP_BLAZOR_OPTIONS
}
APPSETTINGS ||--|| BOOTSTRAP_BLAZOR_OPTIONS : contains
APPSETTINGS_DEVELOPMENT ||--|| BOOTSTRAP_BLAZOR_OPTIONS : contains
File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this 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 a new IsPopover parameter to the BootstrapBlazorOptions class to globally control the default behavior of popover components. This provides a centralized configuration option for enabling/disabling popover mode across Select and AutoComplete components.
Key changes:
- Added
IsPopoverboolean property toBootstrapBlazorOptionswith default value of false - Updated Select and AutoComplete components to use the global configuration as a fallback
- Fixed spelling error in documentation comment
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| BootstrapBlazorOptions.cs | Added new IsPopover property with XML documentation |
| SimpleSelectBase.cs | Fixed spelling error in comment from "instrance" to "instance" |
| PopoverSelectBase.cs | Added dependency injection and logic to use global IsPopover setting |
| PopoverCompleteBase.cs | Added dependency injection and logic to use global IsPopover setting |
| BootstrapBlazor.csproj | Updated version from beta01 to beta02 |
| appsettings.json | Added default IsPopover configuration |
| appsettings.Development.json | Added default IsPopover configuration |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this 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 - here's some feedback:
- Using '|=' to combine option default and component parameter can prevent explicitly setting IsPopover to false; consider only applying the option default when the component parameter hasn't been explicitly set.
- To avoid naming confusion between the global option and the component parameter, consider renaming BootstrapBlazorOptions.IsPopover to DefaultIsPopover or similar.
- Injecting IOptions in each base class could be centralized by introducing a shared base or helper to reduce duplication.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Using '|=' to combine option default and component parameter can prevent explicitly setting IsPopover to false; consider only applying the option default when the component parameter hasn't been explicitly set.
- To avoid naming confusion between the global option and the component parameter, consider renaming BootstrapBlazorOptions.IsPopover to DefaultIsPopover or similar.
- Injecting IOptions<BootstrapBlazorOptions> in each base class could be centralized by introducing a shared base or helper to reduce duplication.
## Individual Comments
### Comment 1
<location> `src/BootstrapBlazor/Components/Select/SimpleSelectBase.cs:16-18` </location>
<code_context>
public abstract class SimpleSelectBase<TValue> : SelectBase<TValue>
{
/// <summary>
- /// Gets virtualize component instrance
+ /// Gets virtualize component instance
/// </summary>
[NotNull]
</code_context>
<issue_to_address>
**nitpick (typo):** Typo corrected in comment: 'instrance' to 'instance'.
```suggestion
/// <summary>
/// Gets virtualize component instance
/// </summary>
```
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6862 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 739 739
Lines 31758 31763 +5
Branches 4466 4466
=========================================
+ Hits 31758 31763 +5
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:
|
Link issues
fixes #6861
Summary By Copilot
Regression?
Risk
Verification
Packaging changes reviewed?
☑️ Self Check before Merge
Summary by Sourcery
Support a global configuration flag for enabling popover behavior on select and autocomplete components and update default settings accordingly
New Features:
Enhancements: