-
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
feat: use new intermediate block change event for field edits, normal block change event for closing editor. #7105 #7151
feat: use new intermediate block change event for field edits, normal block change event for closing editor. #7105 #7151
Conversation
…ield_intermediate_change.ts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the incredible amount of work on this John!! Just a few comments about inline comments, then LGTM =)
core/field_angle.ts
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add this change in samples as well? Since we're migrating the angle field over there (we're leaving it in both places for a month or two to give people time to transition).
If not I can grab this since I'm testing samples this quarter anyway =)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably not until this is committed and blockly-samples depends on the latest version, but I created an issue to do so: google/blockly-samples#1717
Another proposal to fix #2496. Creates a new event type specifically for intermediate field value changes, which is not recorded in undo history. Inhibits firing normal block change events for field value edits when triggered via a user input widget, and instead broadcasts this new event type. When the input widget is disposed, then a standard block change event will be fired with an oldValue corresponding to what the field's value was when the widget was opened.
Compare with: #7064 and #7105
Unlike #7105 this version of the new event type inherits from BlockBase instead of UiBase. The difference is minor and only affects one file: events_block_field_intermediate_change.ts