Skip to content
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

Enable copying DagRun JSON to clipboard #27639

Merged
merged 11 commits into from
Nov 14, 2022
Merged

Enable copying DagRun JSON to clipboard #27639

merged 11 commits into from
Nov 14, 2022

Conversation

bdsoha
Copy link
Contributor

@bdsoha bdsoha commented Nov 13, 2022

Enable copying DagRun JSON details to the clipboard.

Screenshot 2022-11-14 at 4 09 24 PM

@boring-cyborg boring-cyborg bot added area:UI Related to UI/UX. For Frontend Developers. area:webserver Webserver related Issues labels Nov 13, 2022
@pierrejeambrun
Copy link
Member

pierrejeambrun commented Nov 13, 2022

Hello @bdsoha,

Good idea,

When copying a line, there is a green tick that appears for 5.5 seconds, this green tick is not inline and makes the formatting jump when you hover it, I find this weird. (it appears bellow the copied line)
image

Seems similar to mac-s-g/react-json-view#241 but only when you already have copied something to the clipboard.

Maybe that's just me, but I whish the green tick was on the same line.

@bdsoha
Copy link
Contributor Author

bdsoha commented Nov 13, 2022

@pierrejeambrun Is there a reason why this specific package is being used?
It hasn't been updated in over 2 years.

@bbovenzi
Copy link
Contributor

@pierrejeambrun Is there a reason why this specific package is being used? It hasn't been updated in over 2 years.

Probably because we added it almost 2 years ago back when the package was still being updated.

@bdsoha
Copy link
Contributor Author

bdsoha commented Nov 13, 2022

@bbovenzi Could @textea/json-viewer be a possible replacement?

The Acknowledgments section states:

This package is originally based on mac-s-g/react-json-view.

@bdsoha
Copy link
Contributor Author

bdsoha commented Nov 14, 2022

@pierrejeambrun @bbovenzi I added the copy functionality with the useClipboard hook from Chakra.

I added a screenshot in the description.

Copy link
Contributor

@bbovenzi bbovenzi left a comment

Choose a reason for hiding this comment

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

Yeah, that looks like a good library we could update to after this PR.

Left one small change we need to make in order for linting to pass.

airflow/www/static/js/dag/details/dagRun/index.tsx Outdated Show resolved Hide resolved
@bdsoha bdsoha requested review from bbovenzi and removed request for ryanahamilton and ashb November 14, 2022 14:57
@bdsoha
Copy link
Contributor Author

bdsoha commented Nov 14, 2022

@bbovenzi Static checks passed.

Copy link
Contributor

@bbovenzi bbovenzi left a comment

Choose a reason for hiding this comment

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

nice work!

@bbovenzi bbovenzi merged commit f816c1d into apache:main Nov 14, 2022
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 type:new-feature Changelog: New Features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants