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

Components: Drop withContext optional mapSettingsToProps #3601

Merged
merged 1 commit into from Nov 21, 2017

Conversation

Projects
None yet
1 participant
@aduth
Member

aduth commented Nov 21, 2017

Regression introduced in #3577

This pull request seeks to resolve an error which occurs when inserting a new image block. Notably, it was planned to support omitting the mapSettingsToProps function altogether, but the logic to detect component by instanceof Component is flawed, since it does not account for function components. Support for this usage has been dropped in favor of consistently providing mapSettingsToProps, even if explicitly undefined.

To atone for my trespasses, I have included shiny new documentation and unit tests for the expected use of withContext.

Testing instructions:

Verify that you can insert and edit a block in the editor.

  1. Navigate to Posts > New Post
  2. Insert an image block
  3. Note that no errors occur

@aduth aduth added the Blocks label Nov 21, 2017

@codecov

This comment has been minimized.

Show comment
Hide comment
@codecov

codecov bot Nov 21, 2017

Codecov Report

Merging #3601 into master will increase coverage by 0.02%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3601      +/-   ##
==========================================
+ Coverage   36.56%   36.58%   +0.02%     
==========================================
  Files         267      267              
  Lines        6632     6631       -1     
  Branches     1203     1202       -1     
==========================================
+ Hits         2425     2426       +1     
+ Misses       3554     3553       -1     
+ Partials      653      652       -1
Impacted Files Coverage Δ
components/higher-order/with-context/index.js 100% <ø> (+42.85%) ⬆️
blocks/library/image/block.js 1.81% <0%> (-0.04%) ⬇️

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 d526b85...916fbe7. Read the comment docs.

codecov bot commented Nov 21, 2017

Codecov Report

Merging #3601 into master will increase coverage by 0.02%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3601      +/-   ##
==========================================
+ Coverage   36.56%   36.58%   +0.02%     
==========================================
  Files         267      267              
  Lines        6632     6631       -1     
  Branches     1203     1202       -1     
==========================================
+ Hits         2425     2426       +1     
+ Misses       3554     3553       -1     
+ Partials      653      652       -1
Impacted Files Coverage Δ
components/higher-order/with-context/index.js 100% <ø> (+42.85%) ⬆️
blocks/library/image/block.js 1.81% <0%> (-0.04%) ⬇️

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 d526b85...916fbe7. Read the comment docs.

@aduth aduth merged commit 41f6c93 into master Nov 21, 2017

3 checks passed

codecov/project 36.58% (+0.02%) compared to d526b85
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@aduth aduth deleted the fix/image-block-with-context branch Nov 21, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment