Skip to content

Make autoClose in flyouts/toolboxes toggleable #7506

Description

@BeksOmega

Check for duplicates

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

Problem

We have a feature request in samples to make the continuous toolbox autoclose RaspberryPiFoundation/blockly-samples#1922

We can't toggle this via the constructor or init because those are both called internally by Blockly. So we need to toggle it after the toolbox/flyout has been constructed.

Currently toolboxes/flyouts do not support changing the autoClose property after they have been initialized. You can assign to it because it is public, but the logic is not built to support this.

For example, if you change a flyout from always open to auto close, you still get a delete area for the flyout. If you change a flyout from auto close to always open, it won't filter for capacity.

Request

Go through the flyout and make sure all of the functionality supports toggling autoClose. Add set methods and get methods for this property.

Alternatives considered

N/A

Additional context

Previous related requests:

Activity

  1. maribethb commented on Sep 20, 2023

    @maribethb
    Contributor

    Seems reasonable!

  2. BeksOmega commented on Sep 21, 2023

    @BeksOmega
    ContributorAuthor

    To close this we would need to verify the following.

    When autoClose is true:

    1. The flyout automatically closes when a block is dragged out, or the workspace is clicked.
    2. The flyout does not act as a delete area.
    3. Blocks that go above their block limit are disabled when the flyout is opened. For example, the "limit three instances" block.
    4. View/absolute metrics do not include the flyout.

    When autoClose is false:

    1. The flyout stays open when a block is dragged out, or the workspace is clicked.
    2. The flyout acts as a delete area.
    3. Blocks that go above their block limit become disabled in the flyout immediately. For example, the "limit three instances" block.
    4. View/absolute metrics include the flyout.

    These things should be tested for:

    • A simple flyout (which has autoClose = false by default)
    • A simple flyout set to autoClose = true
    • A category flyout (which has autoClose = true by default)
    • A category flyout set to autoClose = false
      • This should also be tested to make sure switching between categories works correctly.
  3. Apoorvgarg-creator commented on Nov 2, 2023

    @Apoorvgarg-creator
    Contributor

    Can I start working on this feature ?

  4. BeksOmega commented on Nov 2, 2023

    @BeksOmega
    ContributorAuthor

    Can I start working on this feature ?

    Hiya @Apoorvgarg-creator Thank you for your interest! But we actually had a partner run into this yesterday, so I'm going to take it so I can go back-and-forth with them =)

  5. self-assigned this
    on Nov 2, 2023
  6. removed
    help wantedExternal contributions actively solicited
    on Nov 7, 2023
  7. added theissue type on Jul 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions