Conversation
Fix(zh-Hant): 地震報告日期與筆數固定對齊 Fix(en-US): align earthquake report dates and counts consistently
|
🔍 OpenCodeReview found 4 issue(s) in this PR.
|
Comment on lines
+256
to
269
| Expanded( | ||
| child: FittedBox( | ||
| fit: BoxFit.scaleDown, | ||
| alignment: Alignment.centerLeft, | ||
| child: Text( | ||
| _dayLabel(day, l10n, locale), | ||
| softWrap: false, | ||
| style: theme.textTheme.titleSmall?.copyWith( | ||
| color: colors.primary, | ||
| fontWeight: FontWeight.w700, | ||
| ), | ||
| ), | ||
| ), | ||
| ), |
There was a problem hiding this comment.
佈局邏輯變動可能導致 UI 呈現不符合預期。原本使用 Flexible 搭配 Expanded (Divider),可以讓 Label 佔用所需空間並讓 Divider 填滿剩餘空間。現在將 Label 改為 Expanded,會導致 Label 與 Divider 平分剩餘空間,使得 Divider 的位置不再位於右側,而是移至畫面中間。若要兼顧防止溢出與正確佈局,建議改回 Flexible 並保留 FittedBox。
Suggestion:
Suggested change
| Expanded( | |
| child: FittedBox( | |
| fit: BoxFit.scaleDown, | |
| alignment: Alignment.centerLeft, | |
| child: Text( | |
| _dayLabel(day, l10n, locale), | |
| softWrap: false, | |
| style: theme.textTheme.titleSmall?.copyWith( | |
| color: colors.primary, | |
| fontWeight: FontWeight.w700, | |
| ), | |
| ), | |
| ), | |
| ), | |
| Flexible( | |
| child: FittedBox( | |
| fit: BoxFit.scaleDown, | |
| alignment: Alignment.centerLeft, | |
| child: Text( | |
| _dayLabel(day, l10n, locale), | |
| softWrap: false, | |
| style: theme.textTheme.titleSmall?.copyWith( | |
| color: colors.primary, | |
| fontWeight: FontWeight.w700, | |
| ), | |
| ), | |
| ), | |
| ), |
Comment on lines
+256
to
277
| Expanded( | ||
| child: FittedBox( | ||
| fit: BoxFit.scaleDown, | ||
| alignment: Alignment.centerLeft, | ||
| child: Text( | ||
| _dayLabel(day, l10n, locale), | ||
| softWrap: false, | ||
| style: theme.textTheme.titleSmall?.copyWith( | ||
| color: colors.primary, | ||
| fontWeight: FontWeight.w700, | ||
| ), | ||
| ), | ||
| ), | ||
| ), | ||
| ), | ||
| const SizedBox(width: AppSpacing.sm), | ||
| Expanded( | ||
| child: Divider( | ||
| height: 1, | ||
| thickness: 1, | ||
| color: colors.outlineVariant.withValues(alpha: 0.55), | ||
| const SizedBox(width: AppSpacing.sm), | ||
| Expanded( | ||
| child: Divider( | ||
| height: 1, | ||
| thickness: 1, | ||
| color: colors.outlineVariant.withValues(alpha: 0.55), | ||
| ), | ||
| ), |
There was a problem hiding this comment.
佈局邏輯變動:將原本用於標籤的 Flexible 改為 Expanded 會導致標籤與分隔線 (Divider) 平分剩餘空間,這會使分隔線不再位於右側,而是變成在畫面中間,這與原本「標籤 + 填充式分隔線」的 UI 設計不符。
Suggestion:
Suggested change
| Expanded( | |
| child: FittedBox( | |
| fit: BoxFit.scaleDown, | |
| alignment: Alignment.centerLeft, | |
| child: Text( | |
| _dayLabel(day, l10n, locale), | |
| softWrap: false, | |
| style: theme.textTheme.titleSmall?.copyWith( | |
| color: colors.primary, | |
| fontWeight: FontWeight.w700, | |
| ), | |
| ), | |
| ), | |
| ), | |
| ), | |
| const SizedBox(width: AppSpacing.sm), | |
| Expanded( | |
| child: Divider( | |
| height: 1, | |
| thickness: 1, | |
| color: colors.outlineVariant.withValues(alpha: 0.55), | |
| const SizedBox(width: AppSpacing.sm), | |
| Expanded( | |
| child: Divider( | |
| height: 1, | |
| thickness: 1, | |
| color: colors.outlineVariant.withValues(alpha: 0.55), | |
| ), | |
| ), | |
| Flexible( | |
| child: FittedBox( | |
| fit: BoxFit.scaleDown, | |
| alignment: Alignment.centerLeft, | |
| child: Text( | |
| _dayLabel(day, l10n, locale), | |
| softWrap: false, | |
| style: theme.textTheme.titleSmall?.copyWith( | |
| color: colors.primary, | |
| fontWeight: FontWeight.w700, | |
| ), | |
| ), | |
| ), | |
| ), | |
| const SizedBox(width: AppSpacing.sm), | |
| Expanded( | |
| child: Divider( | |
| height: 1, | |
| thickness: 1, | |
| color: colors.outlineVariant.withValues(alpha: 0.55), | |
| ), | |
| ), |
Comment on lines
+321
to
+324
| final date = _dayFormats | ||
| .putIfAbsent(locale, () => DateFormat.yMMMEd(locale)) | ||
| .format(day); | ||
| return relative == null ? date : '$date ($relative)'; |
Comment on lines
+321
to
+324
| final date = _dayFormats | ||
| .putIfAbsent(locale, () => DateFormat.yMMMEd(locale)) | ||
| .format(day); | ||
| return relative == null ? date : '$date ($relative)'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
這個 PR 做了什麼
怎麼驗
tool/dev/test.sh test/features/earthquake/report_day_group_test.darttool/dev/analyze.shtool/commit.sh(完整測試 1835 passed)tool/check/commits.sh origin/main..HEADAppLocalizations與intllocale,沒有新增硬編碼語系文字檢查清單
AppSpacing/AppRadius,並處理窄螢幕與寬螢幕排版