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

Sometimes parent block doesn't connect to input block #7412

Closed
1 task done
clementcontet opened this issue Aug 19, 2023 · 1 comment
Closed
1 task done

Sometimes parent block doesn't connect to input block #7412

clementcontet opened this issue Aug 19, 2023 · 1 comment
Labels
issue: bug Describes why the code or behaviour is wrong

Comments

@clementcontet
Copy link
Contributor

Check for duplicates

  • I have searched for similar issues before opening a new one.

Description

When moving a parent block to connect to a compatible input block, sometimes it doesn't connect (and the input block gets moved away).

Reproduction steps

  1. Move parent block to input block.
  2. The input block isn't connected and gets instead "pushed away"
    On https://developers.google.com/blockly I've seen this behavior when the parent block is not the top dragged block (cf screenshot)

On https://google.github.io/blockly-samples/plugins/shadow-block-converter/test/ we can see that the connection is not done when the parent block already has a shadow block

And on SuperCodingBall, I had to "chase" the input block (cf screenshot)

Stack trace

No response

Screenshots

input.blocks.mov
block.chasing.mov

Browsers

Chrome desktop

@clementcontet clementcontet added issue: bug Describes why the code or behaviour is wrong issue: triage Issues awaiting triage by a Blockly team member labels Aug 19, 2023
@rachel-fenichel
Copy link
Collaborator

Hi Clement,

There are three different issues here.

The first one is that connections on blocks other than the parent block aren't available for connection during a drag. (The exception is the last next connection on a stack of blocks.)

That behaviour is intentional. Imagine a stack of set count to blocks, all of which had empty inputs. If you dragged it toward a math block you would have a lot of valid connections that are very close to each other, resulting in blocks bouncing around as insertion markers appear and disappear and the dragged block resizes. Sticking to only connections on the top block being dragged helps avoid that case.

The second issue is that you can't drag a parent block with a shadow toward a child block and have them connect. This is also intentional. If we did it the other way, you could accidentally connect a parent to an existing block, which would wipe out a shadow. In general, the user has to drag the child block to the parent connection if there's any ambiguity about what connection to make.

The third issue is the block chasing that you show in your second recording. I'm going to split that into a separate issue to look at more.

@maribethb maribethb closed this as not planned Won't fix, can't repro, duplicate, stale Aug 23, 2023
@cpcallen cpcallen removed the issue: triage Issues awaiting triage by a Blockly team member label Jun 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue: bug Describes why the code or behaviour is wrong
Projects
None yet
Development

No branches or pull requests

4 participants