Repository navigation
feat(pager-view): pill tab bar variant and centered content band (OK-66512) - #236
Merged
Merged
Conversation
…(OK-66512) - nativeTabBar.style.variant "pill" on iOS, Android and Web: one rounded background behind the selected item, taken from current item frames. Web reads live button boxes on every sync, so items that only move when the list changes never reuse another item's width. - style.indicatorAnimationEnabled (pill, default true) snaps the pill and label colors to the selection when false. - style.contentMaxWidth centers the tab row and toolbar slot. - style.itemPaddingHorizontal and Web hover / pressed item colors. - New options travel in nativeTabBarConfig JSON; codegen props unchanged. - SPEC: "Pill tabs and centered content band".
Open
1 of 2 tasks
huhuanming
marked this pull request as ready for review
November 9, 2026 15:51
huhuanming
enabled auto-merge (squash)
November 9, 2026 15:52
originalix
approved these changes
Nov 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
OK-66512: on desktop, the Home pill tab bar can show the wrong width for the selected tab. Load Solana, switch through networks with more tabs (Polygon, Bitcoin), return to Solana, and click 历史记录. The pill only covers "历史记".
The Home pill was drawn by the JS
TabBar. It cached each item's layout by index, and on webonLayoutcomes from aResizeObserver, which fires only on size changes. When the tab list changes, a tab that only moves keeps the old entry for its new index, so the pill takes another tab's width.The pager's own tab bar (already used for Home text tabs on narrow native) had no pill style, so wide layouts could not move to it.
Change
nativeTabBar.style.variant: "pill"on iOS, Android and Web:indicatorColor) behind the selected item, with label colors blended frominactiveTextColortoactiveTextColor. With progress, the leading edge eases out and the trailing edge eases in.style.indicatorAnimationEnabled(defaulttrue). Whenfalse, the pill and label colors snap to the selection, which matches the 6.6.4 desktop behavior.style.contentMaxWidth(all variants): centers the tab row and toolbar slot; the bar background stays full width.style.itemPaddingHorizontal(defaults: text 10, pill 14, others 8) and WebitemHoverBackgroundColor/itemPressedBackgroundColor.nativeTabBarConfigJSON, so codegen props and the native component schema are unchanged.Verification
Consumer: OneKey desktop dev build (Electron, single runtime), branch
feat/home-native-pill-tabs, with this package built and copied intonode_modules. Same session and account for both runs. Each step clicks 历史记录, then measures the selected tab and pill boxes over CDP.indicatorAnimationEnabled: false, six frames sampled after a tab click all show the pill already on the target withtransition: none.jest(16 passed) andbob buildpass.iOS (iPad (A16) simulator, iOS 27.0, local native build)
md, so iOS shows the native text tabs on this new build. Those rendered normally, including item padding, the toolbar and switching between Spot / Perps / DeFi / NFT / History.Not covered yet:
react-native, and the web pager throws outside a web DOM runtime.main; they are left unformatted to keep the diff small.Consumer change: OneKeyHQ/app-monorepo#14412 (Home switches every width to the pager tab bar).