Skip to content

Commit c82a2ab

Browse files
Add media split layout back to supported docs (#8)
Treat media split as a supported layout again so the package guidance and component surface stay aligned, and add coverage for its fallback normalization behavior.
1 parent 2dafcc2 commit c82a2ab

3 files changed

Lines changed: 22 additions & 3 deletions

File tree

resources/boost/skills/slidewire-development/SKILL.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ Without those `@source` entries, package components may render with missing styl
8484
- `<x-slidewire::panel>`: reusable modern surface for grouped content, supporting variants like `default`, `elevated`, `outlined`, and `glass`.
8585
- `<x-slidewire::title-slide>`: opinionated opening slide for titles, subtitles, overlines, and presenter metadata.
8686
- `<x-slidewire::two-column-slide>`: responsive split layout for explanation-plus-supporting-content slides.
87+
- `<x-slidewire::media-split-slide>`: media-first split layout with left/right positioning, ratio controls, and optional framed or panel-style media treatment.
8788
- `<x-slidewire::timeline-slide>` and `<x-slidewire::timeline-item>`: structured milestone and roadmap layouts.
8889
- `<x-slidewire::steps-slide>` and `<x-slidewire::step-item>`: process and rollout layouts with optional auto-numbering.
8990
- `<x-slidewire::agenda-slide>` and `<x-slidewire::agenda-item>`: section overview and agenda layouts.
@@ -98,6 +99,7 @@ Without those `@source` entries, package components may render with missing styl
9899
- Use `panel` when content needs a polished surface without rebuilding the same rounded, theme-aware wrapper.
99100
- Use `title-slide` for opening slides, chapter intros, and title cards.
100101
- Use `two-column-slide` for explanatory layouts that pair copy with supporting visuals or code.
102+
- Use `media-split-slide` when the visual side should lead the composition and you want built-in media framing controls.
101103
- Use `timeline-slide` and `agenda-slide` for milestones, sections, and chapter overviews that need more structure than bullets.
102104
- Use `steps-slide` for process, rollout, or tutorial content.
103105
- Use `text` for semantic headings, paragraphs, inline text, vertical labels, or reusable animation-ready copy blocks.
@@ -116,6 +118,7 @@ Recommendations:
116118
- Prefer `panel` as the base surface primitive for grouped text, code, media, or mixed content.
117119
- Prefer `title-slide` over ad hoc hero markup for opening slides or chapter separators.
118120
- Prefer `two-column-slide` for both general split layouts and media-plus-content layouts; frame the visual side with `panel` when needed.
121+
- Prefer `media-split-slide` when the deck benefits from a more opinionated media-led split with `plain`, `framed`, or `panel` media presentation.
119122
- Prefer `timeline-slide`, `steps-slide`, and `agenda-slide` over plain lists when the sequence or hierarchy matters to the talk.
120123
- Still allow local customization through slots and `class` passthrough when a deck needs light visual tailoring.
121124

src/View/Components/MediaSplitSlide.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@
99
use Illuminate\View\Component;
1010
use WendellAdriel\SlideWire\Support\UiThemeResolver;
1111

12-
/**
13-
* @deprecated Use TwoColumnSlide and wrap the media side with Panel when needed.
14-
*/
1512
class MediaSplitSlide extends Component
1613
{
1714
public function __construct(

tests/Feature/UiComponents/LayoutComponentsTest.php

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,22 @@
4343
->toContain('lg:order-2')
4444
->toContain('backdrop-blur-xl');
4545
});
46+
47+
it('normalizes media split slide options to supported defaults', function (): void {
48+
$html = Blade::render(<<<'BLADE'
49+
<x-slidewire::media-split-slide media-position="diagonal" ratio="9:9" media-style="card" gap="xxl">
50+
<x-slot:media>
51+
<img src="/demo.png" alt="Demo screen" />
52+
</x-slot:media>
53+
<x-slot:content>
54+
<p>Supporting copy</p>
55+
</x-slot:content>
56+
</x-slidewire::media-split-slide>
57+
BLADE);
58+
59+
expect($html)
60+
->toContain('lg:grid-cols-2')
61+
->toContain('gap-7')
62+
->not->toContain('lg:order-2')
63+
->not->toContain('backdrop-blur-xl');
64+
});

0 commit comments

Comments
 (0)