Tooltip Text Updates Prematurely

オープン
#344 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
45/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
react-native, typescript
領域
mobile

調査の方向性

src/contexts/CopilotProvider.tsx の 104 行目あたりから始め、カスタム tooltip とデフォルトの tooltip の両方で遷移を再現します。非同期の moveModalToStep 呼び出しとの相対的な関係で current step prop がいつ変化するかを追跡します。次のステップがレンダリングされるまで tooltip のテキストが変わらなければ完了です。

索引モデルが issue の本文から書いたものです。

説明

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
主要言語
TypeScript
スター
2.4k
フォーク
425
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

mohebifar/react-native-copilot のほかの issue

mohebifar/react-native-copilot の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。