Skip to content

feat: move the tab bar into the iPhone Duo system rail - #668

Open
PiscesXD wants to merge 1 commit into
mainfrom
feat/iphone-duo-system-rail
Open

PiscesXD wants to merge 1 commit into
mainfrom
feat/iphone-duo-system-rail

Conversation

@PiscesXD

Copy link
Copy Markdown
Member

這個 PR 做了什麼

iPhone Duo 出現系統側欄(外螢幕、內螢幕橫放)時,分頁列改成只有圖示的直式列,放進側欄裡;所有分頁的內容都排在側欄旁邊,不再被它蓋住。其他裝置的底部分頁列完全不變。

  • 偵測:foldable 套件回報有 hinge,且頂部 inset ≈ 0、單側 inset ≥ 60 pt、另一側小於其 1/3,才視為側欄模式(systemRailEdgeFor)。非 Duo 裝置與測試環境中套件回傳 unsupported,走原本路徑。
  • 版面:MainShell 在側欄模式下把內容縮到側欄旁、移除該側的 inset,側欄寬度等於系統給的 inset。
  • 分頁列:48 pt 圖示格、FrostedSurface 膠囊、貼齊底部,每格有 Tooltip 與 Semantics 標籤(文字沿用既有 l10n)。首頁 sheet 拉起、地圖沉浸模式時,跟底部列一樣淡出,只是往側欄外滑。

相關 issue

沒有對應的 issue。

怎麼驗

  • test/app/shell/system_rail_test.dart:偵測規則(左右兩側、門檻、非側欄的橫放)、分頁列點擊與選取狀態。
  • tool/check.sh 全部 gate 通過(Darwin)。
  • 尚未在 iPhone Duo 實機或模擬器上確認,review 時請在 Duo 模擬器上看:外螢幕、內螢幕橫放各一次,切換五個分頁、拉首頁 sheet、開地圖沉浸模式。
  • 刻意沒做:把各頁 AppBar 的按鈕投射到側欄(指南建議的進階作法),這次只處理分頁列。

檢查清單

  • tool/check/commits.sh origin/main..HEAD 通過
  • 一個 commit 一件事
  • tool/dev/analyze.sh 與 tool/dev/test.sh 通過
  • 新的使用者可見字串都走 AppLocalizations,沒有寫死(沒有新增字串)
  • CI 全部通過
  • 有 UI 變更的話:深色模式看過(未在 Duo 上看過)

Platform: ios

New(zh-Hant): iPhone Duo 外螢幕與內螢幕橫放時,分頁列改放在右側直式欄,不再被系統狀態列擋住
New(en-US): on iPhone Duo the tab bar moves into the side system rail, clear of the status bar
@github-actions

Copy link
Copy Markdown

✅ OpenCodeReview: Review complete: 0 finding(s) across 5 selected item(s).

@codecov

codecov Bot commented Nov 18, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 78.50467% with 23 lines in your changes missing coverage. Please review.
✅ Project coverage is 94.62%. Comparing base (20a7d08) to head (2568c30).

Files with missing lines Patch % Lines
lib/app/shell/main_shell.dart 23.33% 23 Missing ⚠️

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

This branch has not been deployed

No deployments
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