-
-
Notifications
You must be signed in to change notification settings - Fork 120
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
fix(backend): oData queries with input filter #656
Conversation
Codecov Report
@@ Coverage Diff @@
## master #656 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 154 154
Lines 10392 10397 +5
Branches 3664 3668 +4
=========================================
+ Hits 10392 10397 +5
Continue to review full report at Codecov.
|
src/app/modules/angular-slickgrid/services/grid-odata.service.ts
Outdated
Show resolved
Hide resolved
src/app/modules/angular-slickgrid/services/grid-odata.service.ts
Outdated
Show resolved
Hide resolved
Wow I rarely get good PRs like yours, incredible job there, I took a quick glance at it and left couple of comments. BTW I'm in Canada (Montreal) and we use both metrics and US system because we are close to them, so yes I understand the pain of having to handle different decimal separator. Also it looks like adding the switch/case was nice but now codecov reports a missing line coverage, I really wish to keep my 100% coverage since I worked really hard on achieving it, so if you have a way to add the missing line coverage, that would be great. Now it looks like I have to do in also replicating some of that code in my GraphQL implementation. Again thanks for this great contribution and yes I will only merge it after in January 😉 |
Pardonnez moi :) - I did look at the coverage before creating the PR, but I somehow missed it. I'll fix this for sure! |
Pas de problème ;) Codecov checks slightly more than Jest (istanbul) coverage, so it happens sometime that it shows 100% in Jest but in reality it's missing a line or 2, that most often happens in switch/case. |
src/app/modules/angular-slickgrid/services/__tests__/grid-odata.service.spec.ts
Outdated
Show resolved
Hide resolved
I've reviewed the PR while applying the changes to the GraphQL Service too (in my other lib that is) and apart from the test description rename it seems all good. There's also still 1 line of coverage missing, if you could change 2 of the I'll be ready for a merge after that Happy New Year 🍾 |
src/app/modules/angular-slickgrid/services/__tests__/grid-odata.service.spec.ts
Outdated
Show resolved
Hide resolved
src/app/modules/angular-slickgrid/services/__tests__/grid-odata.service.spec.ts
Show resolved
Hide resolved
@jr01 |
Hi @ghiscoding - I've done the changes you requested. Happy new year! 😃 |
Excellent, expect a week or two before a new version, I got a few PRs to look into |
* Improved escaping/normalizing search terms for string/text/readonly fields. * Invalid characters from integer/float/number fields with string search terms are now removed. * Added support for range filter `..` to function without an upper bound. When for example `2..` is input then `field GE 2` or `field GT 2` is send to the backend, depending on the `defaultFilterRangeOperator` * Added support for range filter `..` to function without a lower bound. When for example `..2` is input `field LE 2` or `field LT 2` is send, depending on the `defaultFilterRangeOperator` - ref issue #656
As per some discussions in this PR, I also made this PR #660 to export all Editors, Filters & Formatters as Public. So you'll be able to Thanks for the feedback (and contribution), it helps to improve the lib 😉 Oh I have also applied your OData changes to the GraphQL Service as well in PR #659 which is also great 😄 ... and I will report back when the new release is out |
@jr01 I just realized that I might have forgot to inform that this was released last month, in the meantime I just released another version 2.26.0 today. Cheers and thanks again for contributions. 🍻 |
@ghiscoding - you informed me here #650 (comment) . |
@ghiscoding there is absolutely no rush to get this out, so please leave this until after your holiday :) And I'm of course more than happy to change things.
Fixes #650 and more:
decimalInputSeparators
filter param for integer/float/number field searching. For example, in the Netherlands (NL) users are accustomed to both typing 10.23 or 10,23 when searching for numbers. The reason is the ',' is the decimal separator in NL and commonly the (physical) 'en-US' keyboard is used which has a '.' on the numeric keypad...
to function without an upper bound. When for example2..
is input thenfield ge 2
orfield gt 2
is send to the backend, depending on thedefaultFilterRangeOperator
..
to function without a lower bound. When for example..2
is inputfield le 2
orfield lt 2
is send, depending on thedefaultFilterRangeOperator