-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Plugin: Backport bug fixes from Gutenberg 5.5.0 to wp/trunk
(WordPress 5.2 RC)
#14987
Commits on Apr 16, 2019
-
Configuration menu - View commit details
-
Copy full SHA for 3d3abd6 - Browse repository at this point
Copy the full SHA 3d3abd6View commit details -
Fix/post title borders in code editor (#14771)
* Remove thick left border for the title in the code editor. * Remove thick left border from the permalink field in the code editor. * Move styles into the `edit-post` module. * Remove no-longer-necessary style change. * Remove unnecessary styles.
Configuration menu - View commit details
-
Copy full SHA for 8913322 - Browse repository at this point
Copy the full SHA 8913322View commit details -
Fix: Restrict block insert, move, and replace attending to allowedBlo…
…cks, locking, and child blocks (#14003) Supersedes: https://github.com/WordPress/gutenberg/pull/7301/files Uses the select control implemented in #13924. This PR changes the action creators to be a generator and have all the required validations before yielding the action. Fixes: #14568; Fixes: #10186; Fixes: #13099; Missing the update to the unit tests. ## How has this been tested? Test block: [gist.github.com/jorgefilipecosta/b7194daac3ce26827522694fb4252c1c#file-testallowedblocksmiddleware-js](https://gist.github.com/jorgefilipecosta/b7194daac3ce26827522694fb4252c1c#file-testallowedblocksmiddleware-js) I pasted the test block referred in the browser console. I added the Product block. I verified I cannot move using drag & drop the Buy button out of the Product block. (child block restriction. I verified I cannot move using drag & drop a paragraph created outside of the Product block inside the product block. (allowed blocks restriction). I verified that if I press enter in the buy button or image inside the product block, a paragraph is not created (allowed blocks restriction). I added two galleries outside the product block, multi-selected them, and copied them ( ctrl + c ), I pasted them inside the list block inside the Product block and I verified they were not added (allowed blocks restriction). I verified that when we have a template lock and we press enter on the title we now do not insert unallowed blocks. Template lock code: ``` add_filter( 'allowed_block_types', function( $allowed_block_types, $post ) { if ( $post->post_type === 'post' ) { return $allowed_block_types; } return [ 'core/image', 'core/button' ]; }, 10, 2 ); ``` I verified that if we disable the paragraph, e.g., with a filter or inside the test block, pressing enter on the title or in placeholders does not add paragraph blocks. Pressing the sibling inserter also does not insert the paragraph (PR #7226). Code to disable paragraph: ``` function myplugin_register_book_lock_post_type() { $args = array( 'public' => true, 'template_lock' => 'all', 'label' => 'Books Lock', 'show_in_rest' => true, 'template' => array( array( 'core/image', array( ) ), array( 'core/heading', array( 'placeholder' => 'Add Author...', ) ), array( 'core/paragraph', array( 'placeholder' => 'Add Description...', ) ), ), ); register_post_type( 'book_lock', $args ); } add_action( 'init', 'myplugin_register_book_lock_post_type' ); ``` I added two image blocks, multi-selected them, copied them and tried to paste them on the list inside the test block. I checked the image blocks were not added inside the test block. All these actions are possible in master. Todo: If we accept this approach, end 2 end tests will be created before the merge that replicate this manual tests.
Configuration menu - View commit details
-
Copy full SHA for e234570 - Browse repository at this point
Copy the full SHA e234570View commit details -
Configuration menu - View commit details
-
Copy full SHA for 56bfeb7 - Browse repository at this point
Copy the full SHA 56bfeb7View commit details -
Fix Blocker Picker autocompleter icon spacing (#14772)
* Fixes classname to match package and CSS rule During the creation of block-editor the className on the autocompleter wasn’t updated. This change updates the class to use the `block-editor-` prefix. This causes the CSS to apply again thereby correcting the margin that was missing. * Revert "Fixes classname to match package and CSS rule" This reverts commit 28eb706. * Editor: Revert autocompleters classnames to editor prefix Co-Authored-By: Daniel Richards <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for cb39c74 - Browse repository at this point
Copy the full SHA cb39c74View commit details -
Avoid saving metaboxes before a preview (#14877)
* Remove logic that causes a metabox save before a preview * Add e2e test for preview with custom fields active. * Improve test robustness
Configuration menu - View commit details
-
Copy full SHA for 3e0f9e9 - Browse repository at this point
Copy the full SHA 3e0f9e9View commit details -
Configuration menu - View commit details
-
Copy full SHA for ca583e1 - Browse repository at this point
Copy the full SHA ca583e1View commit details -
Fix selecting separator block (#14854)
* fix selecting separator block * center align the inserter toggle
Configuration menu - View commit details
-
Copy full SHA for 0015eb1 - Browse repository at this point
Copy the full SHA 0015eb1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8dd2043 - Browse repository at this point
Copy the full SHA 8dd2043View commit details -
Refactor the Settings button CSS. (#14475)
* Refactor the Settings button CSS. * Remove box-shadow use padding and margin.
Configuration menu - View commit details
-
Copy full SHA for e2777f1 - Browse repository at this point
Copy the full SHA e2777f1View commit details -
Input Interaction: take into account container padding (#14804)
* Input Interaction: take into account container padding * Add e2e test
Configuration menu - View commit details
-
Copy full SHA for 887d8a4 - Browse repository at this point
Copy the full SHA 887d8a4View commit details -
Fix regression with column block being selected. (#14876)
* Fix regression with column block being selected. The columns block is currently slightly fiddly, due to the nesting nature of Columns > Column > Blocks structure. All three levels are "Blocks" in the block editor sense, and all can be selected. This is pending enhancements in #9628. However in the mean time, we have a hack in place, this uses `pointer-events` to prevent the _mouse_ selection of the individual column blocks. This makes it drastically simpler to select the Columns block, which is where you can adjust the number of columns in the block. The individual column blocks, on the other hand, is currently largely inactionable. You can set alignments on them, which is why #9628 is urgent, but until we have a better system for selecting parent blocks, this pointer-events hack is arguably the better stopgap solution. That hack regressed in master. This PR restores it, and makes it slightly better. Things to test: - Insert a columns block with content, and verify you can select both child and parent block. - Insert an "Archives" block inside a column, and verify that the block itself is clickable, but the links inside are not (it's using component-disabled to make archive links unfollowable) * Fix mess ¯\_(ツ)_/¯
Configuration menu - View commit details
-
Copy full SHA for ad7095b - Browse repository at this point
Copy the full SHA ad7095bView commit details -
Block Editor: Consider received blocks state change as ignored (#14916)
* Block Editor: Avoid creating new state reference on unchanging isPersistentChange * Block Editor: Consider received blocks state change as ignored * fixup a35fa82 * Block Editor: Regenerate documentation
Configuration menu - View commit details
-
Copy full SHA for 949bef3 - Browse repository at this point
Copy the full SHA 949bef3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 026734f - Browse repository at this point
Copy the full SHA 026734fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9be8b69 - Browse repository at this point
Copy the full SHA 9be8b69View commit details -
Fix regression with color swatch focus style (#14944)
When you focus a color swatch, the circle around the check is offset. Removing the border that this PR removes, fixes that, and appears to not have any side-effects. I'm not sure how it regressed.
Configuration menu - View commit details
-
Copy full SHA for bb5f4c7 - Browse repository at this point
Copy the full SHA bb5f4c7View commit details -
Remove box shadow from the (#14936)
Fixes #14853. This removes the box shadow on the inserter button that appears to the left of the default block appender (or to the right on mobile). This brings the hover state in line with the hover state for the sibling inserter.
Configuration menu - View commit details
-
Copy full SHA for 83fc56f - Browse repository at this point
Copy the full SHA 83fc56fView commit details -
Adjust clashing shortcuts used for character input (#14681)
* Adjust clashing shortcuts used for character input * Update modal * adds docs correction to correspond, adds inlined script to remove production dead code
Configuration menu - View commit details
-
Copy full SHA for 709d68c - Browse repository at this point
Copy the full SHA 709d68cView commit details -
Button Block: fix space insertion (#14925)
* Button Block: fix space insertion * Typo * Allow rule for preview
Configuration menu - View commit details
-
Copy full SHA for b8b3d2a - Browse repository at this point
Copy the full SHA b8b3d2aView commit details -
Format Library: Assign Popover anchorRect to update selection position (
#14938) * Block Editor: Pass spread props from URLPopover to Popover Avoids need to explicitly support onClickOutside as deprecated pass-through prop, instead leveraging pass-through nature of spread props. * Format Library: Assign Popover getAnchorRect to update selection position * Format Library: Compute memoized anchor from caret point or active element * Components: Add anchorRect prop to Popover component * Format Library: Provide direct reference to Popover anchorRect * Format Library: Consider next element sibling for initial caret placement Co-Authored-By: Ella van Durpe <[email protected]> * Components: Mark PositionedAtSelection as unstable * Components: Remove getAnchorRect mention from Popover README
Configuration menu - View commit details
-
Copy full SHA for 9a29787 - Browse repository at this point
Copy the full SHA 9a29787View commit details -
Fix spacer NaN warning (#14785)
* Fix spacer NaN warning * Set the min height of spacer block * Reset the customHeight if it is invalid * Add local state in spacer * Update input field's value when using drag handle
Configuration menu - View commit details
-
Copy full SHA for 4c91030 - Browse repository at this point
Copy the full SHA 4c91030View commit details -
Configuration menu - View commit details
-
Copy full SHA for 660fbaa - Browse repository at this point
Copy the full SHA 660fbaaView commit details