-
-
Notifications
You must be signed in to change notification settings - Fork 363
feat(IErrorLogger): redesign parameter data type #6132
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 refactors the ErrorLogger feature to use nullable parameters with fallback to global configuration, simplifies the Layout component by removing duplicate option injections, and updates related interface definitions and tests accordingly. Sequence Diagram: ErrorLogger Option Resolution LogicsequenceDiagram
participant EL as ErrorLogger
participant OptsMon as "IOptionsMonitor<BootstrapBlazorOptions>"
participant OptsVal as "BootstrapBlazorOptions.CurrentValue"
EL->>EL: Read local EnableErrorLogger (bool?)
alt local EnableErrorLogger is not null
EL->>EL: Set _enableErrorLogger = local value
else local EnableErrorLogger is null
EL->>OptsMon: Get CurrentValue
OptsMon-->>OptsVal: options instance
EL->>OptsVal: Read EnableErrorLogger property
OptsVal-->>EL: globalEnableErrorLogger (bool)
EL->>EL: Set _enableErrorLogger = global value
end
EL->>EL: Read local ShowToast (bool?)
alt local ShowToast is not null
EL->>EL: Set _showToast = local value
else local ShowToast is null
EL->>OptsMon: Get CurrentValue
OptsMon-->>OptsVal: options instance
EL->>OptsVal: Read ShowErrorLoggerToast property
OptsVal-->>EL: globalShowToast (bool)
EL->>EL: Set _showToast = global value
end
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.
Hey @ArgoZhang - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟡 General issues: 1 issue found
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
| [Inject] | ||
| [NotNull] | ||
| private IOptionsMonitor<BootstrapBlazorOptions>? Options { get; set; } |
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.
suggestion: Consider making the injected Options property non-nullable
You can remove the '?' from IOptionsMonitor since [NotNull] ensures it won't be null.
| [Inject] | |
| [NotNull] | |
| private IOptionsMonitor<BootstrapBlazorOptions>? Options { get; set; } | |
| [Inject] | |
| [NotNull] | |
| private IOptionsMonitor<BootstrapBlazorOptions> Options { get; set; } |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #6132 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 703 703
Lines 31073 31073
Branches 4397 4397
=========================================
Hits 31073 31073 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Link issues
fixes #6131
Summary By Copilot
Regression?
Risk
Verification
Packaging changes reviewed?
☑️ Self Check before Merge
Summary by Sourcery
Redesign error-logging parameters to support nullable values and fallback to global configuration settings
Enhancements: