-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce section container selection when assembling patterns (zoom …
…out mode) (#59249) * Zoom Out: Only enable the zoom-out mode within the main group * Hide inner blocks if block has active overlay * Account for assembling pages by using post content block as section container * use maybedisable as a name for the disabling component * Refactor components to hooks * rebase fix missed isZoomedOutView changes in trunk * don't spread the client ids * create a new selector to find the root section block name * correct some variable names, remove testing code * remove useless call to function in the editor package * remove the useEffect in the editor component of edit site, use the action that sets the context to set the section root block too * WIP Refactor hook to store action * Fix copy/paste mistake * combine state and modes in the reducer correctly into one iterable * enable selection for no root section block * enable section selection for sections when there is no root section container * Use registry.batch instead * Replace bulk actions with registry.batch * make section root selector and action private * dispatch set block mode action * privatize the section root block client id selector Conflicts: packages/block-editor/src/store/private-selectors.js * Remove unused reducers * Refactor to group by if we have a sectionsContainerClientId * Add wrapper to prevent running a bunch of loops in non-zoom out modes * Move SET_EDITOR_MODE back to the end so prevMode works * Add comments for two main sections * Use constant instead of random empty string * Revert remaining block-list changes * Refactor to use select * Refactor to use ROOT_CONTAINER_CLIENT_ID instead of empty string * Move zoom-out logic to selector instead of action * Remove registry.batch * Update JSDoc for ROOT_CONTAINER_CLIENT_ID defaults * Revert pattern edit.js * Fix selectors in selectors * Fix selection when entering zoom-out mode * Fix case wher getBlock returns null * Optimize selector some more * Fix missing imports * Revert ROOT_CONTAINER_CLIENT_ID rename * Revert list-view changes * Try moving post type logic into useBlockEditorSettings * Try make sectionRootClientId a private setting * Remove unused code * Fix selected block in zoom out mode * Rename _settings to blockEditorSettings * Remove destructuing * make templates with no root also work * Check block list for active block overlay * Pass rendering mode instead of type * Fix an issue where some selectors pass null as a default value instead of undefined * Try disabling all non-children of the sectionRoot * don't put overlay on all blocks in zoom out, just root and section children --------- Co-authored-by: youknowriad <[email protected]> Co-authored-by: getdave <[email protected]> Co-authored-by: draganescu <[email protected]> Co-authored-by: ajlende <[email protected]> Co-authored-by: scruffian <[email protected]> Co-authored-by: richtabor <[email protected]> Co-authored-by: ellatrix <[email protected]> Co-authored-by: Mamaduka <[email protected]> Co-authored-by: talldan <[email protected]>
- Loading branch information
1 parent
d8215e9
commit ecf24f9
Showing
4 changed files
with
123 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters