Files
pluriwave/test/widgets/pluri_layout_test.dart
FreeTLab 7ebe0b77a4 fix(layout): introduce the prototype's 3-tier horizontal padding scale
The prototype runs three horizontal padding tiers (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, used everywhere regardless of context.

Add PluriLayout.titleHorizontal (20) and PluriLayout.rowHorizontal
(12) alongside the existing `horizontal` (16, unchanged -- it already
covers the card tier). horizontal keeps every one of its ~30 existing
call sites unchanged.

Committed ahead of S2 (item 6 in this pass) because that item's
PluriRootHeader edit reuses titleHorizontal/rowHorizontal for the
header's own padding, matching the prototype's own header spec exactly
(e.g. Alarmas padding:0 12px 0 20px) -- a real dependency, not just
numbering.

S5, Tier 1 visual-fidelity pass (audit id 2521).
2026-07-29 21:28:48 +02:00

30 lines
1.1 KiB
Dart

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),
);
});
}