This repo could never sync. There was NO merge-base with tamagui — 372 commits
here against 15,791 there, unrelated histories — because it began as a
copy-paste rebrand with a flattened layout. Every "sync" since was a hand
re-application that drifted, which is why the tree sat on 7.3.1 while upstream
shipped fixes we then rediscovered by hand.
This commit's PARENT IS TAMAGUI. A future sync is `git merge tama/main` then
`node scripts/rebrand.mjs` — a real merge, because the history is now shared.
174 packages: 166 upstream, our 8 restored (chrome, shell, telemetry, recipes,
get, font-geist-{sans,mono}, @hanzo/booker), bento-get gained. 170/170 build.
Our patches to files UPSTREAM ALSO OWNS are carried, which the package-level
delta missed and which was where the value actually was:
- useMedia's server snapshot (`initState ?? getMedia()`). Upstream still
returns undefined there, so every Tamagui Dialog kills a prerender — the
exact crash hanzo.app spent a day on.
- data-slot on web host nodes, absent upstream entirely.
Both applied ONTO upstream's newer files (it rewrote useMedia +150/-63 and
createComponent +160/-55), marked `PATCH (ours, carried across the transplant)`.
Seven traps are encoded in scripts/rebrand.mjs, each found by a gate:
skip itself and lockfiles; special-case the double-branded names in BOTH scoped
and bare form; map path strings, not just paths; drop a level for the flattened
group; check disk rather than a stale index.
Rust build artifacts are NOT committed. An earlier draft of this commit swept
apps/desktop/src-tauri/target/debug in via `git add -A` — 3,859 files including
a 272MB .a, over GitHub's 100MB cap, so the push could never have landed. They
are gitignored now.
Co-Authored-By: Hanzo Dev <[email protected]>
3.2 KiB
Remove focusable prop in favor of tabIndex
Summary
Remove the React Native focusable prop from Gui v2 in favor of the web-standard tabIndex. This simplifies the API and aligns with web conventions.
Semantic Mapping
focusable={true}→tabIndex={0}focusable={false}→tabIndex={-1}focusable={!disabled}→tabIndex={disabled ? -1 : 0}
Files to Change
Core (remove type + forwarding)
-
pkgs/core/web/src/interfaces/GuiComponentEvents.tsx:8- Remove
focusable?: anyfrom type
- Remove
-
pkgs/core/react-native-web-internals/src/modules/forwardedProps/index.tsx:68- Remove
focusable: truefrom forwarded props
- Remove
-
pkgs/core/react-native-web-internals/src/modules/createDOMProps/index.tsx- Remove focusable handling (lines 110, 310-339)
- Or just leave it - once removed from forwardedProps it won't reach here
-
pkgs/core/web/src/createComponent.tsx:1295- Remove
focusable: viewProps.focusable ?? true
- Remove
-
pkgs/core/core/src/createOptimizedView.native.tsx:40,117-119- Keep
tabIndex→focusableconversion for native (RN still uses focusable) - Just remove accepting
focusableas input prop
- Keep
UI Components (change focusable → tabIndex)
-
pkgs/ui/button/src/v1/Button.tsx- Line 84:
focusable: true→tabIndex: 0 - Line 295: remove
focusable: undefined
- Line 84:
-
pkgs/ui/toggle-group/src/ToggleGroup.tsx:83focusable={!disabled}→tabIndex={disabled ? -1 : 0}
-
pkgs/ui/toast/src/ToastImpl.tsx:34focusable: true→tabIndex: 0
-
pkgs/ui/toast/src/ToastViewport.tsx:293focusable={context.toastCount > 0}→tabIndex={context.toastCount > 0 ? 0 : -1}
-
pkgs/ui/radio-headless/src/useRadioGroup.tsx:235focusable: !isDisabled→tabIndex: isDisabled ? -1 : 0
-
pkgs/ui/create-menu/src/createBaseMenu.tsx:1039focusable={!disabled}→tabIndex={disabled ? -1 : 0}
-
pkgs/ui/tabs/src/createTabs.tsx:142focusable={!disabled}→tabIndex={disabled ? -1 : 0}
-
pkgs/ui/input/src/shared.tsx:20focusable: true→tabIndex: 0
-
pkgs/ui/roving-focus/src/RovingFocusGroup.tsx:172,237- Line 172:
focusable={focusable}→tabIndex={focusable ? 0 : -1} - Line 237: Update
ItemDatatype if needed
- Line 172:
Tests
-
pkgs/core/react-native-web-internals/src/modules/createDOMProps/__tests__/index-test.tsx- Update or remove focusable tests
-
pkgs/core/core-test/webAlignment.web.test.tsx:213-220- Update test expectations
-
pkgs/core/core-test/webAlignment.native.test.tsx:188-194- Update test expectations
-
pkgs/compiler/static-tests/tests/webAlignment.web.test.tsx:221- Update test
Out of Scope (separate package)
pkgs/react-native-web-lite- This is a separate RN-web compatibility layer, keep focusable there
Difficulty
Medium - Straightforward changes but spread across ~15 files. Main risk is missing a usage somewhere.
Testing
- Run
yarn testin affected packages - Check kitchen-sink for focus behavior
- Verify tabIndex works correctly on web and maps to focusable on native