Skip to content

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.

@bdsoha bdsoha requested review from bbovenzi and removed request for ashb and ryanahamilton 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
@bbovenzi bbovenzi added this to the Airflow 2.5.0 milestone Nov 14, 2022
@bdsoha bdsoha deleted the patch-1 branch November 14, 2022 18:35
@ephraimbuddy ephraimbuddy added the type:new-feature Changelog: New Features label Nov 16, 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