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

Block Library: Navigation: Refactor to use render_callback #21660

Closed
aduth opened this issue Apr 16, 2020 · 2 comments
Closed

Block Library: Navigation: Refactor to use render_callback #21660

aduth opened this issue Apr 16, 2020 · 2 comments
Assignees
Labels
[Block] Navigation Affects the Navigation Block Good First Issue An issue that's suitable for someone looking to contribute for the first time [Package] Block library /packages/block-library [Type] Code Quality Issues or PRs that relate to code quality

Comments

@aduth
Copy link
Member

aduth commented Apr 16, 2020

Previously: #21467, #19991

Context:

#21467 enables support for render_callback to receive the block instance as an argument. This had been needed for the Navigation block in referencing inner blocks, originally implemented in #16796 as an extra argument of render_callback, proposed for core enhancement at Trac#48104, then ultimately reverted to an alternative (admittedly more cumbersome) approach using filtering in #19991.

Task:

Revise the implementation of Navigation block to use render_callback, using the $block argument to reference inner blocks.

Motivation:

This is largely for code quality and maintainability of the block, since using the render_block filter is an unnecessarily complex means to customize the render output of a block, vs. the first-class render_callback callable setting of a block.

@aduth aduth added Good First Issue An issue that's suitable for someone looking to contribute for the first time [Type] Code Quality Issues or PRs that relate to code quality [Package] Block library /packages/block-library [Block] Navigation Affects the Navigation Block labels Apr 16, 2020
@talldan talldan self-assigned this Apr 17, 2020
@talldan
Copy link
Contributor

talldan commented Apr 17, 2020

I can handle this as part of #21075.

@talldan
Copy link
Contributor

talldan commented Jul 28, 2020

Closed by #21075

@talldan talldan closed this as completed Jul 28, 2020
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 Good First Issue An issue that's suitable for someone looking to contribute for the first time [Package] Block library /packages/block-library [Type] Code Quality Issues or PRs that relate to code quality
Projects
None yet
Development

No branches or pull requests

2 participants