Info and error popup content copyable to clipboard #724
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains two changes.
The first is a simple usability win; info and error popup content is copyable to the clipboard, via a popup link/button below the content.
HTML tags are stripped from the content. Line breaks and general formatting are conserved. When the user presses the copy link, a
status_message
is printed confirming the text was copied.This is the text copied to the clipboard:
The other change, which is not related to popup content at all, but which IMO is a big improvement as well, is getting rid of the snippets that are bundled with this plugin.
These snippets are all based on, or are identical to, the snippets that ship with Sublime Text's default JavaScript package, and which pretty much everyone agrees were a mistake.
Just to give one egregious example, the "improved" for loop:
There are some good comments in that thread, especially from @Thom1729 , regarding why bundling snippets with a package is a bad idea, even if said snippets aren't as wacky as the one above.
Maybe someone thought copying Sublime's default JS snippets to this package would be comforting for existing Sublime users, but it was copying a misfeature, and just creates noise and makes autocomplete less useful for everyone.
I'd be glad to separate this into its own PR if it's necessary, but it seems like such a clear usability win that I figured the sooner it gets merged the better.