Skip to content

Move BeyondCode & Laradevs to sponsors in docs sidebar rotation#433

Merged
simonhamp merged 1 commit into
mainfrom
sponsor-rotation-move
Jul 17, 2026
Merged

Move BeyondCode & Laradevs to sponsors in docs sidebar rotation#433
simonhamp merged 1 commit into
mainfrom
sponsor-rotation-move

Conversation

@simonhamp

Copy link
Copy Markdown
Member

What

Moves BeyondCode and Laradevs from the partners rotation to the sponsors rotation in the docs/blog sidebar.

  • resources/views/components/sponsors/lists/docs/featured-sponsors.blade.php (partners) — drops the two entries; now rotates Nexcalia, Web Mavens, Synergi Tech.
  • resources/views/components/sponsors/lists/docs/sponsors.blade.php (sponsors) — adds BeyondCode and Laradevs alongside Artisan Build.

This completes the sidebar equivalent of #430, which handled the home page.

How

Both sidebar lists previously picked a single entry server-side with array_rand, which renders only one item per request and can't be tested deterministically (and freezes on the picked entry under full-page caching). They now:

  • render all entries and pick one client-side with Alpine (x-data + x-show/x-cloak), mirroring the sibling ad-rotation component in the same sidebar; and
  • accept the pool via an injectable @props prop (defaulting to the current content), so the data can be fed in — forward-compatible with moving this content to a database later.

Tests

Rewrote the placement tests to cover the rotation mechanism with injected fixture pools rather than asserting specific sponsor/partner names (content that's expected to change / move to a DB):

  • each sidebar list renders one rotating link per entry and wires the random client-side pick;
  • the /partners page renders its partners section.

php artisan test tests/Feature/SponsorsAndPartnersPlacementTest.php and the related AdRotationTest pass; Pint is clean.

Note

The partner/sponsor listings are currently duplicated across several views (partners in 3 files, sponsors in 2, in two different data shapes) rather than centralised. Not addressed here; a follow-up could consolidate them into a single source.

🤖 Generated with Claude Code

Move the two entries from the partners rotation to the sponsors
rotation, and render both docs sidebar lists client-side (Alpine
render-all + random pick) via an injectable pool prop, mirroring the
ad-rotation component. Tests now cover the rotation mechanism with
injected fixtures instead of asserting specific sponsor/partner names.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@simonhamp
simonhamp marked this pull request as ready for review July 17, 2026 16:58
@simonhamp
simonhamp merged commit 15dec7c into main Jul 17, 2026
2 checks passed
@simonhamp
simonhamp deleted the sponsor-rotation-move branch July 17, 2026 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant