Refactor Navigation block render
function to be open for extension #52470
Closed
Description
opened on Jul 10, 2023
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