Skip to content

refactor: utility types cleanup - #5098

Merged
satya164 merged 4 commits into
callstack:mainfrom
michalfedyna:chore/utils-cleanup
Sep 4, 2026
Merged

refactor: utility types cleanup#5098
satya164 merged 4 commits into
callstack:mainfrom
michalfedyna:chore/utils-cleanup

Conversation

@michalfedyna

Copy link
Copy Markdown
Contributor

Motivation

Removed utilities from src/types.tsx. As suggested by @satya164.

Related issue

Some of them are duplicating what TS already has or can inline using some existing utility.

Test plan

Look if replacement was done correctly.

@michalfedyna michalfedyna changed the title chore: utilitis types cleanup Utiliti types cleanup Sep 3, 2026
@azizbecha azizbecha changed the title Utiliti types cleanup Utilities types cleanup Sep 3, 2026
@michalfedyna michalfedyna changed the title Utilities types cleanup refactor: utilitie types cleanup Sep 3, 2026
@michalfedyna michalfedyna changed the title refactor: utilitie types cleanup refactor: utility types cleanup Sep 3, 2026

@satya164 satya164 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@satya164
satya164 merged commit f938c78 into callstack:main Sep 4, 2026
6 of 8 checks passed
MikitasK added a commit to MrMuzyk/react-native-paper that referenced this pull request Sep 4, 2026
Conflicts resolved:
- docs: `main` now generates component docs at build time (callstack#5094), so the
  generated `.mdx`, `_meta.json` and `componentDocs6x.json` files this branch
  touched are dropped along with the rest of them.
- docs/6.x/docs/guides/migration.md: kept both sides, Searchbar section moved
  next to the other component sections.
- src/components/Searchbar.tsx: the file moved to `Searchbar/` on this branch,
  so `main`'s changes were ported into the new location — `Elevation` from
  `theme/types`, `Omit<TextInputProps, 'style'>`, and the reworked `Surface`
  API from callstack#5078 (`backgroundColor` / `borderRadius` props, no `container`).
  `SearchbarResults` and `Searchbar/utils` follow the same API and the
  `src/types` removal from callstack#5098.
- Searchbar tests: `Surface` no longer renders `${testID}-outer-layer`, so
  those assertions target the container itself. Snapshots regenerated.

`style` goes back to `StyleProp<ViewStyle>`; Reanimated support lands in the
next commit.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CXgTWJSnvLKQZ2Kkw1Qhkj
MikitasK added a commit to burczu/react-native-paper that referenced this pull request Sep 5, 2026
…into feat/navigation-bar-md3

Conflicts resolved:
- src/components/BottomNavigation/*, its test and snapshot: stay deleted;
  upstream had only touched them for the Surface/elevation rework (callstack#5078)
  and the utility-type cleanup (callstack#5098).
- NavigationBar/utils.ts: kept the `colorRoles` token import, took the
  `InternalTheme` move to `theme/types`.
- docs/6.x/docs/components/**, docs/scripts/generate-rspress-content.ts and
  docs/src/data/componentDocs6x.json: stay deleted. Upstream replaced the
  hand-written 6.x component docs with the generated rspress pipeline, so
  the NavigationBar page now comes from component-docs.config.ts.

Adapted to upstream:
- `Surface` lost its `container` prop in callstack#5078. The bar rendered it at
  elevation 0 with a transparent background, so it contributed nothing —
  dropped it for a plain `View`, matching what callstack#5078 did to
  BottomNavigationBar.
- Snapshot updated: callstack#5078 stopped mocking react-native-reanimated and
  added a snapshot serializer, so reanimated styles no longer serialize
  as inline props.
MikitasK added a commit to burczu/react-native-paper that referenced this pull request Sep 5, 2026
…into feat/tooltip-md3-modernization

Conflicts resolved:
- Tooltip.tsx: kept the rewritten trigger and singleton-slot show/hide;
  upstream had only inlined the `isWeb` check, which the merge already
  picked up.
- migration.md: kept both the upstream v6 sections and the Tooltip one.
- jest/testSetup.js: took upstream's setup. It stops mocking
  react-native-reanimated altogether, so the local `cubicBezier` stub the
  branch added to the mock is no longer needed.
- FAB/Extended.tsx: took upstream's `Platform` value import, kept `View`
  as a type-only import (it is only used for the ref type).
- FAB/Shell.tsx: kept both sides of the reanimated import.
- FABExtended.test.tsx: unioned both import lists.

Adapted to upstream:
- `../../types` is gone (callstack#5098/callstack#5087); Tooltip/hooks.ts and
  RichTooltip.tsx now import from `theme/types`.
- Surface's `style` no longer configures background or radius (callstack#5078);
  the rich tooltip passes `backgroundColor` and `borderRadius` as props.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants