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

fix: blocks being dragged behind toolbox (re-re-add drag surface) #7619

Merged
merged 4 commits into from
Nov 8, 2023

Conversation

BeksOmega
Copy link
Collaborator

@BeksOmega BeksOmega commented Oct 30, 2023

The basics

The details

Resolves

Fixes #7354

Proposed Changes

Adds a layer manager to keep track of what layers we have (dragging layer, block layer, and bubble layer) and what order they should be in.

The new system should be entirely internal.

Reason for Changes

Needed to add a dragging layer so that blocks could exist in front of the toolbox while dragging, so I just decided to implement a better layer management system at the same time. This prepares us to easily add new layers in the future if we need to.

There are still parts of blockly that are directly accessing the block and bubble layers, these can be moved to use the layer manager.

Test Coverage

Added tests to make sure the layer manager properly handles adding new layers, and appending elements to the drag layer.

Manually tested that dragging elements and the worskpace seems to work properly, with the correct draw order.

Documentation

N/A

Additional Information

I know the issue said to just hard code a drag layer in there, but I didn't see a need to since I'm not working on anything else atm.

@github-actions github-actions bot added PR: fix Fixes a bug and removed PR: fix Fixes a bug labels Oct 30, 2023
@github-actions github-actions bot added PR: fix Fixes a bug and removed PR: fix Fixes a bug labels Oct 30, 2023
@BeksOmega BeksOmega marked this pull request as ready for review October 30, 2023 21:55
@BeksOmega BeksOmega requested a review from a team as a code owner October 30, 2023 21:55
@BeksOmega
Copy link
Collaborator Author

@NeilFraser Could you also pull this down and manually test it for me since this is kind of a dangerous area?

@BeksOmega BeksOmega merged commit 02cd1c6 into google:develop Nov 8, 2023
11 checks passed
@BeksOmega BeksOmega changed the title fix: blocks being dragged behind toolbox fix: blocks being dragged behind toolbox (re-re-add drag surface) Dec 4, 2023
@github-actions github-actions bot added PR: fix Fixes a bug and removed PR: fix Fixes a bug labels Dec 4, 2023
@BeksOmega BeksOmega deleted the fix/blocks-behind-toolbox branch May 14, 2024 16:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: fix Fixes a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

blocks behind toolbox while dragging to delete
2 participants