-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Visualize refactor #11001
Visualize refactor #11001
Conversation
@@ -183,15 +183,19 @@ function VisEditor($scope, $route, timefilter, AppState, $window, kbnUrl, courie | |||
|
|||
$scope.timefilter = timefilter; | |||
$scope.opts = _.pick($scope, 'doSave', 'savedVis', 'shareData', 'timefilter', 'isAddToDashMode'); | |||
vis.api = { |
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.
this is here so that component doesn't need to know about this top level components directly, however it depends on them ... i am not sure if i should just move this inside component ?
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.
Mutating the vis like this isn't a good idea. If <visualize>
is going to use the timeFilter
and queryFilter
it should explicitly/outwardly depend on them.
ec9b392
to
66b847d
Compare
4b8c588
to
2a1f400
Compare
using visualizations inside of other apps<visualize> component:
usage:
<visualization> component
usage:
creating new visualizationsnew basic visualization type (like metric, tagcloud, table)
advanced visualization type (like timelion, thor)
new vislib visualization
|
46b720c
to
32c45eb
Compare
at this point this completely breaks every existing visualization (mostly due to renaming of properties and moving files around) |
[EDIT] nevermind, this refers to the above error: #11001 (comment) I'm having trouble running the code, getting the following error when creating a new visualization.
|
32c45eb
to
9d26152
Compare
6c53f37
to
27f4dfa
Compare
8821b81
to
0fcb0af
Compare
972d2d4
to
5b221b0
Compare
5b221b0
to
7253333
Compare
this PR was merged into
feature/visualize
branch and replaced by this PR: #11786searching is moved out of visualize editor app (kibana/public/visualize/editor) into visualize component (ui/public/visualize) which was already handling search response.
this simplifies the code (some weird event handling was happening there before to communicate changes between visualize app editor, component and side editor.
it also makes using component easier (embedding it in other apps). before you would need to do all the same things visualize editor app does (handling the search). now all you need to do is provide savedVis and states:
i am undecided if you (the embedding app) should be responsible for providing access to filter bar, time picker and query bar or should component be aware of those things ? the following option makes embedding a lot easier. we could still provide the possibility for the embedding app to override some of that behavior.
oh, and this also solves the double rendering (at least in some scenarios). before if you would in any point series chart change a chart type (from line to bar for example) you would see that it double renders (you would first see the line chart and then bar chart ... keeps happening on any other option change)
this is part 1 of visualize changes i want to do ... but i want to get some early feedback as other parts will be based on this.
i tried to capture the changes in this diagram:

some more diagrams of the new approach:
simple components with very specific functions:

one way data flow:
