mohebifar / mohebifar/react-native-copilot
User should be able to set where a scrollview rests when scrolling to next step
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2.4k
- Forks
- 428
- PR merge metrics
- No merged PRs in 30d
Description
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.
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
handleNextso 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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in src/contexts/CopilotProvider.tsx at the scrollTo call referenced in the issue, then trace how step props are defined and passed to the step component. Add a per-step value that controls the scrollTo parameters, and update the documentation so users can configure where the target rests when advancing to the next step.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react-native, typescript
- Domain
- mobile
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100