Skip to content

Conversation

dixita0607
Copy link
Contributor

@dixita0607 dixita0607 commented Sep 9, 2025

  • Add "Copy to clipboard" button beside Format
image
  • Reason: A few requests to directly open the embedded dartpad in new tab. After reading about the usage of git gists, it seemed difficult to right away provide it. The copy seems a low hanging fruit and an improved UI.
  • More details lightweight dartpad embedding #2702 (comment)

TODO:

  • Tests for this feature

  • I’ve reviewed the contributor guide and applied the relevant portions to this PR.
Contribution guidelines:

Note that many Dart repos have a weekly cadence for reviewing PRs - please allow for some latency before initial review feedback.

 - Add a button beside "Format" button with similar style having copy to clipboard functionality
 - Reason: A few requests to directly open the embedded dartpad in new tab. After reading about the usage of git gists, it seemed difficult to right away provide it. The copy seems a low hanging fruit and an improved UI.
@dixita0607
Copy link
Contributor Author

dixita0607 commented Sep 10, 2025

@devoncarew,

If this feature looks good, I will add all the tests and push a few new commits. Wanted to know about team's input on this.

@devoncarew
Copy link
Member

Thanks for the PR! My guess is that we want to do everything we can to minimize the amount of UI that we're floating aobve the editing area (up to and including somehow removing some of the current FAB buttons). Perhaps there's somewhere else we could put the copy- to-clipboard functionality? Though I'm not 100% that if would be a frequent user action.

But generally, the review for this PR + feature would be from @johnpryan.

@dixita0607
Copy link
Contributor Author

My guess is that we want to do everything we can to minimize the amount of UI that we're floating aobve the editing area (up to and including somehow removing some of the current FAB buttons)

For this, I have something like this in mind. Refer this as a wireframe, The final implementation will have proper styling.
image

Though I'm not 100% that if would be a frequent user action

It won't be a frequent one but sure is useful for tutors or people who want to open the embedded dartpads in new tab. I see that is not a straight forward implementation so this UX would be easier for users.

Ref: flutter/website#12283

What do you think?

@dixita0607 dixita0607 changed the title [DRAFT]: Add copy functionality to the editor [WIP]: Add copy functionality to the editor Sep 18, 2025
@dixita0607 dixita0607 marked this pull request as ready for review September 18, 2025 05:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants