Skip to content
Merged
Changes from all commits
Commits
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 @@ -127,7 +127,7 @@ function useBlockEditorSettings( settings, hasTemplate ) {

return {
canUseUnfilteredHTML: canUserUseUnfilteredHTML(),
reusableBlocks: select( 'core' ).getEntityRecords(
reusableBlocks: select( coreStore ).getEntityRecords(
'postType',
'wp_block',
/**
Expand All @@ -151,11 +151,11 @@ function useBlockEditorSettings( settings, hasTemplate ) {
() => ( {
...pick( settings, [
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using pick here is error prone as, when one adds a new editor setting, one has to also remember to add the setting name here. I wonder if flipping this to be omit would be better?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @noisysocks

I was getting desperate and then came across your comment.

Maybe we should document this for other contributors. Or use pick( settings, Object.keys( SETTINGS_DEFAULTS ) ).

'__experimentalBlockDirectory',
'__experimentalBlockPatterns',
'__experimentalBlockPatternCategories',
'__experimentalBlockPatterns',
'__experimentalFeatures',
'__experimentalGlobalStylesUserEntityId',
'__experimentalGlobalStylesBaseStyles',
'__experimentalGlobalStylesUserEntityId',
'__experimentalPreferredStyleVariations',
'__experimentalSetIsInserterOpened',
'alignWide',
Expand All @@ -167,16 +167,17 @@ function useBlockEditorSettings( settings, hasTemplate ) {
'disableCustomColors',
'disableCustomFontSizes',
'disableCustomGradients',
'enableCustomUnits',
'enableCustomLineHeight',
'enableCustomSpacing',
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the fix.

'enableCustomUnits',
'focusMode',
'fontSizes',
'gradients',
'hasFixedToolbar',
'hasReducedUI',
'imageDimensions',
'imageEditing',
'imageSizes',
'imageDimensions',
'isRTL',
'keepCaretInsideBlock',
'maxWidth',
Expand Down