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

+48
View File
@@ -206,6 +206,54 @@ public function test_the_editor_can_switch_the_trailer_off_per_card_and_the_choi
}
}
public function test_fullscreen_is_off_by_default_and_offered_per_card_only_with_a_released_clip(): void
{
$film = $this->publicFilm();
$trailer = $this->clip('Trailer Denkpause');
$this->assign($film, 'trailer', $trailer);
$this->release($trailer);
$this->publish('/trailer-vollbild', [[
'layout' => 'u1_1_1_1',
'style' => [],
'slots' => [
$this->mediaCard($film)['slots'][0],
$this->mediaCard($film, [], ['fullscreen' => 'no'])['slots'][0],
$this->mediaCard($film, [], ['fullscreen' => 'yes'])['slots'][0],
$this->mediaCard($film, [], ['clip' => 'no', 'fullscreen' => 'yes'])['slots'][0],
],
]]);
$cards = $this->cards($this->get('/trailer-vollbild')->assertOk()->getContent());
$this->assertCount(4, $cards);
$this->assertStringNotContainsString('data-clip-fullscreen', $cards[0], 'Vorgabe: kein Vollbild, auch für gespeicherte Karten ohne Wahl.');
$this->assertStringNotContainsString('data-clip-fullscreen', $cards[1]);
$this->assertStringContainsString('data-clip-fullscreen', $cards[2]);
$this->assertStringContainsString('aria-label="Vollbild: ', $cards[2]);
$this->assertMatchesRegularExpression('/<button[^>]*class="lf-pc__clip-fullscreen"[^>]*\shidden[\s>]/', $cards[2], 'Ohne JavaScript bleibt die Schaltfläche verborgen.');
$this->assertStringNotContainsString('data-card-clip', $cards[3]);
$this->assertStringNotContainsString('data-clip-fullscreen', $cards[3], 'Ohne Trailer gibt es kein Vollbild.');
$this->assertStringNotContainsString('originals/', $cards[2]);
}
public function test_the_fullscreen_choice_exists_where_the_trailer_choice_exists_and_is_validated(): void
{
$registry = app(WidgetRegistry::class);
$this->assertSame(['no', 'yes'], array_keys($registry->get('media_card')->settingOptions()['fullscreen']));
$this->assertSame(['no', 'yes'], array_keys($registry->get('program_card')->settingOptions()['fullscreen']));
$this->assertArrayNotHasKey('fullscreen', $registry->get('topic_card')->settingOptions(), 'Ein Thema hat keinen Trailer.');
$this->assertContains('fullscreen', $registry->get('media_card')->settingGroups()['Bild und Video']);
$film = $this->publicFilm();
try {
$registry->normalize([['type' => 'media_card', 'v' => 1, 'variant' => 'adaptive', 'settings' => ['fullscreen' => 'immer'], 'data' => [], 'refs' => ['element' => $film->id]]]);
$this->fail('Eine unbekannte Vollbild-Wahl wurde angenommen.');
} catch (ValidationException $exception) {
$this->assertArrayHasKey('blocks.0.settings.fullscreen', $exception->errors());
}
}
public function test_the_program_card_plays_the_trailer_of_the_program(): void
{
$program = $this->program('Programm Mut');