bartbutenaers / node-red-contrib-blockly

A Node Red node for visual programming a function using Blockly
Apache License 2.0
88 stars 22 forks source link

Backpack plugin #81

Closed bartbutenaers closed 3 years ago

bartbutenaers commented 3 years ago

Hi @cymplecy, @jsccjj,

The workspace-backpack plugin is the last plugin that I have implemented. Promised ;-)

Now you can activate your backpack via the config node:

image

Which shows a backpack icon in the workspace, that allows you to store temporarily some blocks that you want to use frequently (to avoid having to look in the toolbox all the time). You can drag blocks to the backpack, or add them via the right-click context menu:

blockly_backpack

TODO:

  1. I will need to do some extra development: currently the content of the backspace is not persisted. Which means that when you switch workspace (e.g. by going to full screen mode) that the backpack will be empty again. Any thoughts?
  2. More options are available on their readme page. Add those also?

But my time is up for this morning. Will continue this evening...

cymplecy commented 3 years ago

Could be very useful but persistence is definitely needed

bartbutenaers commented 3 years ago

The backpack should now be persisted.

  1. Each config node has its own backpack contents. So all nodes with the same config node will share the same backpack.
  2. When you make changes to a backpack via the workspace of a node, the changes will be written to the config node of that node. So the config node becomes dirty, and the deploy button will become active.
  3. When you make changes to a backpack via the workspace of a node, but you switch to another config node: then the backpack of that other config node will become active, but you changes to the other config node will be lost. Because I want to avoid that a node will (when pressing the "Done" button) will write changes to other config nodes (except his own).

Would be nice if somebody could test this.

This was my last new "enhancement" issue. I will go through the existing Github issues, and try to solve them. Then writing some documentation, and then beta release ...

cymplecy commented 3 years ago

Works for me :)

bartbutenaers commented 3 years ago

That was fast... Thanks!!!