script-lab
script-lab copied to clipboard
Make it more obvious how to import copied-to-clipboard snippets
This might already be a feature. I noticed you can copy the script to the clipboard in the share menu. This is great but there seems to be no way to get the data into script-lab afterwards (apart from opening the yaml in notepad, and modifying each tab manually).
Importing the data from the clipboard might be a nice addition to resolve the issue.
Hi @sancarn. You can actually paste that YAML directly into this import field.
Let me know if you experience any troubles with this.
Nice! 😄
It's also in the README should you ever need to reference this for someone else: https://github.com/OfficeDev/script-lab/blob/master/README.md#import
Can't believe I missed that... Thanks
No problem. If you think that there is something we can do either in the product or in the README to make it more obvious, let us know. (E.g., should the notification message that says "Snippet copied to clipboard" also suggest how to re-import it, or would that be too annoying to see every time?...)
To be honest, a link in the notification "Import it here" which links to the import screen would be a subtle way to make it obvious! So I don't think it'd be annoying personally.
OK, let's do that. Seems like it should take all of 10 minutes to fix. Re-opening and changing title to "Make it more obvious how to import copied-to-clipboard snippets".
@sancarn , if you feel inspired to attempt it yourself and to send a PR, feel free :-). We are an open-source project, after all. For the link, btw, you can use "http://aka.ms/scriptlab/import". The message bar component should already be set up with the ability to have a link, since the exporting-to-gists already shows a link there.
I'll give it a go, currently struggling with installing the npm repo... Because I don't have yarn
installed, will see if I get through it and if I do, will be happy to attempt the fix 😛.
great to hear @sancarn. if you are stuck with setting up the repo, CONTRIBUTING.md should help point you in the right direction
also, here is where that messageBar comes up when the snippet is copied to the clipboard.