Skip to content

feat(tabs): add foldable vertical tab bar - #208

Closed
rdlabo wants to merge 7 commits into
feat/physical-safe-areafrom
feat/adaptive-tabs
Closed

rdlabo wants to merge 7 commits into
feat/physical-safe-areafrom
feat/adaptive-tabs

Conversation

@rdlabo

@rdlabo rdlabo commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • make .ios-theme-enable-foldable the single opt-in for the Duo tab-bar layout
  • place the vertical tab bar at the bottom of the physical right-side reserved region
  • match the invariant geometry measured from default iOS 27.1 SwiftUI two-tab and four-tab TabView configurations: 50pt outer width, 2pt inner inset, and approximately 52pt per item
  • keep the stable four-tab rail icon-only and reveal every icon-and-label tab while the user presses and drags across the rail
  • ignore slot and writing direction for the physical rail position
  • keep foldable tabs in the Web layer and preserve the rail beside an Ionic split pane
  • document that sidebar navigation remains the responsibility of ion-menu / ion-split-pane

Stack

  1. feat: support iPhone Duo with vertical bars #213 — demo foldable toggle
  2. feat(layout): support foldable safe-area layout #209 — foldable safe-area layout
  3. feat(tabs): add foldable vertical tab bar #208 — foldable vertical tab bar
  4. feat: project foldable toolbar navigation and actions #212 — foldable toolbar projection

Base: feat/physical-safe-area

Verification

  • minimal SwiftUI two-tab reference with default SF Symbols built and captured on the iPhone Duo iOS 27.1 Simulator
  • four-tab reference captured separately to verify that the same per-item metrics scale to a 212pt rail
  • CSS and TypeScript builds
  • adaptive tab-bar behavior tests
  • image regression for the real pointer-active drag state
  • foldable compact and visible split-pane screenshots in LTR and RTL

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Devin Review found 3 potential issues.

Devin Review

Comment on lines +182 to +184
left: auto;
right: max(4px, calc((var(--ios-theme-side-safe-area) - var(--ios-theme-side-tab-bar-width)) / 2));
margin: 0;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 分割ペイン内の下配置タブが指定した物理側に配置されない

開始側メニュー表示中に slot="bottom" を使うと、メニュー配置が優先されます。両辺が指定され、書字方向によって物理側の指定が無視されるため、バーが予約領域から外れます。

Learn more

分割ペインの既存スタイルは、表示中の開始側メニューを避けるため、下側タブバーに inset-inline-start を設定します。このセレクターは新しい適応型セレクターより詳細度が高いため、ここで設定した left: auto または物理位置より優先されます。絶対配置要素に left、right、固定幅が同時に残ると、LTR では左、RTL では右が優先されます。その結果、物理右配置は LTR で、物理左配置は RTL で壊れます。

Example: LTR の 1024px 幅で開始側メニューが表示され、右配置かつ slot="bottom" の場合、right に加えてメニュー由来の left が残ります。ブラウザーは left を優先し、タブバーを右側の予約領域ではなくメニュー後方へ置きます。

Recommended fix: 適応型の物理配置では論理 inset を明示的にリセットし、分割ペインのメニュールールより確実に優先させてください。左右配置、LTR/RTL、上下スロット、表示中の開始側・終了側メニューを組み合わせたテストも追加してください。

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

Comment thread src/styles/components/ion-tabs.scss Outdated
Comment on lines +175 to +177
contain: layout style;
flex-direction: column;
width: 54px;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 縦型タブが Native UI Shell で横向きに投影される

Native UI Shell 有効時、この縦型バーも既存の適格判定を通過します。UIKit は項目を横並びにするため、幅62pxの領域へ押し込まれ、表示と操作領域が崩れます。

Learn more

Native UI Shell は、各ボタンの幅が等しく既定レイアウトならタブバーを投影対象にします。新しい縦型レイアウトでも全ボタンは54px幅なので、この条件を満たします。しかしネイティブ側の configureLayout は通常の UITabBar を横方向の .fill 配置で構成します。Web側の細く縦長な矩形を渡しても、項目が縦並びにはなりません。

Example: 4項目の右配置バーはWebでは約62×224pxです。Shellを有効にすると、4個のUIKit項目がその62px幅へ横並びに収められ、Webの縦型配置と一致しません。

Recommended fix: ネイティブ縦型投影を実装するまでは、.ionic-theme-adaptive-tabs 配下で左右配置されたバーを read の対象外にしてください。その後、Web表示へ正しくフォールバックする統合テストを追加してください。

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

Comment thread src/styles/components/ion-tabs.scss Outdated
Comment on lines +175 to +177
contain: layout style;
flex-direction: column;
width: 54px;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 縦型タブの選択エフェクトが横方向に動く

registerTabBarEffect を縦型バーに登録すると、ジェスチャー処理はX座標だけを使います。上下へドラッグ選択できず、別タブのタップでもレンズが正しいボタン位置へ移動しません。

Learn more

公開APIの registerTabBarEffect は、タブバーを横向きと仮定しています。移動範囲、ヒットテスト、進捗、速度をすべてX軸から計算し、レンズのY座標はバー中央に固定します。新しい flex-direction: column はこの前提を変えますが、登録処理は縦型バーを拒否も適応もしません。そのため通常のクリック自体は発火しても、テーマ提供のドラッグ選択と選択レンズが壊れます。

Example: 下端寄せの4項目バーで一番下のタブをタップすると、選択先は変わりますが、レンズはそのボタンではなく縦長バーの中央付近に表示されます。上から下へドラッグしてもX座標がほぼ変わらないため、対象タブを切り替えられません。

Recommended fix: registerTabBarEffect とアニメーション計算を配置クラスに応じてY軸へ切り替えてください。未対応のまま提供する場合は、縦型バーでは登録を拒否して壊れたエフェクトを有効化しないでください。縦方向のタップ、ドラッグ、レンズ位置をテストしてください。

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

@github-actions

github-actions Bot commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

Playwright test results

passed  341 passed

Details

stats  341 tests across 19 suites
duration  3 minutes, 55 seconds
commit  0b24bf4
info  This detailed result covers Ionic 9 only. Ionic 8 runs against the same screenshots in a separate matrix job; check the workflow run for both results. To update the screenshots, comment with /update-screenshots.

github-actions Bot added a commit that referenced this pull request Sep 21, 2026
github-actions Bot added a commit that referenced this pull request Sep 21, 2026
@github-actions

github-actions Bot commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

📊 Ionic 9 Playwright Test Report

View the detailed Ionic 9 report: https://rdlabo-dev.github.io/ionic-theme-ios27/pr-208/

Ionic 8 runs against the same screenshots in a separate matrix job. View both results in the workflow run.

github-actions Bot added a commit that referenced this pull request Sep 21, 2026
github-actions Bot added a commit that referenced this pull request Sep 21, 2026
github-actions Bot added a commit that referenced this pull request Sep 21, 2026
github-actions Bot added a commit that referenced this pull request Sep 21, 2026
github-actions Bot added a commit that referenced this pull request Sep 21, 2026
github-actions Bot added a commit that referenced this pull request Sep 21, 2026
github-actions Bot added a commit that referenced this pull request Sep 21, 2026
@rdlabo
rdlabo force-pushed the feat/adaptive-tabs branch 2 times, most recently from bfcede5 to 0b24bf4 Compare September 21, 2026 09:47
github-actions Bot added a commit that referenced this pull request Sep 21, 2026
github-actions Bot added a commit that referenced this pull request Sep 21, 2026
@rdlabo
rdlabo changed the base branch from main to feat/physical-safe-area September 21, 2026 13:05
@rdlabo rdlabo changed the title feat(tabs): add explicit adaptive vertical placement feat(tabs): add foldable vertical tab bar Sep 21, 2026
@rdlabo
rdlabo force-pushed the feat/physical-safe-area branch from ebe2880 to fdcff52 Compare September 22, 2026 01:01
@rdlabo
rdlabo force-pushed the feat/adaptive-tabs branch 2 times, most recently from ced2fea to bc6a455 Compare September 22, 2026 02:21
@rdlabo
rdlabo force-pushed the feat/physical-safe-area branch from 4969d79 to 23cf96a Compare September 22, 2026 02:35
@rdlabo

rdlabo commented Sep 22, 2026

Copy link
Copy Markdown
Contributor Author

Consolidated into #213. The adaptive tab-bar commits are now part of the head branch, so this intermediate stacked PR is no longer needed.

@rdlabo rdlabo closed this Sep 22, 2026
@rdlabo

rdlabo commented Sep 22, 2026

Copy link
Copy Markdown
Contributor Author

Consolidated into #213; its adaptive tab-bar commits are now included in the Web foldable PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant