User should be able to set where a scrollview rests when scrolling to next step

Đang mở
#278 1 bình luận 1 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
48/100
Loại issue
Tính năng
Độ 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 tại lệnh gọi scrollTo được tham chiếu trong issue, sau đó lần theo cách step props được định nghĩa và truyền vào step component. Thêm một giá trị cho mỗi step để điều khiển các tham số của scrollTo, đồng thời cập nhật tài liệu để người dùng có thể cấu hình vị trí target dừng lại khi chuyển sang step tiếp theo.

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

Mô tả

Is your feature request related to a problem? Please describe.

Scrollview doesn't currently allow the user to dictate where on the screen an element within a scrollview should display. It defaults to the middle of the screen

Describe the solution you'd like

A prop that can be passed to the step component that determines the scrollTo function params for the given step.

See: https://github.com/mohebifar/react-native-copilot/blob/021f9c49747b298c2a1e531a305ca8f50726e039/src/contexts/CopilotProvider.tsx#L111-L112

A simple solve could be allowing the user to pass in this offset value per-step.

Describe alternatives you've considered

  • Interacting with the scrollRef before calling handleNext so that it's scrolled into location without any library changes. This doesn't work as the scrollview is reset by the library.
  • The library doesn't manipulate the scrollview outside of finding nodes / steps, so the user could manually call scroll functions before handleNext.

Teachability, Documentation, Adoption, Migration Strategy

Happy to raise a PR with some documentation + implementation if it's of use.

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.