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

Proposal: Download block image #3238

Closed
jollytoad opened this issue Oct 14, 2019 · 5 comments
Closed

Proposal: Download block image #3238

jollytoad opened this issue Oct 14, 2019 · 5 comments
Labels
issue: feature request Describes a new feature and why it should be added

Comments

@jollytoad
Copy link
Contributor

Is your feature request related to a problem? Please describe.

Allow exporting an image of a block, and copying a block between workspaces.

Describe the solution you'd like

  • A block context menu item to download the block as an image with the xml embedded (as demonstrated in App Inventor by Evan at the Blocky Summit 2019)
  • Standard 'copy' (eg. ctrl/cmd+c) to push the same thing into the clipboard
  • Drag and drop outside of the workspace (stretched goal)

Describe alternatives you've considered

Additional context

I've seen that the playground currently has a whole workspace download option.

I'm currently hacking at this to see if we can have a general reusable solution based on the playground screenshot and the ideas presented in App Inventor. I'll keep you posted via this issue of how I get on.

@jollytoad jollytoad added issue: triage Issues awaiting triage by a Blockly team member issue: feature request Describes a new feature and why it should be added labels Oct 14, 2019
@ewpatton
Copy link
Contributor

ewpatton commented Oct 14, 2019 via email

@jollytoad
Copy link
Contributor Author

Thanks Evan, yeah I wasn't sure whether the clipboard interaction would be possible either.

So far I've managed to add 'Download Block Image' menu item into the Block context menu, expanding on @samelhusseini's screenshot feature in the playground...

https://github.com/jollytoad/blockly/blob/jollytoad/download-block/tests/playgrounds/screenshot.js

Next I'm going to try to embed the xml into it.

@jollytoad
Copy link
Contributor Author

So, I've managed to port across the export/import from App Inventor into the playground, to varying degrees of hackiness. (see branch above)

I've had to override bits of the core Blockly here and there, it's making me think we really need some standard plugin system for Blockly, so I'm going to raise a new proposal issue, and make some suggestions for discussion.

@samelhusseini samelhusseini removed the issue: triage Issues awaiting triage by a Blockly team member label Oct 16, 2019
@jollytoad
Copy link
Contributor Author

Design/example for such a plugin system is here... #3260

@rachel-fenichel
Copy link
Collaborator

Closing in favor of a plugin: google/blockly-samples#249

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue: feature request Describes a new feature and why it should be added
Projects
None yet
Development

No branches or pull requests

5 participants