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

Toolbox (simple and category) sizes do not get updated properly #4138

Closed
BeksOmega opened this issue Aug 8, 2020 · 0 comments
Closed

Toolbox (simple and category) sizes do not get updated properly #4138

BeksOmega opened this issue Aug 8, 2020 · 0 comments
Labels
component: toolbox/flyout issue: bug Describes why the code or behaviour is wrong

Comments

@BeksOmega
Copy link
Collaborator

BeksOmega commented Aug 8, 2020

Describe the bug

If the workspace is immovable (meaning no movement nor zoom options) blocks will bump themselves back into the space of the workspace to prevent them going off screen:
BumpBlocks

But when you change the size of the toolbox, this stops working correctly:
BadBump
BadBump2

The toolbox-side bound seems to obey the previous size of the toolbox, and the opposite-side bound is further towards the toolbox than it should be.

To Reproduce

Steps to reproduce the behavior:

  1. Go to replace the playgroundConfig in the advanced playground with the following:
  const playgroundConfig = {
    toolboxes: {
      'categories': toolboxCategories,
      'simple': toolboxSimple,
      'test blocks': testBlocksToolbox,
      'size test 1': '<xml>' +
              '<block type="lists_getIndex"></block>' +
              '</xml>',
      'size test 2': '<xml>' +
              '<category name="short">' +
              '<category name="loooooooooooooooooong">' +
              '<block type="controls-if"></block>' +
              '</category>' +
              '</category>' +
              '</xml>'
    }
  }

  1. Disable all movement, including zooming.
  2. Select either of the size-test toolboxes.
  3. Change the size.
  4. Drag a block around to observe the odd bumping behavior.

Expected behavior

Bumping would continue to work as expected after the size of the flyout changes.

Additional context

Possibly related to #4086? Discovered this while investigating that. Note that mutators are immovable workspaces.

@BeksOmega BeksOmega added issue: triage Issues awaiting triage by a Blockly team member issue: bug Describes why the code or behaviour is wrong labels Aug 8, 2020
@moniika moniika added component: toolbox/flyout and removed issue: triage Issues awaiting triage by a Blockly team member labels Aug 10, 2020
@moniika moniika added this to the 2020_q3_release milestone Aug 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: toolbox/flyout issue: bug Describes why the code or behaviour is wrong
Projects
None yet
Development

No branches or pull requests

3 participants