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

Cover Image: Extract title as children array (fix "modified externally") #2341

Merged
merged 2 commits into from
Aug 10, 2017

Conversation

aduth
Copy link
Member

@aduth aduth commented Aug 10, 2017

Related: #1929

This pull request seeks to resolve an issue where the Cover Image block can trigger a "modified externally" warning after adding inline formatting to the title text. This is caused by an incompatibility between how the attribute is sourced, and how it is assigned / edited. Specifically:

The value of Editable should always be an attribute which is sourced as children. We should consider adding better logging / messaging around the expected type of its value (i.e. warn if passed as string).

Testing instructions:

Verify with the following flow you do not see a "modified externally" warning:

  1. Navigate to Gutenberg > New Post
  2. Insert a Cover Image
  3. Assign an image to the block
  4. Add some text to the cover image
  5. Select and apply inline formatting to text (Screenshot)
  6. Save post
  7. Refresh page

@aduth aduth added the [Feature] Blocks Overall functionality of blocks label Aug 10, 2017
@codecov
Copy link

codecov bot commented Aug 10, 2017

Codecov Report

Merging #2341 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2341   +/-   ##
=======================================
  Coverage   24.69%   24.69%           
=======================================
  Files         152      152           
  Lines        4738     4738           
  Branches      799      799           
=======================================
  Hits         1170     1170           
  Misses       3014     3014           
  Partials      554      554
Impacted Files Coverage Δ
blocks/library/cover-image/index.js 30.43% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a6cf4e3...ce77f24. Read the comment docs.

@aduth aduth merged commit fae7483 into master Aug 10, 2017
@aduth aduth deleted the fix/cover-image-modified-externally branch August 10, 2017 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Blocks Overall functionality of blocks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants