Skip to content

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

@getdave

Description

@getdave

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.

Metadata

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