Conversation
💔 Build Failed |
76bd2dd to
af833ed
Compare
💔 Build Failed |
💔 Build Failed |
ed27206 to
fa8dec9
Compare
|
Pinging @elastic/kibana-app |
💚 Build Succeeded |
markov00
left a comment
There was a problem hiding this comment.
Code LGTM. Some minor comments.
Tested on chrome/osx using brushes and filters
There was a problem hiding this comment.
nit: Can we remove this visualization default? We already have a check on opts thats trows an exception if visualization is a falsy value.
What about checking if the visualization object has the required methods?
There was a problem hiding this comment.
no idea why this shows as added code .... it was just indented
There was a problem hiding this comment.
nit: What about having the stage default as lab, so we don't accidentally create a production vis?
There was a problem hiding this comment.
no idea why this shows as added code .... it was just indented
There was a problem hiding this comment.
nit: What about move these strings to an enum similar to:
const STAGE_TYPES = {
LAB: 'lab',
EXPERIMENTAL: 'experimental',
PRODUCTION: 'production',
}There was a problem hiding this comment.
no idea why this shows as added code .... it was just indented
There was a problem hiding this comment.
q: do we enforce actions to be functions somewhere?
There was a problem hiding this comment.
we don't, we need to better type this
src/ui/public/vis/vis.js
Outdated
There was a problem hiding this comment.
I'm a bit confused what is the right one, this:
vis.API.events.addFilter no longer exists, instead you should rather call vis.API.events.filter({ table, column, row, value })
or
the filter method will be removed in the near feature you should rather use addFilter method below
There was a problem hiding this comment.
ha :) i need to remove that comment
src/ui/public/vis/vis_filters.js
Outdated
There was a problem hiding this comment.
nit: Is there a reason to use arrow function here? can't we use named functions?
There was a problem hiding this comment.
is there a reason not to use arrow functions ?
There was a problem hiding this comment.
nit: can we get rid of lodash here? Object.keys(this.vis.type.events).forEach
src/ui/public/vis/vis.js
Outdated
There was a problem hiding this comment.
To naming this consistently it's better to rewrite this as:
filter: data => this.eventsSubject.next({ name: 'filterBucket', data }),
brush: data => this.eventsSubject.next({ name: 'brush', data }),So your event is an object with {name, data} as it's used on the subscriptions
💚 Build Succeeded |
lukeelmers
left a comment
There was a problem hiding this comment.
Code LGTM. Pulled down and tested, no apparent functional issues.
4b1b834 to
88e6af8
Compare
💚 Build Succeeded |
Summary
Moves filtering functions out of Vis.
preparation for #23185
QA: no functional canges
Dev-Docs
filtering inside your visualization will need to be updated
vis.API.events.addFilterno longer exists, instead you should rather callvis.API.events.filter({ table, column, row, value })Checklist
Use
strikethroughsto remove checklist items you don't feel are applicable to this PR.[ ] This was checked for cross-browser compatibility, including a check against IE11[ ] Any text added follows EUI's writing guidelines, uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/master/packages/kbn-i18n/README.md)[ ] Documentation was added for features that require explanation or tutorials[ ] Unit or functional tests were updated or added to match the most common scenarios[ ] This was checked for keyboard-only and screenreader accessibilityFor maintainers
[ ] This includes a feature addition or change that requires a release note and was labeled appropriately