From bb0919bae63b95e142d59510700f455d62482be4 Mon Sep 17 00:00:00 2001 From: pkdee Date: Fri, 3 Jul 2026 17:29:00 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=ED=99=88=20=EC=B9=B4=ED=85=8C=EA=B3=A0?= =?UTF-8?q?=EB=A6=AC=20=ED=95=84=ED=84=B0=20=EC=B9=A9=20=ED=85=8D=EC=8A=A4?= =?UTF-8?q?=ED=8A=B8=20=EC=84=B8=EB=A1=9C=20=EC=A7=A4=EB=A6=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - _CategoryFilter 고정 SizedBox(height: 34) 가 SeedChip 자연 높이(약 41)보다 작아 텍스트를 잘라내던 것을, SingleChildScrollView+Row 로 바꿔 콘텐츠 높이로 렌더 - 가로 스크롤 유지, 큰 글씨 배율에서도 짤리지 않음 - 칩 높이>34 회귀 테스트 추가 Closes #190 --- lib/screens/today/today_screen.dart | 11 ++++++----- test/today_test.dart | 18 ++++++++++++++++++ 2 files changed, 24 insertions(+), 5 deletions(-) diff --git a/lib/screens/today/today_screen.dart b/lib/screens/today/today_screen.dart index fe06b3e..f8c02f0 100644 --- a/lib/screens/today/today_screen.dart +++ b/lib/screens/today/today_screen.dart @@ -162,11 +162,12 @@ class _CategoryFilter extends StatelessWidget { @override Widget build(BuildContext context) { - return SizedBox( - height: 34, - child: ListView( - scrollDirection: Axis.horizontal, - padding: const EdgeInsets.symmetric(horizontal: 20), + // 고정 높이 대신 콘텐츠(아이콘+글씨)에 맞춰 세로로 늘어나게 한다 — 큰 글씨 배율에서도 + // 텍스트가 세로로 짤리지 않도록(가로 스크롤은 유지). + return SingleChildScrollView( + scrollDirection: Axis.horizontal, + padding: const EdgeInsets.symmetric(horizontal: 20), + child: Row( children: [ DkChoiceChip( label: '전체', diff --git a/test/today_test.dart b/test/today_test.dart index 0e4a3d3..e6ebec5 100644 --- a/test/today_test.dart +++ b/test/today_test.dart @@ -221,6 +221,24 @@ void main() { expect(chipIconColor('자격증'), isNot(chipIconColor('건강'))); }); + testWidgets('필터 칩은 고정 높이에 갇히지 않고 콘텐츠 고유 높이로 그려진다(짤림 방지)', ( + WidgetTester tester, + ) async { + const DkEvent a = DkEvent( + id: 'a', + type: DkEventType.single, + title: '정처기', + category: '자격증', + date: '2026-12-01', + ); + await _pumpTall(tester, _screen(events: const [a])); + + // 예전엔 SizedBox(height: 34) 로 칩을 34 에 강제해, SeedChip 자연 높이(padY 9 + fontSize + // 14 → 약 41)보다 작아 텍스트가 세로로 짤렸다. 이제 콘텐츠 고유 높이로 그려져 34 를 넘긴다. + final double h = tester.getSize(find.byType(DkChoiceChip).first).height; + expect(h, greaterThan(34)); + }); + testWidgets('카테고리 필터 탭 시 해당 카테고리만 보인다(#163)', (WidgetTester tester) async { const DkEvent a = DkEvent( id: 'a',