Give each canonical layout a page of its own in the Layout section

Plan step 38: the Layout section's Overview keeps its breakpoint
table and live "This window" readout (now a shared
<x-showcase::breakpoint-readout> partial, and the five breakpoint
cards a real range-queried data-md-showcase-breakpoint-card instead
of Tailwind's max-medium:/medium:max-expanded: variants), but the
three canonical layouts move off it onto a page of their own:
/material/layout/{list-detail,supporting-pane,feed}
(ShowcaseController::layout(), routes/showcase.php), each built on
the real component, sharing one <x-section-nav> Sections::
layoutPages() feeds. The search index gains an entry per page with
its own URL, and the component-homes scan now also reads the three
pages' own source so <x-list-detail>, <x-supporting-pane> and
<x-feed> keep a home.

The whole section moves onto the layout components and md-* classes:
no bespoke Tailwind grid or table styling remains.

LayoutTest's browser test now visits the three dedicated pages
instead of one shared /material/layout; a new Feature test asserts
each page renders and is linked from the Layout section.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Qwx5USif3wFFmxtHg5U1g9
This commit is contained in:
Andreas Reinhold / reini
2026-09-15 04:22:38 +02:00
co-authored by Claude Sonnet 5
parent 44a29a8ea2
commit 487176d345
11 changed files with 355 additions and 120 deletions
@@ -0,0 +1,56 @@
{{-- The list-detail canonical layout on a page of its own (plan step 38): the same working demo
the Layout section's Overview linked from its own navigation, built on the real
<x-list-detail>, with the live breakpoint readout the Overview page has. --}}
@extends('livewire-material::showcase.layout')
@php
$code = <<<'BLADE'
<x-surface level="surface" corner="lg" outlined x-data="{ message: null }" style="overflow: clip">
<x-list-detail x-model="message">
<x-slot:list>
<x-pane title="Inbox" heading="h3" :sticky="false">
<x-list label="Messages">
<x-list-item title="Anna Müller" description="The photos from Saturday" avatar="AM" link="#example-list-detail" no-wire-navigate x-on:click.prevent="selected = 1" x-bind:aria-current="selected === 1 ? 'true' : null" />
<x-list-item title="Ben Keller" description="Contract, second draft" avatar="BK" link="#example-list-detail" no-wire-navigate x-on:click.prevent="selected = 2" x-bind:aria-current="selected === 2 ? 'true' : null" />
<x-list-item title="Chiara Rossi" description="Train times for Friday" avatar="CR" link="#example-list-detail" no-wire-navigate x-on:click.prevent="selected = 3" x-bind:aria-current="selected === 3 ? 'true' : null" />
</x-list>
</x-pane>
</x-slot:list>
<x-slot:detail>
<x-pane heading="h3" back :sticky="false">
<x-stack gap="space200">
<p class="md-type-body-lg md-ink-variant" x-show="! selected">Select a message to read it.</p>
<p class="md-type-headline-sm" x-show="selected" x-text="{ 1: 'The photos from Saturday', 2: 'Contract, second draft', 3: 'Train times for Friday' }[selected]"></p>
<p class="md-type-body-lg" x-show="selected">Below 840px the list gives way to this message, with a back button that returns you — and your focus — to the list. From 840px both panes show, the list 360px wide and 412px from 1200px.</p>
</x-stack>
</x-pane>
</x-slot:detail>
</x-list-detail>
</x-surface>
BLADE;
@endphp
@section('content')
<x-livewire-material::pane width="wide" data-md-showcase-page>
<x-livewire-material::stack gap="space300">
<x-livewire-material::stack as="header" gap="space50">
<p class="md-type-label-lg md-ink-variant">Foundations</p>
<h1 class="md-type-headline-lg">Layout</h1>
</x-livewire-material::stack>
<x-livewire-material::section-nav :items="array_values(\NoNameWeb\LivewireMaterial\Showcase\Sections::layoutPages())" label="Layout pages" />
<x-showcase::breakpoint-readout />
<p class="md-type-body-md md-ink-variant">
M3's list-detail: a list, and the detail of what is selected in it an inbox and a message, folders
and a file, settings and a category. Below 840px the list gives way to the detail with a back button;
from 840px both panes show, the list a fixed 360px (412px from 1200px) and the detail flexible.
</p>
<x-showcase::example title="List-detail" :code="$code" stack />
</x-livewire-material::stack>
</x-livewire-material::pane>
@endsection