feat(website): let the branches block announce a location before it opens
Checking the rendered result against the client's own branch data showed the
block was reproducing the wrong rule. Their site lists fifteen branches and dims
nine of them, each captioned with the dates it opens — the dimming tracks
whether the branch is switched on, and the season window is the explanation
shown to the reader, not the test.
Ours filtered `is_active = false` out of the query entirely, so those nine
simply did not exist on the page. A branch under construction is exactly the
thing a marketing site wants to show.
- `getBranches()` takes `$includeInactive`, cached under its own key so the two
result sets cannot overwrite each other.
- `data_branches` offers `show_inactive`, and treats a branch as dormant when it
is switched off OR outside its declared season — a branch with no window stays
open all year, as before.
- Open branches sort first, so an announced-but-closed location never pushes a
working one below the fold.
Verified on the local replica with two dormant branches alongside seven live
ones: the dormant pair render dimmed with their location and opening dates while
the rest keep the accent border. 22 page/locale combinations answer 200 with no
logged block failures, 137 block/variant combinations render, suite passes.
Co-Authored-By:
Claude Opus 5 (1M context) <noreply@anthropic.com>
Showing
Please register or sign in to comment