Skip to content

Conversation

@CoderDake
Copy link

@CoderDake CoderDake commented Oct 26, 2023


This is to overcome a bug with VSCode that isn't allowing Devtools to use the copy api.

I've added the allow permissions to the iframe so that if VSCode ever fixes this issue, we should be able to just start utilizing the original copy method right away :)

The complementary code from Devtools can be found in this PR: flutter/devtools#6598

@DanTup
Copy link
Member

DanTup commented Oct 26, 2023

LGTM, thanks!

@DanTup
Copy link
Member

DanTup commented Oct 26, 2023

I've invited you to Dart-Code, feel free to merge this when you're ready.

auto-submit bot pushed a commit to flutter/devtools that referenced this pull request Oct 31, 2023
![](https://media.giphy.com/media/4URfklUToxk6A/giphy.gif)

Adds a fallback behaviour for copying which will allow copy buttons to actually work in VSCode.

NOTE: success toasts will no longer show in VSCode though.

I've also added some logging just in case a user is looking at their console when a copy fails. Hopefully this provides enough information that the unhide-able error doesn't look suspicious.
![Screenshot 2023-10-26 at 10 53 39 AM](https://github.com/flutter/devtools/assets/1386322/b4ebd139-f3f5-4dd6-8c62-794f7d6df80d)

Related to Dart-Code/Dart-Code#4814
Fixes #5775
@DanTup DanTup added this to the v3.78.0 milestone Nov 1, 2023
@DanTup DanTup added the in devtools Relates to integration with Dart/Flutter DevTools label Nov 9, 2023
@CoderDake CoderDake merged commit 34200be into Dart-Code:master Nov 9, 2023
@CoderDake CoderDake deleted the dake-clipboard branch November 9, 2023 18:09
kenzieschmoll pushed a commit to flutter/devtools that referenced this pull request Nov 16, 2023
![](https://media.giphy.com/media/4URfklUToxk6A/giphy.gif)

Adds a fallback behaviour for copying which will allow copy buttons to actually work in VSCode.

NOTE: success toasts will no longer show in VSCode though.

I've also added some logging just in case a user is looking at their console when a copy fails. Hopefully this provides enough information that the unhide-able error doesn't look suspicious.
![Screenshot 2023-10-26 at 10 53 39 AM](https://github.com/flutter/devtools/assets/1386322/b4ebd139-f3f5-4dd6-8c62-794f7d6df80d)

Related to Dart-Code/Dart-Code#4814
Fixes #5775
kenzieschmoll pushed a commit to flutter/devtools that referenced this pull request Nov 17, 2023
![](https://media.giphy.com/media/4URfklUToxk6A/giphy.gif)

Adds a fallback behaviour for copying which will allow copy buttons to actually work in VSCode.

NOTE: success toasts will no longer show in VSCode though.

I've also added some logging just in case a user is looking at their console when a copy fails. Hopefully this provides enough information that the unhide-able error doesn't look suspicious.
![Screenshot 2023-10-26 at 10 53 39 AM](https://github.com/flutter/devtools/assets/1386322/b4ebd139-f3f5-4dd6-8c62-794f7d6df80d)

Related to Dart-Code/Dart-Code#4814
Fixes #5775

Mirror package:web version from Flutter SDK
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

in devtools Relates to integration with Dart/Flutter DevTools is bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants