Skip to content

Use html urls instead of onclick for dags view links.#12539

Merged
jmcarp merged 1 commit intoapache:masterfrom
jmcarp:jmcarp/dag-list-urls
Nov 24, 2020
Merged

Use html urls instead of onclick for dags view links.#12539
jmcarp merged 1 commit intoapache:masterfrom
jmcarp:jmcarp/dag-list-urls

Conversation

@jmcarp
Copy link
Copy Markdown
Contributor

@jmcarp jmcarp commented Nov 21, 2020

The dags view uses onclick events for dagrun and taskinstance links.
This breaks url previews, copying urls, opening links in a new tab, etc.
This patch uses svg anchors with href attributes instead of onclick
events so that these links behave like normal links.

@boring-cyborg boring-cyborg bot added area:UI Related to UI/UX. For Frontend Developers. area:webserver Webserver related Issues labels Nov 21, 2020
@jmcarp jmcarp requested review from ashb and ryanahamilton November 21, 2020 23:03
Copy link
Copy Markdown
Contributor

@ryanahamilton ryanahamilton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice improvement! Just a couple small comments.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This condition no longer persists (all circles are now clickable). Was that intentional? I don't see a strong case for why they needed to be conditional to begin with.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm also not sure why we had this conditional. I'd be happy to restore it if you think it's useful.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, I think we're good to omit.

The dags view uses onclick events for dagrun and taskinstance links.
This breaks url previews, copying urls, opening links in a new tab, etc.
This patch uses svg anchors with href attributes instead of onclick
events so that these links behave like normal links.
@jmcarp jmcarp force-pushed the jmcarp/dag-list-urls branch from 139ea99 to 9c81418 Compare November 23, 2020 16:44
@github-actions github-actions bot added the okay to merge It's ok to merge this PR as it does not require more tests label Nov 23, 2020
@github-actions
Copy link
Copy Markdown

The PR should be OK to be merged with just subset of tests as it does not modify Core of Airflow. The committers might merge it or can add a label 'full tests needed' and re-run it to run all tests if they see it is needed!

@jmcarp jmcarp merged commit 6d0dcd2 into apache:master Nov 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:UI Related to UI/UX. For Frontend Developers. area:webserver Webserver related Issues okay to merge It's ok to merge this PR as it does not require more tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants