mohebifar / mohebifar/react-native-copilot

Would like to run a function when "finish" is called, but not if "skip" was pressed

Open
#293 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

Is your feature request related to a problem? Please describe.
I have an issue with the implementation of copilot. My app is separated across several screens, and after several steps on the first screen I would like to perform navigation to the next and continue the guide there. From there som more steps would be run before another navigation and so on.. But I would also like to implement that if user presses skip, no navigation happens and the guide is instead finished.

Describe the solution you'd like
I'd like some sort of event to be triggered that differentiates between if the copilotsteps have been performed to completion on a page, or if the "skip" button was pressed (i.e if all copilotSteps on a page were followed or not). This way you could have differing logic based on this.

Describe alternatives you've considered
I tried using copilotEvents and currentStep to differentiagte, but because currentStep seems to be set to the last step when pressing skip this did not work.

Teachability, Documentation, Adoption, Migration Strategy
Hope this makes sense to anyone reading this :)

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

Start by tracing the copilotEvents and currentStep entry points mentioned in the issue, then follow how finish and skip are distinguished. Determine where completion and skip state are exposed across a multi-screen guide, and define the observable behavior needed for navigation to occur only after completion. Verify the behavior with the project’s existing event or walkthrough tests, if present.

Written by the indexing model from the issue text.

Assessment

Tech stack
react-native, typescript
Domain
mobile
Issue type
Feature
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.