feat: Add multi-input and range filter components #98
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.
Overview
This PR adds two new filter components to enhance filtering capabilities in the ember-ui library:
New Components
Filter::MultiInput
A filter component that allows users to add multiple free-text values as tags, outputting a comma-delimited string.
Features:
TagInputcomponent (ember-tag-input) for tag-based input"value1,value2,value3"Usage Example:
Filter::Range
A filter component for numeric range filtering with dual sliders and numeric inputs.
Features:
"min,max"Usage Example:
Implementation Details
Component Structure
Both components follow the established filter component pattern:
onChangecallback for value updatesonClearcallback for reset functionalityStyling
Added comprehensive CSS styling in
addon/styles/layout/next.css:Filter::MultiInput:
filter-stringstylingFilter::Range:
Integration
Both components integrate seamlessly with:
FiltersPickercomponentLayout::Resource::TabularcomponentFiles Changed
New Files:
addon/components/filter/multi-input.jsaddon/components/filter/multi-input.hbsaddon/components/filter/range.jsaddon/components/filter/range.hbsapp/components/filter/multi-input.js(re-export)app/components/filter/range.js(re-export)Modified Files:
addon/styles/layout/next.css- Added styling for both componentsTesting
Both components have been tested with:
Benefits
Backward Compatibility
✅ No breaking changes
✅ Adds new optional filter components
✅ Existing filters continue to work unchanged
✅ Follows established component patterns