Skip to content

Refactor Navigation block render function to be open for extension #52470

Closed
@getdave

Description

Over the years the render_block_core_navigation function has grown to be pretty unwiedly. Making any changes is prone to error and there's little in the way of direct test coverage (we do have e2e tests).

Let's start an incremental refactor with lots of small PRs which break this function down into discreet functions which do one thing. As this process occurs let's add PHPUnit tests to provide test coverage for the smaller functions.

When complete the main render_block_core_navigation should be easy to reason about and extend.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions