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

Coupling of specific blocks to @wordpress/block-editor package #46166

Open
4 tasks
getdave opened this issue Nov 29, 2022 · 1 comment
Open
4 tasks

Coupling of specific blocks to @wordpress/block-editor package #46166

getdave opened this issue Nov 29, 2022 · 1 comment
Assignees
Labels
[Block] Navigation Affects the Navigation Block [Type] Code Quality Issues or PRs that relate to code quality

Comments

@getdave
Copy link
Contributor

getdave commented Nov 29, 2022

The Nav block offcanvas experiment is proceeding along. I'm noticing some instances where we're referencing specific block's within the @wordpress/block-editor package.

I'd like to document these below for refactoring later. We should be thinking about

  • Trying to make the behaviour generic
  • Moving the code to the block itself (use slots/filters...)
  • Making use of block editor settings

Instances

@georgeh
Copy link
Contributor

georgeh commented Nov 30, 2022

In #45984 we are hard-coding core/page-list for the convert-to-links modal

const allowConvertToLinks =
'core/page-list' === block.name && totalPages <= MAX_PAGE_COUNT;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Navigation Affects the Navigation Block [Type] Code Quality Issues or PRs that relate to code quality
Projects
None yet
Development

No branches or pull requests

5 participants