-
-
Notifications
You must be signed in to change notification settings - Fork 363
feat(Search): redesign OnClear parameter #5929
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 pull request refactors the 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 redesigns the OnClear parameter for the Search component, removing the string parameter in favor of a parameterless function to simplify the callback signature. Key changes include:
- Updating the OnClear callback signature in Search.razor.cs and corresponding test and sample code.
- Adjusting the OnClearClick behavior by replacing explicit reset logic with a call to OnSearchClick.
- Modifying the cascading value update in EditorForm.razor by changing IsFixed from true to false.
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| test/UnitTest/Components/SearchTest.cs | Updated lambda signature to match the new parameterless OnClear callback. |
| src/BootstrapBlazor/Components/Search/Search.razor.cs | Revised OnClear property signature and refactored OnClearClick to call OnClear without parameters and trigger search updates. |
| src/BootstrapBlazor/Components/EditorForm/EditorForm.razor | Changed CascadingValue.IsFixed from true to false, potentially affecting UI update behavior. |
| src/BootstrapBlazor.Server/Components/Samples/Searches.razor.cs | Removed obsolete OnClear method. |
| src/BootstrapBlazor.Server/Components/Samples/Searches.razor | Removed OnClear callback from component usage. |
| src/BootstrapBlazor.Server/Components/Pages/Coms.razor.cs | Updated OnClear method signature to be parameterless. |
Comments suppressed due to low confidence (2)
src/BootstrapBlazor/Components/Search/Search.razor.cs:232
- The explicit clearing of the search filter state (_filterItems) has been removed in OnClearClick. Confirm that calling OnSearchClick fully resets the search state as intended.
await OnClear();
src/BootstrapBlazor/Components/EditorForm/EditorForm.razor:6
- [nitpick] Changing IsFixed from true to false may lead to more frequent updates of the cascading context. Verify that this change is intended for dynamic context updates.
<CascadingValue Value="@_editorItems" IsFixed="false">
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.
We encountered an error and are unable to review this PR. We have been notified and are working to fix it.
You can try again by commenting this pull request with @sourcery-ai review, or contact us for help.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5929 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 665 665
Lines 30485 30485
Branches 4345 4345
=========================================
Hits 30485 30485 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Co-Authored-By: zpmzuus <[email protected]>
# Conflicts: # src/BootstrapBlazor/BootstrapBlazor.csproj
* refactor: 移除 RenderTemplate 提高性能 * refactor: 重构清空逻辑 * doc: 更新示例 * test: 更新单元测试 * chore: bump version 9.5.13 * chore: bump version 6.0 Co-Authored-By: zpmzuus <[email protected]> --------- Co-authored-by: zpmzuus <[email protected]>
Link issues
fixes #5928
Summary By Copilot
Regression?
Risk
Verification
Packaging changes reviewed?
☑️ Self Check before Merge
Summary by Sourcery
Redesign the OnClear parameter for the Search component to simplify its usage and improve its behavior
New Features:
Bug Fixes:
Enhancements: