Skip to content

Conversation

@koke
Copy link
Member

@koke koke commented Aug 7, 2018

This brings the implementation closer to the web by only changing the specified attributes instead of replacing everything with the passed attributes.

This means that callers don't need to be aware and prepend ...this.props.attributes and can just worry about specifying the change they want, for instance:

setAttributes( { dropCap: ! attributes.dropCap } );

This was added so that our onChange and onContentSizeChange methods don't need to have access to this.props, but also to match how the web behaves.

koke added 2 commits August 7, 2018 18:39
This brings the implementation closer to the web by only changing the
specified attributes instead of replacing everything with the passed
attributes.

This means that callers don't need to be aware and prepend
`...this.props.attributes` and can just worry about specifying the
change they want (e.g. `setAttributes( { dropCap: ! attributes.dropCap } );`)
@koke koke requested a review from mzorz August 7, 2018 17:10
Copy link
Contributor

@mzorz mzorz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM :shipit:

@mzorz mzorz merged commit 6fba4ba into master Aug 7, 2018
@mzorz mzorz deleted the update/set-attributes-changed-only branch August 7, 2018 21:06
hypest pushed a commit that referenced this pull request Jan 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants