Skip to content

Commit 1c246aa

Browse files
authored
refactor: Avoid private useBlockEditorSettings API (#108)
* refactor: Avoid private useBlockEditorSettings The `useBlockEditorSettings` function is not exported, even as a private API. Using it is brittle, at best, and the approach is not possible when sourcing WordPress package scripts from remote sites. These changes still patch the `@wordpress/block-editor` package to (1) allow the "quick inserter" to open the primary inserter and (2) enable the Media tab in the inserter. Long-term, we should remove these patches and replace them with changes to core. * fix: Avoid exception from incomplete post data When a post object is unavailable, we must ensure the raw title and content fields have fallback values. Otherwise, the host bridge logic throws while referencing values on an undefined object. * fix: Enforce fixed toolbar Now that we rely upon `EditorProvider` over `BlockEditorProvider`, we can no longer configure the former with the `hasFixedToolbar` prop. Instead, we must rely upon the preference store configuration. * refactor: Remove now redundant `useGBKSettings` We now render `EditorProvider` rather than `BlockEditorProvider`, so we no longer configure the latter with explicit settings. We also do not have explicit settings we need to pass to the former, so we pass an empty object to avoid exceptions from referencing values on an undefined object. * task: Capture build output
1 parent 947c531 commit 1c246aa

File tree

15 files changed

+180
-247
lines changed

15 files changed

+180
-247
lines changed

ios/Sources/GutenbergKit/Gutenberg/assets/index-B5TqVEgG.js renamed to ios/Sources/GutenbergKit/Gutenberg/assets/index-BMmsRBi8.js

Lines changed: 105 additions & 105 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ios/Sources/GutenbergKit/Gutenberg/assets/index-BzYJLdTZ.js

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)