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

Fix synced pattern editing in write mode and refactor block editing mode to reducer #67026

Merged
merged 37 commits into from
Nov 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
d40b25a
Add higher order reducer for pattern block editing modes.
talldan Nov 12, 2024
58135ce
Add higher order reducer for block editing modes while section editing
talldan Nov 14, 2024
705928d
Handle RESET_ZOOM_LEVEL action
talldan Nov 12, 2024
98c7c81
Bug fixes
talldan Nov 14, 2024
4c69c4f
Avoid mutating `state` in new higher order reducers
talldan Nov 15, 2024
20bfa15
Try moving synced pattern client ids into a separate reducer
talldan Nov 15, 2024
f723335
Revert "Try moving synced pattern client ids into a separate reducer"
talldan Nov 15, 2024
8aa6788
Try amalgamating the different derived block editing modes
talldan Nov 15, 2024
c2ce911
Fixes
talldan Nov 15, 2024
7e39de8
Fix synced patterns in write mode, unbound content blocks being editable
talldan Nov 15, 2024
0745785
Also update derived block editing mode on `REPLACE_INNER_BLOCKS
talldan Nov 18, 2024
1610b40
Fix descending through controlled inner blocks
talldan Nov 18, 2024
9de13a2
Fix nested pattern handling - always process synced patterns in the r…
talldan Nov 18, 2024
e9280b8
Zoomed out fixes - content should never be editable in zoomed out, ev…
talldan Nov 18, 2024
4676870
Docs
talldan Nov 18, 2024
3c777ac
Add end to end test
talldan Nov 18, 2024
d8f9fde
Remove navigation mode selector tests
talldan Nov 18, 2024
90056d6
Fix partial mocking of blocks package
talldan Nov 18, 2024
9eee5ec
Add test for isContentBlock
talldan Nov 19, 2024
ce9c6ea
Add unit tests
talldan Nov 19, 2024
a9710a9
Remove defaultBlockEditingMode concept
talldan Nov 20, 2024
0443676
Handle patterns that are outside sections in nav mode
talldan Nov 20, 2024
adc345c
Remove comment
talldan Nov 20, 2024
3f40e4d
Refactor to handle tree subsections
talldan Nov 20, 2024
2720e13
Optimize each individual action
talldan Nov 20, 2024
82d99d2
Fixes and refinements
talldan Nov 20, 2024
0ba798d
Comments and renamings
talldan Nov 20, 2024
625082e
Remove test mocking - else test chokes trying to unlock privateApis
talldan Nov 20, 2024
30598e2
Rework reducer unit tests and add more cases
talldan Nov 21, 2024
fe8ba5b
Add more tests
talldan Nov 21, 2024
713a795
Handle when the SET_HAS_CONTROLLED_INNER_BLOCKS block has been remove…
talldan Nov 21, 2024
f849f5b
Inline editing mode calculation for individual blocks
talldan Nov 25, 2024
7b25f6e
Calculate both the regular and nav mode derived block editing modes a…
talldan Nov 25, 2024
84e0fa3
Update getEnabledClientIdsTree dependencies
talldan Nov 25, 2024
e04a66c
Fix tests
talldan Nov 25, 2024
60b3dfa
Update more tests
talldan Nov 25, 2024
87a2d67
Enable write mode experiment for e2e pattern overrides block editing …
talldan Nov 26, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ const blockLabelMap = {
};

jest.mock( '@wordpress/blocks', () => {
const actualImplementation = jest.requireActual( '@wordpress/blocks' );
return {
...actualImplementation,
isReusableBlock( { title } ) {
return title === 'Reusable Block';
},
Expand Down
12 changes: 6 additions & 6 deletions packages/block-editor/src/store/private-selectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,16 +109,16 @@ function getEnabledClientIdsTreeUnmemoized( state, rootClientId ) {
*
* @return {Object[]} Tree of block objects with only clientID and innerBlocks set.
*/
export const getEnabledClientIdsTree = createRegistrySelector( ( select ) =>
createSelector( getEnabledClientIdsTreeUnmemoized, ( state ) => [
export const getEnabledClientIdsTree = createSelector(
getEnabledClientIdsTreeUnmemoized,
( state ) => [
state.blocks.order,
state.derivedBlockEditingModes,
state.derivedNavModeBlockEditingModes,
state.blockEditingModes,
state.settings.templateLock,
state.blockListSettings,
select( STORE_NAME ).__unstableGetEditorMode( state ),
state.zoomLevel,
getSectionRootClientId( state ),
] )
]
);

/**
Expand Down
Loading
Loading