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

Make it so that the backpack is compatible with other types besides blocks #2311

Closed
1 task done
BeksOmega opened this issue Apr 4, 2024 · 1 comment
Closed
1 task done
Assignees
Labels
type: feature request New feature or request

Comments

@BeksOmega
Copy link
Contributor

BeksOmega commented Apr 4, 2024

Check for duplicates

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

Component

workspace-backpack

Problem

Currently the backpack plugin is hard coded to only accept blocks into the backpack. This was fine back when the only objects that could be dragged and dropped were blocks. But now that we’ve generalized the drag system so that anything that fulfills the ISelectable and IDraggable interfaces can be dragged, it is too restrictive.

For example, this makes it impossible for the multiselect plugin to be compatible with the backpack plugin.

Request

Add an interface to the backpack plugin that it can use to check if an IDraggable should be added to the backpack.

interface Backpackable {
  toFlyoutData(): FlyoutItemInfo[];
}

Alternatives considered

N/A

Additional context

This will also require the BlockSvg in core to implement toFlyoutData.

@BeksOmega BeksOmega added type: feature request New feature or request triage labels Apr 4, 2024
@BeksOmega
Copy link
Contributor Author

@HollowMan6 as a heads up!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature request New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants