Skip to content

feat: Relax access restrictions on BlockDragStrategy - #10273

Open
gonfunko wants to merge 1 commit into
mainfrom
drag-strategy
Open

feat: Relax access restrictions on BlockDragStrategy#10273
gonfunko wants to merge 1 commit into
mainfrom
drag-strategy

Conversation

@gonfunko

Copy link
Copy Markdown
Contributor

The basics

The details

Proposed Changes

This PR switches a number of fields and methods in BlockDragStrategy from private to protected.

Reason for Changes

BlockDragStrategy can reasonably be expected to be subclassed, and the existing access restrictions made this challenging. The members that have been changed are those that I'm reasonably confident are stable, would likely be needed by subclasses, and have not-hideous APIs. These changes would ease or enable implementation of several drag strategies in Scratch, for e.g. duplicating blocks on drag, using a parent block as a drag target instead of the clicked block, and always using a new ID when dragging blocks out of the flyout to the main workspace.

@gonfunko
gonfunko requested a review from a team as a code owner August 14, 2026 20:34
@gonfunko
gonfunko requested a review from mikeharv August 14, 2026 20:34
@github-actions github-actions Bot added the PR: feature Adds a feature label Aug 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR: feature Adds a feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants