-
Notifications
You must be signed in to change notification settings - Fork 16
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
Return raw feature data from workers #225
Return raw feature data from workers #225
Conversation
This pull request has been linked to Shortcut Story #192546: Return raw feature data from workers. |
Pull Request Test Coverage Report for Build 1536090354
💛 - Coveralls |
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.
Nice work! Just minor suggestions :)
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.
LGTM, wait for double review before merge 🚀
Co-authored-by: Víctor Velarde <victor.velarde@gmail.com>
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.
Just small comments, but it looks like a nice approach to me. Remember to add a changelog and rebase master, please
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.
Nice job. 🚀
Story details: https://app.shortcut.com/cartoteam/story/192546
Possible questions
Why have you modified buildFeatureFilter fn?
It's a minor improvement to avoid calling Object.keys for each feature
Why that new applyFilters fn in core?
I think this can be used in advanced use cases.
Do you think that
sorting
might be part of core?I don't think so because it's just used in workers, and I don't think it can be used in other parts of C4R or even that C4R have to provide any kind of sorting out of the main think. Idk. Let me know what do you think.
What's sortBy structure?
This can be checked here.
sortBy accepts:
sortBy: 'column_1'
sortBy: ['column_1', 'column_2']
Example of the third option:
I saw that thenBy accepts function? Does sortBy accepts function?
Nope, functions cannot be cloned to workers.
If I indicate direction using thenBy structure and I also indicate
sortByDirection
. Which is applied?thenBy structure has priority since it's more specific. If sorting is applied by multiple column and some doesn't indicate direction,
sortByDirection
is used (which value by default is 'asc').