Skip to content

fix: animate vertical tab bar selection and dragging - #226

Merged
rdlabo merged 5 commits into
mainfrom
fix/vertical-tab-bar-animation
Sep 26, 2026
Merged

rdlabo merged 5 commits into
mainfrom
fix/vertical-tab-bar-animation

Conversation

@rdlabo

@rdlabo rdlabo commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

Vertical tab bars currently disable the optional glass selection effect. This change adapts the existing native-measured tab motion to the vertical axis, adding tap transfer, press/release deformation, and touch/mouse drag tracking on either rail edge.

The effect follows CSS eligibility, respects reduced motion and theme opt-outs, and refreshes when the bar is reparented. Horizontal bars retain their existing behavior. Regression coverage includes selection, cancellation, dynamic opt-out/restoration, movement between horizontal and vertical placement, and updated rail screenshots generated in CI.

Validation:

  • Package build, changed-file Prettier checks, and git diff --check passed.
  • 39 related Playwright tests passed; the reparenting follow-up passed its 14-test regression suite.
  • Ionic 8 and Ionic 9 E2E jobs passed in run 36260899687.
  • Supervisor and OSS acceptance agent reviews approved the implementation after fixing the CSS/gesture eligibility mismatch.

The screenshot updater workflow fix is isolated in #227. This PR contains only the tab implementation, tests, and their baselines.

@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 2 potential issues.

Devin Review

Comment thread src/index.ts
reducedMotion.addEventListener('change', update);
const placementObserver = new win.MutationObserver(update);
if (verticalBarsRoot) placementObserver.observe(verticalBarsRoot, { attributes: true, attributeFilter: ['class'] });
placementObserver.observe(targetElement, { attributes: true, attributeFilter: ['class'] });

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.

🟡 タブバー移動後のジェスチャー方向が配置と一致しない

縦レールのタブバーを ion-tabs の外へ移すと、表示だけが横配置に戻ります。親要素の変更は監視されないため、縦方向のジェスチャーが残り、横方向のドラッグでタブを切り替えられません。

Learn more

CSS と登録時の配置判定は、タブバーが ion-tabs の直接の子かどうかに依存します。監視対象はアプリとタブバー自身の class 属性のみで、親子関係の変更では更新が走りません。

Example: 縦レールのタブバーを ion-tabs から通常の div に移すと、バーは横向きですがドラッグ判定は縦向きのままです。

Recommended fix: 親子関係の変更も検知して配置を再計算してください。移動後の CSS とジェスチャー方向が一致することをテストしてください。

Devin Review


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

Comment on lines +71 to +72
const cdp = await page.context().newCDPSession(page);
await cdp.send('Input.dispatchTouchEvent', { type: 'touchStart', touchPoints: [{ x, y }] });

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.

🔍 タッチテストのブラウザー依存性

新しいタッチテストは CDP を直接使用します。現在の Chromium 専用設定では動作しますが、他のブラウザーを追加する際はスキップ条件が必要です。

Devin Review


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

@github-actions

github-actions Bot commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

Playwright test results

passed  349 passed

Details

stats  349 tests across 20 suites
duration  3 minutes, 40 seconds
commit  3dae3ae
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 26, 2026
@rdlabo

rdlabo commented Sep 26, 2026

Copy link
Copy Markdown
Contributor Author

/update-screenshots

@github-actions

github-actions Bot commented Sep 26, 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-226/

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 26, 2026
@github-actions

Copy link
Copy Markdown
Contributor

✅ Screenshots have been updated successfully!

The new screenshots have been committed to this PR.

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

rdlabo commented Sep 26, 2026

Copy link
Copy Markdown
Contributor Author

/update-screenshots

@github-actions

Copy link
Copy Markdown
Contributor

ℹ️ No screenshot changes detected.

The current screenshots are already up to date.

github-actions Bot added a commit that referenced this pull request Sep 26, 2026
github-actions Bot added a commit that referenced this pull request Sep 26, 2026
github-actions Bot added a commit that referenced this pull request Sep 26, 2026
@rdlabo
rdlabo merged commit a2e125f into main Sep 26, 2026
19 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

npm beta published

CI passed for the merge commit a2e125f11160. Install the immutable version with:

npm install @rdlabo/ionic-theme-ios27@1.2.0-beta.pr226.shaa2e125f11160

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