-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Determine if the locking mechanism can be extracted to a separate place #11442
Comments
My API proposal: class Editor {
constructor() {
// The PropertyLock class takes care about the value of a property that can be locked and exposes the API.
this.readOnlyLock = new PropertyLock( this, 'isReadOnly' );
}
}
const editor = new Editor();
editor.isReadOnly // an observable read-only property, equals true or false.
editor.readOnlyLock.set( 'foo', value = true );
editor.readOnlyLock.has( 'foo' );
editor.readOnlyLock.clear( 'foo' ); |
There has been no activity on this issue for the past year. We've marked it as stale and will close it in 30 days. We understand it may be relevant, so if you're interested in the solution, leave a comment or reaction under this issue. |
There has been no activity on this issue for the past year. We've marked it as stale and will close it in 30 days. We understand it may still be relevant, so if you're interested in the solution, leave a comment or reaction under this issue. |
We've closed your issue due to inactivity over the last year. We understand that the issue may still be relevant. If so, feel free to open a new one (and link this issue to it). |
A follow-up to #10496.
After the changes from this PR, we'll have places that share the logic for the lock mechanism (
Command#isDisabled
andEditor#isReadOnly
) This issue is about checking if the logic can be extracted as a mixin or another thing and applied to all places that will need such a mechanism.Also, we need to think about providing good API as discovering methods for changing properties may be tricky.
The text was updated successfully, but these errors were encountered: