-
Notifications
You must be signed in to change notification settings - Fork 13.9k
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
Full Annotation Framework #3518
Conversation
Coverage decreased (-0.07%) to 69.467% when pulling 9a252c153f4d046ceb0c5a9f46f3cb9e622b42a1 on tc-dc:fmenges/annotations into 255ea69 on apache:master. |
Maybe it makes sense to rename all of this from: annotations => overlays |
9a252c1
to
44e3444
Compare
Coverage decreased (-0.07%) to 69.467% when pulling 44e3444b61d0b960a9348a9ec0f27033c5a39b8a on tc-dc:fmenges/annotations into 255ea69 on apache:master. |
Nice, so these annotations would be stored inside the slice's json? We'll need to make things clear and cohesive here between the server-side time "Annotations Layers" #3521 and the other types of markers or annotations that would live on the slice itself. I'll try to get Eli (our designer) to chime in here. |
No, it handles both. Formula overlays are client side (I would have had to do too much plumbing work for server side, b.c. they probably should be datasources then). The slice annotations are server side, but read only. Basically it assumes you have a table with annotations in SQL (e.g. your deploy history from jenkins, teamcity, ....). You can now create a regular table slice in Superset with (timestamp and event) and then have these superimposed on your line chart as horizontal lines. |
Coverage decreased (-0.2%) to 69.327% when pulling 65040f91c0556e908a5e1bab80ea35e9c1c1c4c8 on tc-dc:fmenges/annotations into 255ea69 on apache:master. |
2 similar comments
Coverage decreased (-0.2%) to 69.327% when pulling 65040f91c0556e908a5e1bab80ea35e9c1c1c4c8 on tc-dc:fmenges/annotations into 255ea69 on apache:master. |
Coverage decreased (-0.2%) to 69.327% when pulling 65040f91c0556e908a5e1bab80ea35e9c1c1c4c8 on tc-dc:fmenges/annotations into 255ea69 on apache:master. |
Bringing some of the comments from my last comment here #3521
@williaster had some thoughts and said something about providing mocks for the "Annotations and Markers" control section and popover |
BTW, I'm excited we got the ball rolling on all this and grateful for all the work that you're doing @fabianmenges. This is HUGE for Superset. |
I'm using 'table viz' for horizontal lines and intervals,
All the annotations types but Formula are data driven. Are you asking me to support only Formulas for now? This would result in deleting a whole bunch of code and make some of the architecture look pretty useless.
I'm making the popover dynamic for each Annotation type right now.
Fetching them independently, asynchronously and on the client has many advantages.
I can take care of this. Would like to get that into a 2nd PR. This will get deployed to our production environment by Friday. It would be great if we could nail out the architecture questions beforehand. I hate writing JSON migration scripts. |
BTW, this library http://d3-annotation.susielu.com/ is only available for d3-v4, going to punt on point annotations for now |
907fdfe
to
296b9c1
Compare
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.
Left a couple comments in the code
error(err) { | ||
timeout: timeout * 1000, | ||
}); | ||
const queryPromise = queryRequest |
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.
I changes this to use promises to make everything composeable. I tested this a lot....
https://github.com/gaearon/redux-thunk#composition
this.done(queryResponse); | ||
// render when all the annotations are available |
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.
Currently the chart is only drawn on the dashboard when all annotations have been loaded. In a future PR I want display the chart as soon as its data becomes available and add an indicator that shows if not all annotations have been fetched and re-renders when all are available.
@@ -23,14 +23,16 @@ describe('chart actions', () => { | |||
}); | |||
|
|||
it('should handle query timeout', () => { | |||
ajaxStub.yieldsTo('error', { statusText: 'timeout' }); |
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.
Changing the test to work with async promises.
Coverage decreased (-0.3%) to 69.905% when pulling 296b9c1275d091283c92476b8170008ccb5a60bd on tc-dc:fmenges/annotations into 03e2af8 on apache:master. |
Coverage decreased (-0.3%) to 69.905% when pulling 296b9c1275d091283c92476b8170008ccb5a60bd on tc-dc:fmenges/annotations into 03e2af8 on apache:master. |
@mistercrunch I addressed the issues you've brought up:
I'm still fetching everything asynchronously but I've done extensive testing and error handling around this. I think the state is stable and polished enough for you to check it out... |
Coverage decreased (-0.3%) to 69.905% when pulling dc204e01429f933a33f2f39dc6709e3d6a92d37e on tc-dc:fmenges/annotations into 03e2af8 on apache:master. |
dc204e0
to
5b23d74
Compare
Coverage decreased (-0.1%) to 70.049% when pulling 5b23d7426cd06b81cf42879ed8cd40c551c4a127 on tc-dc:fmenges/annotations into 03e2af8 on apache:master. |
BTW, if you want to go forward with this, I will need to write a migration script or some other logic to handle the current |
26a7e9a
to
7050748
Compare
Coverage decreased (-0.1%) to 70.033% when pulling 70507486e423581ba15e8e6d5e12c602b9f7263a on tc-dc:fmenges/annotations into 18e459e on apache:master. |
Coverage decreased (-0.1%) to 70.033% when pulling 70507486e423581ba15e8e6d5e12c602b9f7263a on tc-dc:fmenges/annotations into 18e459e on apache:master. |
@fabianmenges this looks great, any plans when it will be ready? |
This PR contains a full Annotation Framework
There are 5 different types of annotations:
Check out the new demo video:
https://www.youtube.com/watch?v=-0CgA3q39KI&feature=youtu.be
Couple screenshots:
Superset Annotations Config:
Configuring Interval Annotation
Dashboard with annotations:
Context Aware tooltips:
Error handling:
Loading indicators for annotations: