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

Dynamically hide ui.code's copy button #2288

Merged
merged 1 commit into from
Jan 5, 2024
Merged

Dynamically hide ui.code's copy button #2288

merged 1 commit into from
Jan 5, 2024

Conversation

falkoschindler
Copy link
Contributor

Inspired by GitHub's code blocks, this PR hides the copy button of ui.code when scrolling. A timer is used to show the button after 1 second of inactivity.

Can be tested with something like

ui.code('print("This is a very long line.")').classes('w-32')

@rodja rodja merged commit 5c195b5 into main Jan 5, 2024
7 checks passed
@rodja rodja deleted the copy-button branch January 5, 2024 15:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ui.code copy button inside ui.card dialog overlaps content
2 participants