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

refactor!: Add setSelectedItem() to IToolbox. #8650

Merged
merged 1 commit into from
Nov 12, 2024

Conversation

gonfunko
Copy link
Contributor

@gonfunko gonfunko commented Nov 8, 2024

The basics

The details

Resolves

Fixes #7273

Proposed Changes

This PR updates the IToolbox interface by adding setSelectedItem(), to pair with the existing getSelectedItem(). The linked issue requested a method to select an item by ID, but since this (a) adds a setter to an existing getter (b) is already implemented in the core Toolbox class and (c) you'd need to have an item to get its ID anyway, I think this addresses the root need and is a bit cleaner.

Breaking Change

This is a breaking change; implementers of this interface will need to add this method. Blockly's core Toolbox class already does implement this method, so subclasses of that will get it for free.

@gonfunko gonfunko requested a review from a team as a code owner November 8, 2024 22:28
@gonfunko gonfunko requested a review from cpcallen November 8, 2024 22:28
@github-actions github-actions bot added breaking change Used to mark a PR or issue that changes our public APIs. PR: refactor labels Nov 8, 2024
@gonfunko gonfunko merged commit af5905a into google:rc/v12.0.0 Nov 12, 2024
11 checks passed
@gonfunko gonfunko deleted the toolbox-select-by-id branch November 12, 2024 19:45
@cpcallen
Copy link
Contributor

Can I recommend you pull out the relevant parts of the PR description into a (thus formatted)

BREAKING CHANGE: …

section, for ease of reference—and make sure that that section is included in the squash commit message?

@github-actions github-actions bot added breaking change Used to mark a PR or issue that changes our public APIs. PR: refactor and removed breaking change Used to mark a PR or issue that changes our public APIs. PR: refactor labels Nov 12, 2024
@gonfunko
Copy link
Contributor Author

Sorry I missed this when I merged, but edited the PR description to call it out in its own section.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change Used to mark a PR or issue that changes our public APIs. PR: refactor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants