-
Notifications
You must be signed in to change notification settings - Fork 5
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
feat: Configurable operators for free text filtering in property filter #70
feat: Configurable operators for free text filtering in property filter #70
Conversation
65d7eb6
to
c196ed1
Compare
@@ -101,17 +101,35 @@ describe('free text tokens', () => { | |||
|
|||
expect(processed).toEqual([items[2], items[3]]); | |||
}); | |||
test('do not filter by a property, which does not support the operator of the token', () => { |
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.
The change looks good overall but I would also keep the original test to verify the free-text filtering returns false (and true for negated) when matching properties that do not have the corresponding operator. For example, if using the :
operator but the property only defines =
, !=
, the property must not be matched.
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.
Oh sorry, I meant to comment on the PR for this and forgot. The current code today has this test duplicated, down to every character. Looks like a forgotten copy-paste.
So yes, the test you're asking for is still here, lines 92 to 103. 😅
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #70 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 14 14
Lines 452 455 +3
Branches 159 160 +1
=========================================
+ Hits 452 455 +3 ☔ View full report in Codecov by Sentry. |
c196ed1
to
48e4348
Compare
I just clicked the Rebase button to confirm there were no conflicts, before I log off tonight. No conflicts at all, we're good. 👍 |
Description of changes: Adding the ability to customize free text filtering operators for the Property Filter, just like every other property operator.
See: k6RfAb8hHR1t
Prototyping this quickly showed the agreed upon API was a perfect 1:1 match for this package, and the change was small enough to jump straight to PR.
Corresponding code change on
@cloudscape-design/components
has a first prototype here, pending new unit tests and probably more dev app updates. But I can't submit a clean PR for it until this PR is merged given the direct dependency.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.