mohebifar / mohebifar/react-native-copilot

Tooltip Text Updates Prematurely

Open
#344 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
2.4k
Forks
428
PR merge metrics
No merged PRs in 30d

Description

Current Behavior
The tooltip text updates visually before it goes to the next step. This results in a flash of out of place text before the next step loads. Video attached. I'm also using React Native's new architecture. I'm using a custom tooltip, but it also happens with the default tooltip.

Think the issue is from how the current step is being updated, it is updating the current step prop immediately while the moveModalToStep is asynchronous:
https://github.com/mohebifar/react-native-copilot/blob/master/src/contexts/CopilotProvider.tsx#L104

Demo

https://github.com/user-attachments/assets/710dd2b3-b500-4dff-9e04-ad6374df44c6

Expected behavior/code
Expected the text would not change until the next step is rendered.

Environment

  • Device: iPhone 14 Simulator
  • OS: iOS16
  • react-native-copilot: 3.3.3
  • react-native: 0.77.1
  • react-native-svg: 15.8.0

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in src/contexts/CopilotProvider.tsx around line 104 and reproduce the transition with both the custom and default tooltip. Trace when the current step prop changes relative to the asynchronous moveModalToStep call; done when the tooltip text remains unchanged until the next step is rendered.

Written by the indexing model from the issue text.

Assessment

Tech stack
react-native, typescript
Domain
mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.