-
Notifications
You must be signed in to change notification settings - Fork 14.6k
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
[AIRFLOW-5543] Fix tooltip disappears in tree and graph view #6174
Conversation
Codecov Report
@@ Coverage Diff @@
## master #6174 +/- ##
==========================================
+ Coverage 79.99% 80.02% +0.02%
==========================================
Files 610 610
Lines 35176 35176
==========================================
+ Hits 28140 28149 +9
+ Misses 7036 7027 -9
Continue to review full report at Codecov.
|
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 but will leave it open for a bit longer to allow others with better frontend knowledge to review.
BTW, just curious @KevinYang21 has Airbnb migrated to latest Airflow version? If so, could you share more on your experiences on your process especially on how to make it less downtime or zero downtime if possible? We(Lyft) have a new cluster running for a couple new use cases, but still have been figured out a plan to migrate the legacy one to new cluster without downtime. |
@@ -128,6 +129,17 @@ | |||
'queued': false, | |||
'no_status': false | |||
}; | |||
const taskTip = d3.tip() | |||
.attr('class', 'tooltip') | |||
.style('background', 'black') |
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.
Rather than defining the stlyes in the JS can we put them in a .css file (as we already have given this a class)
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.
hmm, really, tooltip
is a class from bootstrap. will take a look
airflow/www/static/js/graph.js
Outdated
return tt; | ||
taskTip.show(tt, this); // taskTip is defined in graph.html | ||
}) | ||
.on('mouseout', function(d,i) { |
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.
Can be simpler:
.on('mouseout', function(d,i) { | |
.on('mouseout', taskTip.hide)) |
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.
sure
.style("border-width", "1px") | ||
.style("border-radius", "5px") | ||
.style("padding", "10px") | ||
.direction(function(toolTipHtml) { |
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 don't like this - it feels error-prone. Can we instead to tip.direction(condition ? 'e': 'n')
from inside the on mouseover event handler.
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.
Or, alternatively: we could do taskTip.show(d, this)
(d
here is the data/task struct from on-mouseover, and then have html/direction look at the object, not the string:
.direction(function(dl) {
return d.depends_on_paste ? 'e' : 'n'
})
.html(function(d) {
if (d.operator != undefined) {
if (d.operator != undefined) {
tt += "operator: " + escapeHtml(d.operator) + "<br/>";
}
tt += "depends_on_past: " + escapeHtml(d.depends_on_past) + "<br/>";
tt += "upstream: " + escapeHtml(d.num_dep) + "<br/>";
tt += "retries: " + escapeHtml(d.retries) + "<br/>";
tt += "owner: " + escapeHtml(d.owner) + "<br/>";
tt += "start_date: " + escapeHtml(d.start_date) + "<br/>";
tt += "end_date: " + escapeHtml(d.end_date) + "<br/>";
}
return tt
});
(untested)
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.
that was my original design. but i did not like in the end as d
is not always the object.
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.
love tip.direction(condition ? 'e': 'n')
@ashb addressed your comment in the second commit. thanks |
@feng-tao we upgraded one of our clusters to |
@pingzh interesting, so Airbnb's Data repo (or the one that is giant shared across different team) has been moved to 1.10 from 1.8.2? How's the experience ? Or how long the downtime and anything to watch out for during the upgrade? And curious how many people in Airbnb working on Airflow core currently? Maybe our two team should have a sync together to share more the experiences :) cc @KevinYang21 |
when page scrolls
Hi @ashb , could you please take a look? thanks |
@feng-tao For sure let's connect! With @saguziel recenlty returned to the team 🎉, we have 6 people working on core Airflow now. We did migrate from from 1.8.0 to 1.10.0 eariler this year and recently migrated to 1.10.4 for one of our cluster as @pingzh mentioned. We tried to migrate w/o downtime for 1.8 -> 1.10, it was possible in theory but we wanted a smoothier migration so we spun up two cluster and rolling migrated the DAGs. We did learn quite a few lessons during the migration and would love to share them during our sync. |
@KevinYang21 that's great, sent you an email :) |
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 - sorry slipped my mind.
fixup! [AIRFLOW-5477] Rewrite Google PubSub Hook to Google Cloud Python fixup! fixup! [AIRFLOW-5477] Rewrite Google PubSub Hook to Google Cloud Python Apply suggestions from code review Co-Authored-By: Kamil Breguła <[email protected]> fixup! Apply suggestions from code review fixup! fixup! Apply suggestions from code review fixup! fixup! fixup! Apply suggestions from code review fixup! fixup! fixup! fixup! Apply suggestions from code review [AIRFLOW-XXX] Fix AzureContainerInstancesOperator example (apache#6225) [AIRFLOW-5543] Fix tooltip disappears in tree and graph view (apache#6174) when page scrolls [AIRFLOW-5362] Reorder imports Updated readme with "Who's using" information We are using Airflow at King Abdullah Petroleum Studies and Research Center(KAPSARC)(www.kapsarc.org)
when page scrolls
Make sure you have checked all steps below.
Jira
Description
Before: if you scroll up your page in tree view or graph view, the tooltip will also move up and in the end disappear as it is out of the page.
Using the
d3-tip
as other pages also used3-tip
. After the fix with page scrolling up:Tests
UI updates
Commits
Documentation
@KevinYang21