Add promise support on filters #648

Open
gabskoro wants to merge 1 commits from infinum/feature/filters-as-promise into development
gabskoro commented 2017-02-28 08:57:42 +00:00 (Migrated from github.com)

Sometimes you need to do something more in your filter function (will send you another PR for that) and because of that, it would be better to have the isValid method wrapped in a Promise.

There si one catch, cause of the variable this._failFilterIndex we need to resolve each time, so for the users who will use promises they always need to resolve, either with true or false.

Sometimes you need to do something more in your filter function (will send you another PR for that) and because of that, it would be better to have the isValid method wrapped in a Promise. There si one catch, cause of the variable `this._failFilterIndex` we need to resolve each time, so for the users who will use promises they always need to resolve, either with true or false.
codecov-io commented 2017-02-28 09:01:50 +00:00 (Migrated from github.com)

Codecov Report

Merging #648 into development will increase coverage by 17.27%.
The diff coverage is 27.27%.

Impacted file tree graph

@@               Coverage Diff                @@
##           development     #648       +/-   ##
================================================
+ Coverage        33.08%   50.36%   +17.27%     
================================================
  Files               10       10               
  Lines              547      554        +7     
  Branches            70       75        +5     
================================================
+ Hits               181      279       +98     
+ Misses             363      274       -89     
+ Partials             3        1        -2
Impacted Files Coverage Δ
src/file-upload/file-uploader.class.ts 39.7% <27.27%> (+14.51%) ⬆️
src/file-upload/file-item.class.ts 27.27% <0%> (+5.05%) ⬆️
scripts/matchers.ts 57.14% <0%> (+14.28%) ⬆️
src/file-upload/file-like-object.class.ts 47.36% <0%> (+15.78%) ⬆️
src/file-upload/file-type.class.ts 53.84% <0%> (+30.76%) ⬆️
src/file-upload/file-select.directive.ts 95.45% <0%> (+40.9%) ⬆️
src/file-upload/file-drop.directive.ts 87.03% <0%> (+49.3%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cf12851...44d8043. Read the comment docs.

# [Codecov](https://codecov.io/gh/valor-software/ng2-file-upload/pull/648?src=pr&el=h1) Report > Merging [#648](https://codecov.io/gh/valor-software/ng2-file-upload/pull/648?src=pr&el=desc) into [development](https://codecov.io/gh/valor-software/ng2-file-upload/commit/cf12851e1d910a693c2429052815f6520806681e?src=pr&el=desc) will **increase** coverage by `17.27%`. > The diff coverage is `27.27%`. [![Impacted file tree graph](https://codecov.io/gh/valor-software/ng2-file-upload/pull/648/graphs/tree.svg?src=pr&height=150&width=650&token=P8ngsZQolN)](https://codecov.io/gh/valor-software/ng2-file-upload/pull/648?src=pr&el=tree) ```diff @@ Coverage Diff @@ ## development #648 +/- ## ================================================ + Coverage 33.08% 50.36% +17.27% ================================================ Files 10 10 Lines 547 554 +7 Branches 70 75 +5 ================================================ + Hits 181 279 +98 + Misses 363 274 -89 + Partials 3 1 -2 ``` | [Impacted Files](https://codecov.io/gh/valor-software/ng2-file-upload/pull/648?src=pr&el=tree) | Coverage Δ | | |---|---|---| | [src/file-upload/file-uploader.class.ts](https://codecov.io/gh/valor-software/ng2-file-upload/pull/648?src=pr&el=tree#diff-c3JjL2ZpbGUtdXBsb2FkL2ZpbGUtdXBsb2FkZXIuY2xhc3MudHM=) | `39.7% <27.27%> (+14.51%)` | :arrow_up: | | [src/file-upload/file-item.class.ts](https://codecov.io/gh/valor-software/ng2-file-upload/pull/648?src=pr&el=tree#diff-c3JjL2ZpbGUtdXBsb2FkL2ZpbGUtaXRlbS5jbGFzcy50cw==) | `27.27% <0%> (+5.05%)` | :arrow_up: | | [scripts/matchers.ts](https://codecov.io/gh/valor-software/ng2-file-upload/pull/648?src=pr&el=tree#diff-c2NyaXB0cy9tYXRjaGVycy50cw==) | `57.14% <0%> (+14.28%)` | :arrow_up: | | [src/file-upload/file-like-object.class.ts](https://codecov.io/gh/valor-software/ng2-file-upload/pull/648?src=pr&el=tree#diff-c3JjL2ZpbGUtdXBsb2FkL2ZpbGUtbGlrZS1vYmplY3QuY2xhc3MudHM=) | `47.36% <0%> (+15.78%)` | :arrow_up: | | [src/file-upload/file-type.class.ts](https://codecov.io/gh/valor-software/ng2-file-upload/pull/648?src=pr&el=tree#diff-c3JjL2ZpbGUtdXBsb2FkL2ZpbGUtdHlwZS5jbGFzcy50cw==) | `53.84% <0%> (+30.76%)` | :arrow_up: | | [src/file-upload/file-select.directive.ts](https://codecov.io/gh/valor-software/ng2-file-upload/pull/648?src=pr&el=tree#diff-c3JjL2ZpbGUtdXBsb2FkL2ZpbGUtc2VsZWN0LmRpcmVjdGl2ZS50cw==) | `95.45% <0%> (+40.9%)` | :arrow_up: | | [src/file-upload/file-drop.directive.ts](https://codecov.io/gh/valor-software/ng2-file-upload/pull/648?src=pr&el=tree#diff-c3JjL2ZpbGUtdXBsb2FkL2ZpbGUtZHJvcC5kaXJlY3RpdmUudHM=) | `87.03% <0%> (+49.3%)` | :arrow_up: | ------ [Continue to review full report at Codecov](https://codecov.io/gh/valor-software/ng2-file-upload/pull/648?src=pr&el=continue). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta) > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://codecov.io/gh/valor-software/ng2-file-upload/pull/648?src=pr&el=footer). Last update [cf12851...44d8043](https://codecov.io/gh/valor-software/ng2-file-upload/pull/648?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin infinum/feature/filters-as-promise:infinum/feature/filters-as-promise
git checkout infinum/feature/filters-as-promise
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: dc/ng2-file-upload#648