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

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

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

評価

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

調査の方向性

issueで参照されているscrollTo呼び出しがあるsrc/contexts/CopilotProvider.tsxから始め、step propsがどのように定義され、step componentに渡されるかをたどります。scrollToパラメーターを制御するステップごとの値を追加し、次のステップに進むときにtargetがどこに配置されるかをユーザーが設定できるようにドキュメントを更新します。

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

説明

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.

主要言語
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 を短くまとめたダイジェスト。