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

Address Warning that ImageEdit is Using Deprecated componentWillReceiveProps #1228

Merged

Conversation

mchowning
Copy link
Contributor

@mchowning mchowning commented Jul 13, 2019

Related gutenberg PR

Summary

This fixes one of the warnings that we now see when running the demo app because of the use of the deprecated componentWillReceiveProps component lifecycle method.

On launching the app, you will still see the warning for use of the deprecated componentWillReceiveProps method, but now there should be only 1 warning instead of 2 😃 (addressing the other warning is a bit less straightforward, so I wanted to just keep this PR very small and focused).

Before After
Screen Shot 2019-07-13 at 1 40 09 PM Screen Shot 2019-07-13 at 1 38 04 PM

Testing

First, check the warnings on loading the demo app and confirm that there is no longer the warning for ImageEdit.

Second, verify that the new static method is still addressing the UI flicker that the initial method was added to fix. As noted in the original PR adding this method, this state update was added to avoid a UI flicker in the format bar when switching away from an image caption where the toolbar buttons for both the caption and the newly-selected block were shown at the same time.

  1. Open demo app
  2. Select an image caption
  3. Select another block with rich text formatting
  4. Verify that the rich text editing buttons for both the image caption and the newly selected are not briefly both displayed in the format bar (i.e., you see duplicates of each icon).

Update release notes:

No updates made to release notes because there are no user-facing changes.

@mchowning mchowning added this to the 1.10 milestone Jul 13, 2019
@mchowning mchowning self-assigned this Jul 13, 2019
Copy link
Contributor

@etoledom etoledom left a comment

Choose a reason for hiding this comment

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

Looks good!
Approved via WordPress/gutenberg#16577 (review)

@mchowning mchowning force-pushed the remove_image_component_use_of_componentWillReceiveProps branch from 25b0b16 to bb430c9 Compare July 15, 2019 16:41
@mchowning mchowning merged commit a4dacee into develop Jul 15, 2019
@mchowning mchowning deleted the remove_image_component_use_of_componentWillReceiveProps branch July 15, 2019 17:04
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.

2 participants