From f5a211492aa302eebac9d5c7fcec002fc59194cc Mon Sep 17 00:00:00 2001 From: freetlab Date: Wed, 29 Jul 2026 20:34:09 +0200 Subject: [PATCH] fix(typography): bake the prototype colour into eyebrowLabel MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The prototype's eyebrows are always rgba(242,247,250,.42) (t4 lines 254, 299, 381, 450, 511, 660). eyebrowLabel set size/weight/letter- spacing only, no colour, so every call site (settings group headers, vacation section titles, the ringing screen's snooze label) rendered at whatever full-opacity default the ambient text theme resolved to. One factory-level change fixes every current and future consumer of PluriWaveTypography.eyebrowLabel — no call site needs editing. S9, Tier 1 visual-fidelity pass (audit id 2521). --- lib/tema/pluriwave_typography.dart | 13 ++++++++++++- test/tema/pluriwave_typography_test.dart | 9 +++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/lib/tema/pluriwave_typography.dart b/lib/tema/pluriwave_typography.dart index 8a8d5e3..22b5155 100644 --- a/lib/tema/pluriwave_typography.dart +++ b/lib/tema/pluriwave_typography.dart @@ -52,12 +52,14 @@ class PluriWaveTypography extends ThemeExtension { FontWeight fontWeight, { double? letterSpacing, double? height, + Color? color, }) { return fallback.copyWith( fontSize: fontSize, fontWeight: fontWeight, letterSpacing: letterSpacing, height: height, + color: color, ); } @@ -67,7 +69,16 @@ class PluriWaveTypography extends ThemeExtension { screenTitle: style(19, FontWeight.w800, letterSpacing: -0.4), cardTitle: style(14.5, FontWeight.w700), bodyStrong: style(13, FontWeight.w600), - eyebrowLabel: style(11, FontWeight.w800, letterSpacing: 0.8), + // S9 (Tier 1 visual fidelity): the prototype's eyebrows are always + // rgba(242,247,250,.42) (t4 lines 254, 299, 381, 450, 511, 660) — this + // style used to carry no colour at all, so it rendered at whatever + // full-opacity default the ambient text theme resolved to. + eyebrowLabel: style( + 11, + FontWeight.w800, + letterSpacing: 0.8, + color: const Color(0xFFF2F7FA).withValues(alpha: 0.42), + ), ); } diff --git a/test/tema/pluriwave_typography_test.dart b/test/tema/pluriwave_typography_test.dart index 7d286b3..aff2587 100644 --- a/test/tema/pluriwave_typography_test.dart +++ b/test/tema/pluriwave_typography_test.dart @@ -65,6 +65,15 @@ void main() { expect(type.eyebrowLabel.letterSpacing, 0.8); }); + test('S9 (Tier 1 visual fidelity): eyebrowLabel bakes in the prototype ' + "colour rgba(242,247,250,.42) — it used to carry no colour at all, " + 'so it rendered at full onSurface opacity', () { + expect( + type.eyebrowLabel.color, + const Color(0xFFF2F7FA).withValues(alpha: 0.42), + ); + }); + testWidgets('context.pluriType exposes the registered extension', ( tester, ) async {