Skip to content

Fix/setting - #532

Merged
whes1015 merged 2 commits into
mainfrom
fix/setting
Aug 17, 2026
Merged

Fix/setting#532
whes1015 merged 2 commits into
mainfrom
fix/setting

Conversation

@whes1015

Copy link
Copy Markdown
Member

這個 PR 做了什麼

相關 issue

  • closes #

怎麼驗

檢查清單

  • tool/check_commits.sh origin/main..HEAD 通過
    —— commit 訊息就是更新日誌,格式見 commit.md
  • 一個 commit 一件事(這條 gate 驗不了,靠自己和 review)
  • mise exec -- flutter analyzemise exec -- flutter test 通過
  • 新的使用者可見字串都走 AppLocalizations,沒有寫死
  • 有 UI 變更的話:用的是 AppSpacing / AppRadius / AppMotion
    深色模式看過,文字對比度可接受

Optimization(zh-Hant): 資料頁卡片改為橫式排版,一眼看完更清楚
Optimization(en-US): the data hub cards are compact and easier to scan
New(zh-Hant): 常用地區下方新增說明,通知以 GPS 位置發送,常用地區僅影響首頁顯示
New(en-US): saved regions now carry a note that alerts follow GPS, not the saved list
@github-actions

github-actions Bot commented Aug 17, 2026

Copy link
Copy Markdown

🔍 OpenCodeReview found 4 issue(s) in this PR.

  • ✅ Successfully posted inline: 3 comment(s)
  • ❌ Failed to post inline: 1 comment(s)

maintainability · medium

📄 lib/features/data/presentation/pages/data_page.dart (L88-L105)

⚠️ GitHub could not post this as an inline comment: Lines 88-105 could not be resolved (outside PR diff hunks)

_RankingGridTile 的佈局與 childAspectRatio 的變更可能導致 UI 溢出。目前的改動將單元格長寬比從 1.45 調整為 2.4(變得更扁平),同時將內部佈局改為 Row 結構,並將標題文字的 maxLines1 增加到 2。在螢幕寬度較窄的裝置上,這種高度受限且包含兩行文字的水平佈局極易引發垂直方向的溢出(Overflow)或內容截斷。建議重新評估 childAspectRatio 或增加單元格的最小高度約束。

Comment on lines +204 to 265
return DecoratedBox(
decoration: BoxDecoration(
borderRadius: AppRadius.large,
gradient: LinearGradient(
begin: Alignment.topLeft,
end: Alignment.bottomRight,
colors: [
colors.primary,
Color.lerp(colors.primary, colors.surface, 0.72)!,
],
),
),
child: Material(
type: MaterialType.transparency,
child: InkWell(
borderRadius: AppRadius.large,
onTap: onTap,
child: Padding(
padding: const EdgeInsets.symmetric(
horizontal: AppSpacing.lg,
vertical: AppSpacing.md,
),
child: Row(
children: [
Container(
padding: const EdgeInsets.all(AppSpacing.sm),
decoration: BoxDecoration(
color: colors.onPrimary.withValues(alpha: 0.18),
borderRadius: AppRadius.medium,
),
child: Icon(icon, color: colors.onPrimary),
),
child: Icon(icon, color: colors.onSecondaryContainer),
),
const SizedBox(width: AppSpacing.lg),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
title,
style: Theme.of(context).textTheme.titleMedium?.copyWith(
color: colors.onPrimaryContainer,
fontWeight: FontWeight.w700,
const SizedBox(width: AppSpacing.lg),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
title,
style: Theme.of(context).textTheme.titleMedium
?.copyWith(
color: colors.onPrimary,
fontWeight: FontWeight.w700,
),
),
),
const SizedBox(height: AppSpacing.xs),
Text(
subtitle,
style: Theme.of(context).textTheme.bodySmall?.copyWith(
color: colors.onPrimaryContainer.withValues(alpha: 0.8),
const SizedBox(height: AppSpacing.xs),
Text(
subtitle,
style: Theme.of(context).textTheme.bodySmall?.copyWith(
color: colors.onPrimary.withValues(alpha: 0.78),
),
),
),
],
],
),
),
),
Icon(Icons.chevron_right, color: colors.onPrimaryContainer),
],
Icon(Icons.chevron_right, color: colors.onPrimary),
],
),
),
),
),
);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

other · low
_SeismicCard 的色彩對比度與可讀性風險。新的設計使用了 LinearGradient(由 primary 色向 surface 色漸變)作為背景,並將文字顏色設為 onPrimary。在特定的主題配置下(例如當 primarysurface 色值較接近時),這種漸層背景可能會降低緊急資訊(Seismic data)的可讀性,不符合無障礙設計原則。建議確保漸層兩端的色值與 onPrimary 文字之間保有足夠的對比度。

Comment on lines +1 to 2
/// Lists the currently saved townships with a remove action, and an **add**
library;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

documentation · low
檔案層級的文檔註釋 (第 1 行) 不完整,且內容似乎是將類別層級的註釋 (第 15-16 行) 複製過來後被截斷了。建議修正為完整的描述或將其刪除。

Comment on lines +2119 to +2121
@override
String get regionSaveNote =>
'Ipapadala ang mga abiso batay sa iyong lokasyon ng GPS. Ang pag-set ng paboritong lugar ay hindi nagbabago kung saan ipinapadala ang alerto — ang mga paboritong lugar ay para lang mabilis mong makita ang kalagayan ng bawat lugar sa home. Ibigay ang pahintulot sa lokasyon, kung hindi hindi gagana ang mga abiso.';

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maintainability · high
此檔案位於 gen/ 目錄下,通常是由工具自動生成的。直接修改此檔案可能導致您的變更在下次執行生成指令時被覆蓋。建議將翻譯內容新增至原始的 .arb 檔案(例如 lib/l10n/app_fil.arb),然後重新生成程式碼。此外,建議統一使用 "rehiyon" (region) 而非 "lugar" (place) 以保持術語一致性。

@whes1015
whes1015 merged commit 3a83ced into main Aug 17, 2026
5 of 6 checks passed
@whes1015
whes1015 deleted the fix/setting branch August 17, 2026 08:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant