Skip to content

common-adapters: remove unused/narrow-use components#29260

Merged
chrisnojima merged 1 commit into
nojima/HOTPOT-next-670-clean-2from
nojima/HOTPOT-common-clean
May 29, 2026
Merged

common-adapters: remove unused/narrow-use components#29260
chrisnojima merged 1 commit into
nojima/HOTPOT-next-670-clean-2from
nojima/HOTPOT-common-clean

Conversation

@chrisnojima
Copy link
Copy Markdown
Contributor

  • Delete TeamWithPopup (unused everywhere)
  • Delete timeline-marker.meta.tsx (single color constant, inlined)
  • Move TimelineMarker to system-git-push/ (only caller)
  • Move PlatformIcon to profile/ (only callers are in profile/)
  • Remove BottomSheetModal/Backdrop/ScrollView from index (only used internally in popup/, not via Kb.*)
  • Remove ProfileCard from index (wired internally, never imported externally)
  • Box2Animated removed; callers use createAnimatedComponent(Kb.Box2) or Animated.createAnimatedComponent(Kb.Box2) locally
  • Remove dead ReAnimated={} export from index
  • Remove duplicate ConnectedNameWithIcon alias (same as NameWithIcon)
  • box.tsx: import Reanimated from ./reanimated instead of directly from react-native-reanimated

- Delete TeamWithPopup (unused everywhere)
- Delete timeline-marker.meta.tsx (single color constant, inlined)
- Move TimelineMarker to system-git-push/ (only caller)
- Move PlatformIcon to profile/ (only callers are in profile/)
- Remove BottomSheetModal/Backdrop/ScrollView from index (only used
  internally in popup/, not via Kb.*)
- Remove ProfileCard from index (wired internally, never imported
  externally)
- Box2Animated removed; callers use createAnimatedComponent(Kb.Box2)
  or Animated.createAnimatedComponent(Kb.Box2) locally
- Remove dead ReAnimated={} export from index
- Remove duplicate ConnectedNameWithIcon alias (same as NameWithIcon)
- box.tsx: import Reanimated from ./reanimated instead of directly
  from react-native-reanimated
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR cleans up shared/common-adapters by removing unused/internal components from the public index and relocating narrow-use components closer to their callers. The goal is to reduce the surface area of the Kb.* namespace and clarify ownership of each component.

Changes:

  • Delete TeamWithPopup and the timeline-marker.meta.tsx color constant; move TimelineMarker into system-git-push/ and PlatformIcon into profile/.
  • Trim common-adapters/index.tsx (drop Box2Animated, ConnectedNameWithIcon, PlatformIcon, ProfileCard, TimelineMarker, TeamWithPopup, BottomSheet*, dead ReAnimated={}); update callers to use Kb.NameWithIcon or locally-built Animated.createAnimatedComponent(Kb.Box2).
  • Drop the unused direct react-native-reanimated import in box.tsx along with Box2Animated.

Reviewed changes

Copilot reviewed 17 out of 17 changed files in this pull request and generated no comments.

Show a summary per file
File Description
shared/common-adapters/index.tsx Removes unused/internal exports from the public index.
shared/common-adapters/box.tsx Removes Box2Animated and the direct reanimated import it required.
shared/common-adapters/team-with-popup.tsx Deletes the unused component.
shared/common-adapters/timeline-marker.meta.tsx Deletes the single-constant meta file.
shared/chat/conversation/messages/system-git-push/timeline-marker.tsx Relocated TimelineMarker; inlines the color constant and imports Box2 from @/common-adapters.
shared/chat/conversation/messages/system-git-push/container.tsx Uses the local TimelineMarker import.
shared/profile/platform-icon.tsx Renames Render to PlatformIcon and imports Box2/IconAuto/ImageIcon/IconType from @/common-adapters.
shared/profile/pgp/choice/index.tsx, shared/profile/generic/proofs-list.tsx Switch to importing PlatformIcon directly from @/profile/platform-icon.
shared/chat/audio/audio-recorder.native.tsx Replaces Kb.Box2Animated with a local Animated.createAnimatedComponent(Kb.Box2).
shared/team-building/service-tab-bar.tsx Replaces Kb.Box2Animated with createAnimatedComponent(Kb.Box2).
shared/team-building/user-bubble.tsx, shared/people/follow-suggestions.tsx, shared/teams/team/menu-container.tsx, shared/router-v2/tab-bar.desktop.tsx, shared/profile/user/index.tsx, shared/chat/conversation/info-panel/header.tsx Replace Kb.ConnectedNameWithIcon with Kb.NameWithIcon after the duplicate alias was removed.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@chrisnojima chrisnojima merged commit 49971c9 into nojima/HOTPOT-next-670-clean-2 May 29, 2026
1 of 2 checks passed
@chrisnojima chrisnojima deleted the nojima/HOTPOT-common-clean branch May 29, 2026 13:44
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.

2 participants