refactor(Select): redesign IsFixedSearch UI layout#5635
Merged
Conversation
Contributor
Reviewer's Guide by SourceryThis pull request introduces a new Updated class diagram for the Select componentclassDiagram
class Select {
+bool IsFixedSearch
+bool IsEditable
+bool IsClearable
+RenderFragment Options
+RenderFragment DisplayTemplate
+bool IsVirtualize
+float RowHeight
+int OverscanCount
+string DefaultVirtualizeItemText
+Func~Task~ OnClearAsync
+bool DisableItemChangedWhenFirstRender
+IEnumerable~SelectedItem~ Items
+RenderFragment~SelectedItem~ ItemTemplate
+Func~SelectedItem, Task~bool~~ OnBeforeSelectedItemChange
+Func~SelectedItem, Task~ OnSelectedItemChanged
+SwalCategory SwalCategory
+string SwalTitle
+string SwalContent
+string SwalFooter
+object LookupServiceData
+Func~VirtualizeQueryOption, Task~QueryData~SelectedItem~~~ OnQueryAsync
}
File-Level Changes
Assessment against linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Contributor
There was a problem hiding this comment.
Hey @ArgoZhang - I've reviewed your changes - here's some feedback:
Overall Comments:
- Consider adding a CSS class to control the visibility of the search input, instead of using the
showclass directly. - The
dropdown-menu-bodyclass in the SCSS file could be more generic and reusable.
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
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5635 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 653 653
Lines 29342 29343 +1
Branches 4180 4182 +2
=========================================
+ Hits 29342 29343 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Link issues
fixes #5634
Summary By Copilot
This pull request introduces a new feature to the
Selectcomponent, allowing the search box to be fixed within the dropdown. The changes include updates to the component's Razor and C# files, as well as localization files.New Feature: Fixed Search Box in Dropdown
Component Updates:
src/BootstrapBlazor/Components/Select/Select.razor: Added support for theIsFixedSearchproperty to conditionally render the fixed search box within the dropdown menu. [1] [2] [3]src/BootstrapBlazor/Components/Select/Select.razor.cs: Introduced theIsFixedSearchproperty and updated related methods and properties to support the fixed search box functionality. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]Sample Component Updates:
src/BootstrapBlazor.Server/Components/Samples/Selects.razor: Added UI elements and bindings for theIsFixedSearchproperty in the sample component to demonstrate the new feature.src/BootstrapBlazor.Server/Components/Samples/Selects.razor.cs: Added a new private field_isFixedSearchto manage the state of theIsFixedSearchproperty in the sample component.Localization Updates:
src/BootstrapBlazor.Server/Locales/en-US.json: Added localization strings for theIsFixedSearchproperty and updated the introduction text for the search box feature. [1] [2]src/BootstrapBlazor.Server/Locales/zh-CN.json: Added localization strings for theIsFixedSearchproperty and updated the introduction text for the search box feature in Chinese. [1] [2]Regression?
Risk
Verification
Packaging changes reviewed?
☑️ Self Check before Merge
Summary by Sourcery
Adds the ability to fix the search box within the dropdown of the Select component. This change introduces a new IsFixedSearch property to control the search box's position.
New Features: