Tooltip Text Updates Prematurely

Đang mở
#344 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
45/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
react-native, typescript
Lĩnh vực
mobile

Hướng nghiên cứu

Bắt đầu trong src/contexts/CopilotProvider.tsx, khoảng dòng 104, và tái hiện quá trình chuyển tiếp với cả tooltip tùy chỉnh và tooltip mặc định. Theo dõi thời điểm prop current step thay đổi so với lệnh gọi moveModalToStep bất đồng bộ; hoàn tất khi văn bản tooltip không thay đổi cho đến khi bước tiếp theo được render.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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
Ngôn ngữ chính
TypeScript
Star
2.4k
Fork
425
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của mohebifar/react-native-copilot

Tất cả issue của mohebifar/react-native-copilot

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.