Skip to content

feat(ios26): support badges on toolbar buttons - #376

Merged
rdlabo merged 14 commits into
ios26from
feat/ios26-toolbar-button-badge
Nov 16, 2026
Merged

rdlabo merged 14 commits into
ios26from
feat/ios26-toolbar-button-badge

Conversation

@rdlabo

@rdlabo rdlabo commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Direct-child ion-badge elements now overlay iOS 26 toolbar buttons without changing the button layout. Standalone buttons and ion-buttons groups support empty, numeric and wide badges. Styling stays in ion-button.scss, scoped to toolbar buttons with a direct badge child and their owned Web rail clones and preserving all theme opt-outs.

Badge colors follow Ionic's existing primary palette and explicit color / CSS settings. There is no fixed system-red override. Native rendering follows the same resolved colors in capacitor-plugin#57.

Usage and live standalone/grouped previews are in demo Docs / Special markup, generated from docs/special-markup.md. The comparison demo is reachable from Index and includes a back action. Existing image regression covers LTR/RTL, pressed/resting groups, CSS-hidden badges, outside-toolbar clone fixtures and unaffected outside/nested badges. No separate JavaScript unit or dimension tests were added.

Validation: the final PR CI passed, including screenshot regression, lint and package checks. Baselines were generated by the repository's Linux CI update workflow. Native reference below was captured on iOS 26.5.

iOS 26 remains a backward-compatibility target.

Related: webview-native-ui/capacitor-plugin#26.

Native Ionic badge palette

Linux CI baseline: light

Linux CI baseline: dark

@rdlabo

rdlabo commented Nov 16, 2026

Copy link
Copy Markdown
Contributor Author

/update-screenshots

@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Playwright test results

passed  184 passed

Details

stats  184 tests across 14 suites
duration  59 seconds
commit  2790b25
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

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

📊 Ionic 9 Playwright Test Report

View the detailed Ionic 9 report after GitHub Pages deployment completes: https://webview-native-ui.github.io/ionic-theme-ios27/pr-376/

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

@rdlabo

rdlabo commented Nov 16, 2026

Copy link
Copy Markdown
Contributor Author

/update-screenshots

@devin-ai-integration

Copy link
Copy Markdown
Contributor

レビュー

#377 を ios26 ブランチへ移植したもので、ion-toolbar-badge.scss は同一です。#377 に書いた設計上の指摘(glass グループの overflow: visible が押下状態に与える影響、docs の display: none の記述と詳細度、空白入りの空バッジが :empty にマッチしない件)はこちらにも当てはまります。それに加えて、この PR では CI が落ちています。

1. CI lint が落ちている(要修正)

demo/src/app/docs/docs-page.component.spec.ts:28 で figure.docs-example を固定数で数えており、docs/special-markup.md の preview を2つ増やしたので expected 9 to be 7 で失敗しています。期待値を 9 に更新してください。

2. スクリーンショットのベースラインが未コミット

test が toolbar-badge(All Routes / Dark Mode)で失敗しています。docs コミットの後の /update-screenshots による PNG のコミットはまだ届いていません。1 を直してから再実行してください。

Written by Devin

@github-actions

Copy link
Copy Markdown
Contributor

✅ Screenshots have been updated successfully!

The new screenshots have been committed to this PR.

@rdlabo

rdlabo commented Nov 16, 2026

Copy link
Copy Markdown
Contributor Author

Devinのレビューへの対応です。

Docs preview: 7 -> 9. Existing demo suite: 32 files / 37 tests passed.

  1. 既存の画像回帰画面で、LTR側のバッジ付きグループをmouse downし、ion-activated を固定して撮影するよう変更しました。RTL側は通常状態です。light/darkで背景の角丸が維持され、子要素の背景がカプセル外へ漏れないことを確認しました。バッジを持つグループに限定した overflow: visible を維持しています。
  2. 高詳細度の display: block を削除し、空バッジにだけ詳細度0の :where(...:empty) を適用しました。通常の .badge-off { display: none; } で数値・空バッジとも隠せる例を、既存の画像回帰画面に加えて確認しました。
  3. demo DocsのSpecial markupに、indicatorのタグ内には空白・改行を入れない旨を追記しました。
  4. 固定色はネイティブ参照に合わせたものです。iOS 26.5のlight/darkおよびiOS 27.1のlightを、Display P3からsRGBへ変換して比較すると #ff373c になります。添付のネイティブdark参照はiOS 26.5です。iOS 27のdarkネイティブ検証としては扱っていません。

バッジの装飾は ion-button.scss に直接記述し、別モジュールとutilsへの移動は取りやめました。build・lintは成功しています。新しいユニットテストや寸法テストは追加していません。

添付のブラウザ画像はMacでの確認用です。正式な基準画像は、今回の修正後に既存のLinux CIフローで更新します。

LTR pressed, RTL resting: light

LTR pressed, RTL resting: dark

Native iOS 26.5 dark color reference

@rdlabo

rdlabo commented Nov 16, 2026

Copy link
Copy Markdown
Contributor Author

/update-screenshots

@github-actions

Copy link
Copy Markdown
Contributor

✅ Screenshots have been updated successfully!

The new screenshots have been committed to this PR.

@rdlabo

rdlabo commented Nov 16, 2026

Copy link
Copy Markdown
Contributor Author

/update-screenshots

@github-actions

Copy link
Copy Markdown
Contributor

✅ Screenshots have been updated successfully!

The new screenshots have been committed to this PR.

@rdlabo

rdlabo commented Nov 16, 2026

Copy link
Copy Markdown
Contributor Author

/update-screenshots

@rdlabo

rdlabo commented Nov 16, 2026

Copy link
Copy Markdown
Contributor Author

配色とCIの追加対応です。

  • テーマの #ff373c / 白の固定を削除し、Ionicの既定色と color / CSS指定を維持しました。ネイティブ側は capacitor-plugin#57 で、公開UIKit APIへIonicの解決済み背景色・文字色を渡します。システムのバッジ位置・形状は維持しています。iOS 26.5 / 27.2でネイティブ画像テストが成功しています。
  • iOS 27の全体CI時間切れは、今回追加したルートのIndex一覧への登録漏れが原因でした。先の「対象外の別ジョブ」という切り分けでは不十分でした。Indexと戻る導線を追加し、既存巡回テストの初期化待ちも修正しました。既存の全ページ巡回テストはローカルで成功しています。
  • 最終画面のLinux基準画像をCIで更新し、その画像を含む最終CIも確認します。新しいJavaScriptユニットテストは追加していません。

@github-actions

Copy link
Copy Markdown
Contributor

✅ Screenshots have been updated successfully!

The new screenshots have been committed to this PR.

@rdlabo

rdlabo commented Nov 16, 2026

Copy link
Copy Markdown
Contributor Author

/update-screenshots

@github-actions

Copy link
Copy Markdown
Contributor

✅ Screenshots have been updated successfully!

The new screenshots have been committed to this PR.

@rdlabo
rdlabo merged commit e257a21 into ios26 Nov 16, 2026
9 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

npm beta published

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

npm install @rdlabo/ionic-theme-ios26@9.4.3-beta.pr376.shae257a21939e1

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