Skip to content

test(vue): cover tab bar used without tabs - #31589

Merged
ShaneK merged 1 commit into
mainfrom
FW-6499
Oct 19, 2026
Merged

ShaneK merged 1 commit into
mainfrom
FW-6499

Conversation

@ShaneK

@ShaneK ShaneK commented Oct 16, 2026

Copy link
Copy Markdown
Member

Issue number: resolves #30361


What is the current behavior?

In v8, using ion-tab-bar without ion-tabs throws in Vue because IonTabBar injects tabBarData with no default and reads .value off undefined. Clicking a tab button then throws again in the native event handler. This was already fixed in v9 by the strict type checking chore in #31320, which gave the injection a null default and guarded it, but nothing tests the standalone case in a browser.

What is the new behavior?

This adds a /tabs-standalone page to the Vue test app with an ion-tab-bar that has no ion-tabs or ion-router-outlet around it, where the app tracks the active tab itself and navigates by calling router.push from the tab buttons. The new Playwright spec checks that clicking moves the selected state, runs the app's own @click, doesn't change the URL, logs no errors or warnings, and that router.push from a tab button navigates.

Does this introduce a breaking change?

  • Yes
  • No

Other information

I checked that the spec catches the original bug by patching the built @ionic/vue back to the v8 inject("tabBarData"). Both tests fail with the errors from the issue, and they pass on this branch. This is test-only, so the v8 behavior is unchanged. We aren't backporting the fix since it isn't critical.

The follow-up request in the issue for a page animation when switching tabs by method isn't covered here and is out of scope for the issue it's in.

@ShaneK
ShaneK requested a review from a team as a code owner October 16, 2026 21:19
@ShaneK
ShaneK requested a review from brandyscarney October 16, 2026 21:19
@vercel

vercel Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
ionic-framework Ready Ready Preview Oct 16, 2026 9:22pm UTC

Request Review

@thetaPC thetaPC 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.

LGTM

@ShaneK
ShaneK added this pull request to the merge queue Oct 19, 2026
Merged via the queue into main with commit 6fddbad Oct 19, 2026
56 checks passed
@ShaneK
ShaneK deleted the FW-6499 branch October 19, 2026 18:18

This branch was successfully deployed

1 active deployment
Preview — ba71bd81 Deployed Oct 16, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

package: vue @ionic/vue package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: using ion-tab-bar without ion-tabs or ion-router-outlet

2 participants