looking for ideas how to impl PXT-like "connection indicator with line

144 views
Skip to first unread message

yona...@gmail.com

unread,
Nov 13, 2020, 2:47:54 PM11/13/20
to Blockly
Hi
We have built a product around blockly. We see that one of the main challenges raised by our users is the ability to connect blocks together.
We saw that pxt-blockly have a nice solution for this problem 80256705-19f30600-8634-11ea-8a75-122d6183d5aa.gif

the changes are done for this implementaion (as in this PR https://github.com/microsoft/pxt-blockly/pull/287 ) are not limited to the renderer only (core/gestures.js and core/insertion_marker_manager.js ).

so my Q - Is it possible to get this functionality in Blockly w/o forking it?


Beka Westberg

unread,
Nov 13, 2020, 6:33:06 PM11/13/20
to blo...@googlegroups.com
Hello,

You might be able to create this without forking if you create a custom renderer /and/ a custom connection checker (but I'm really not sure). The renderer would add the necessary svg elements to all of the connections, and then the connection checker could be used to update the svg elements to show the connection line. You could probably send the update if the value returned by the base doTypeChecks function returns true.

I'm not sure if this will work or what troubles you might run into. But it's the best recommendation I could think of.

Best of luck and I really hope it works! This sounds like a cool project :D
--Beka

--
You received this message because you are subscribed to the Google Groups "Blockly" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blockly+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/blockly/92ce799b-cab3-4cea-957b-0296636b28f2n%40googlegroups.com.

Abby Schmiedt

unread,
Nov 13, 2020, 7:11:09 PM11/13/20
to Blockly
Hello!

Our goal is to eventually offer this a as a plugin in blockly-samples and part of that work would include creating the necessary APIs in core blockly. I have added an  issue in blockly-samples to track that. 

So in short, I'm not sure if it is possible right now (see Beka's answer), but our goal is that it will be possible in the near(ish) future.

Cheers, 
Abby

yona...@gmail.com

unread,
Nov 15, 2020, 2:21:38 AM11/15/20
to Blockly
Thank you, Abby  - great news. 
Let me know if I can join this effort 

Abby Schmiedt

unread,
Nov 16, 2020, 2:51:12 PM11/16/20
to Blockly
Hello!

If you are interested in helping out and getting the ball moving on this, you could create a plugin for this feature. In the docs that I attached it says that a plugin "should not monkeypatch blockly" however, since you are getting our approval and our plan is to add support for this feature later on it would be acceptable. 

If you have any more questions feel free to reply : ) And if you are interested, let me know and I can create a more detailed write up for what we expect the plugin to do. I expect this to be really similar to the Makecode feature, but might have some places that would allow users to extend the plugin.

Cheers, 
Abby 

yona...@gmail.com

unread,
Feb 19, 2021, 4:42:21 PM2/19/21
to Blockly
Hi Abby
Eventually, I didn't create this plugin.
Do you (or someone else in the community) have any plans to add it?
I really miss this PXT functionlait 
10x 

Beka Westberg

unread,
Feb 20, 2021, 10:27:59 AM2/20/21
to blo...@googlegroups.com
Hello,

I don't think there's anyone working on this at the moment :/ There's a lot of development going on, so it can be hard to find time to build all of the things hehe. That being said, I personally still want to see this as a plugin! And I'm sure the people on the core team do as well. Maybe after the Blockly Summit in April someone will be inspired to take it up!

--Beka

Reply all
Reply to author
Forward
0 new messages