Biete das Vollbild für Vorschauclips je Widget an (ADR-43)

Neue Einstellung "fullscreen" (Vorgabe: nicht anbieten) an den
Kartenwidgets und an Bild und Text. Die Schaltfläche erscheint nur mit
freigegebenem Clip und wenn das Gerät Vollbild kann. Im Vollbild gibt es
Ton und native Bedienung, Scrollen und Zeiger stoppen den Clip nicht;
beim Verlassen kehrt die Karte zum Kartenbild zurück. Gemeinsames Modul
resources/js/player/fullscreen.js. iPhone-Weg bisher nur als Logik,
Gerätetest steht aus.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
StommerandClaude Sonnet 5.5 committed 2026-12-01 07:53:27 +01:00
1 parent fd5db90b77
commit adaa68948a
11 files changed
+382 -7

No files matched your search

+30
View File
@@ -130,6 +130,36 @@ public function test_the_released_trailer_plays_on_the_image_on_hover_and_click(
$this->assertStringNotContainsString('originals/', $html);
}
public function test_fullscreen_for_the_video_is_off_by_default_and_a_per_widget_choice(): void
{
$film = $this->clip('Teaser Pause');
$image = $this->image('Foto Pause');
$this->release($film);
$this->release($image);
$refs = ['image' => $image->id, 'video' => $film->id];
$default = $this->publish('/bild-video-vollbild-aus', $this->widget(['body' => '<p>Text</p>'], $refs));
$on = $this->publish('/bild-video-vollbild', $this->widget(['body' => '<p>Text</p>'], $refs, ['fullscreen' => 'yes']));
$withoutVideo = $this->publish('/bild-ohne-video-vollbild', $this->widget(['body' => '<p>Text</p>'], ['image' => $image->id], ['fullscreen' => 'yes']));
$this->assertStringContainsString('data-card-clip', $default);
$this->assertStringNotContainsString('data-clip-fullscreen', $default, 'Vorgabe: kein Vollbild, auch für gespeicherte Widgets ohne Wahl.');
$this->assertStringContainsString('data-clip-fullscreen', $on);
$this->assertStringContainsString('aria-label="Vollbild: Teaser Pause"', $on);
$this->assertStringNotContainsString('data-clip-fullscreen', $withoutVideo, 'Ohne freigegebenes Video gibt es kein Vollbild.');
$registry = app(WidgetRegistry::class);
$this->assertSame(['no', 'yes'], array_keys($registry->get('image_text')->settingOptions()['fullscreen']));
$this->assertContains('fullscreen', $registry->get('image_text')->settingGroups()['Bild und Video']);
try {
$registry->normalize($this->widget(['body' => '<p>Text</p>'], $refs, ['fullscreen' => 'immer'])[0]['slots']);
$this->fail('Eine unbekannte Vollbild-Wahl wurde angenommen.');
} catch (ValidationException $exception) {
$this->assertArrayHasKey('blocks.0.settings.fullscreen', $exception->errors());
}
}
public function test_an_image_with_a_video_can_also_stand_without_text(): void
{
$film = $this->clip('Teaser Pause');