-
Notifications
You must be signed in to change notification settings - Fork 16.4k
Improve copy button usability on code blocks #56382
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
Conversation
|
@NilsJPWerner Let me know what you think! |
jscheffl
left a comment
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.
Supporting this. Horizontal scrolling is not desired. Thanks for the fix.
hussein-awala
left a comment
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.
+1 I like this change, but I can’t approve it since my TypeScript knowledge is limited.
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.
Looks great!
I wonder if there are another places having same issue. Maybe we could fix them as well.
This is fantastic! |
bbovenzi
left a comment
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!
although, I wonder why the wrapLongLines wasn't working
(cherry picked from commit 0dca308) Co-authored-by: LI,JHE-CHEN <103923510+RoyLee1224@users.noreply.github.com>
(cherry picked from commit 0dca308) Co-authored-by: LI,JHE-CHEN <103923510+RoyLee1224@users.noreply.github.com>
Related issue
part of #56250
Why
Previously, for long lines of code, the copy button was pushed off-screen, forcing users to scroll horizontally to access it.
What
Now, if you hover on the code block, the button is always visible on the right edge of the container, regardless of horizontal scroll position.
Screenshots
code_before.mp4
code_after.mp4
^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named
{pr_number}.significant.rstor{issue_number}.significant.rst, in airflow-core/newsfragments.