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

Add copy button to toast notification #98778

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jaydensipe
Copy link
Contributor

@jaydensipe jaydensipe commented Nov 2, 2024

Implements and closes godotengine/godot-proposals#11067 Bugsquad edit: use the GitHub magic words to link the proposal and auto-close when merged :)

Preview (edited)

Screen.Recording.2024-11-03.133504.mp4

@jaydensipe jaydensipe requested review from a team as code owners November 2, 2024 22:41
@jaydensipe jaydensipe changed the title Add copy button to toast notification Adds copy button to toast notification Nov 2, 2024
@jaydensipe jaydensipe force-pushed the add-copy-to-toast branch 2 times, most recently from 62c9946 to 5340c07 Compare November 2, 2024 23:29
@KoBeWi KoBeWi added this to the 4.x milestone Nov 2, 2024
@AThousandShips AThousandShips changed the title Adds copy button to toast notification Add copy button to toast notification Nov 3, 2024
@jaydensipe jaydensipe force-pushed the add-copy-to-toast branch 3 times, most recently from e9272d8 to c5079b7 Compare November 3, 2024 18:45
@jaydensipe jaydensipe force-pushed the add-copy-to-toast branch 2 times, most recently from 7fcddd9 to 397db7d Compare November 11, 2024 00:27
@jaydensipe jaydensipe force-pushed the add-copy-to-toast branch 2 times, most recently from 6b0145e to 459b2cd Compare November 12, 2024 00:30
@jaydensipe
Copy link
Contributor Author

Rebased with master.

@jaydensipe
Copy link
Contributor Author

Had a thought after watching passivestar's twitter video about the toasts, he's using them for quick tool notifications instead of errors, do we think it might be a good idea to only show the copy button if the toast has a severity of warning/error? @KoBeWi @passivestar thoughts? Or have a way to specify if you want your push_toast to include a copy button?

image

@passivestar
Copy link
Contributor

passivestar commented Nov 13, 2024

@jaydensipe There are probably some cases where you'd want the copy button in regular message notifications if there's a script that shows you some interesting info like some scene stats and you don't want to outright add DisplayServer.clipboard_set() to it yourself. It's probably not something you'd want often, but I think it's fine if all of them have the button, it's a small button after all and it might not be worth to bloat the API because of it

What I think might be interesting to consider in the future though is persistent toasts with action buttons:

@jaydensipe
Copy link
Contributor Author

@passivestar Awesome, yeah that makes sense not to bloat the API for that, thanks for the input man. And yes buttons on the toasts would be sick

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add copy button to toast notifications
3 participants