diff --git a/lib/widgets/pluri_layout.dart b/lib/widgets/pluri_layout.dart index 0bffd11..a5fba7b 100644 --- a/lib/widgets/pluri_layout.dart +++ b/lib/widgets/pluri_layout.dart @@ -5,7 +5,16 @@ import 'mini_reproductor.dart'; import 'pluri_bottom_navigation.dart'; abstract final class PluriLayout { + // S5 (Tier 1 visual fidelity): the prototype (`t4`) runs a 3-tier + // horizontal padding scale — 20px for section titles/eyebrows (lines + // 153, 254, 299, 511), 16px for cards (lines 327, 512, 610), 12px for + // background-less list rows (lines 174, 226, 301). [horizontal] IS the + // card tier — its value and every existing call site stay unchanged; + // [titleHorizontal] and [rowHorizontal] are new. + static const double titleHorizontal = 20; static const double horizontal = 16; + static const double rowHorizontal = 12; + static const double sectionGap = 12; static const double panelGap = 12; static const double compactGap = 8; @@ -36,6 +45,12 @@ abstract final class PluriLayout { horizontal: horizontal, ); + /// S5: the title/eyebrow tier's own content padding — e.g. a section + /// heading living directly on the page background, outside any card. + static const EdgeInsets titleContentPadding = EdgeInsets.symmetric( + horizontal: titleHorizontal, + ); + static const EdgeInsets sheetPadding = EdgeInsets.all(18); } diff --git a/test/widgets/pluri_layout_test.dart b/test/widgets/pluri_layout_test.dart new file mode 100644 index 0000000..df2b25c --- /dev/null +++ b/test/widgets/pluri_layout_test.dart @@ -0,0 +1,29 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:pluriwave/widgets/pluri_layout.dart'; + +/// S5 (Tier 1 visual fidelity): the prototype runs a 3-tier horizontal +/// padding scale (`t4`) — 20px for section titles/eyebrows (lines 153, 254, +/// 299, 511), 16px for cards (lines 327, 512, 610), 12px for +/// background-less list rows (lines 174, 226, 301). The build had +/// collapsed all three into a single `PluriLayout.horizontal = 16`. +void main() { + test('titleHorizontal is 20 — the prototype\'s title/eyebrow tier', () { + expect(PluriLayout.titleHorizontal, 20); + }); + + test('horizontal (the card tier) stays 16 — unchanged', () { + expect(PluriLayout.horizontal, 16); + }); + + test('rowHorizontal is 12 — the prototype\'s background-less row tier', () { + expect(PluriLayout.rowHorizontal, 12); + }); + + test('titleContentPadding is symmetric horizontal titleHorizontal', () { + expect( + PluriLayout.titleContentPadding, + const EdgeInsets.symmetric(horizontal: PluriLayout.titleHorizontal), + ); + }); +}