mohebifar / mohebifar/react-native-copilot

Layout issue (x-axis offset) on second start

Open
#104 1 comment 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
2.4k
Forks
428
PR merge metrics
No merged PRs in 30d

Description

Current Behavior
When copilot is started, skipped and started a second time, the overlay seems offset on the x-axis. First time around everything is fine, just on the runs thereafter. I already tried several things, like layout/nest the 'walkthroughable' view differently, delay start, relative/absolute positioning, svg- vs. view-overlay, animated on/off...

Expected behavior/code
No layout issues on subsequent starts of copilot.

Environment

  • Device: iPhone XR & 5s (Simulator), iPhone XR (Device)
  • OS: iOS12
  • react-native-copilot: v2.4.1
  • react-native: v0.57.8
  • react-native-svg: v6.5.2 initially, then upgraded to v9.2.4

Possible Solution
Maybe a way to force recalculate/layout the modal dialog, or be able to manipulate the x-offset (like there's for y). As mentioned -- on the 'initial' calculations, the origins of the affected views are calculated correctly. Only on subsequent loads it's off.

Additional context/Screenshots
First run...
screenshot 2019-02-14 at 11 36 16

Subsequent run...
screenshot 2019-02-14 at 11 36 58

Thank you!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source file, test, or entry point is named in the report. Start by reproducing the overlay on a second start with the listed React Native and iOS versions, then trace the layout calculation involved in the walkthrough overlay. Done means the overlay has no x-axis offset on subsequent starts.

Written by the indexing model from the issue text.

Assessment

Tech stack
react-native, typescript
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.