Skip to content

Conversation

@gonfunko
Copy link
Contributor

The basics

The details

Resolves

Fixes #8732

Proposed Changes

This PR adds a setIsReadOnly() method to Workspace that allows dynamically toggling readonly status at runtime. Previously, the readonly option could only be set at injection time, and thus required reinjecting the workspace to modify.

For backwards compatibility, the readOnly field in the options dictionary is updated when the state is changed, since this was previously the only way to observe the readonly status. A getter, isReadOnly(), has also been introduced, and core has been refactored to use it.

Reason for Changes

This unblocks #8732, but also has potential instructional usecases.

@gonfunko gonfunko requested a review from a team as a code owner January 28, 2025 20:43
@github-actions github-actions bot added the PR: feature Adds a feature label Jan 28, 2025
@gonfunko gonfunko changed the base branch from develop to rc/v12.0.0 January 28, 2025 21:14
@github-actions github-actions bot added PR: feature Adds a feature and removed PR: feature Adds a feature labels Jan 28, 2025
@gonfunko gonfunko closed this Jan 30, 2025
@gonfunko gonfunko reopened this Jan 30, 2025
@gonfunko gonfunko merged commit 343c2f5 into RaspberryPiFoundation:rc/v12.0.0 Jan 30, 2025
7 checks passed
@gonfunko gonfunko deleted the toggle-readonly branch January 30, 2025 21:47
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.

Headless/read-only blocks cleanup

2 participants