Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Hide the Skip button #188

Open
personjerry opened this issue Jun 25, 2020 · 5 comments
Open

Feature Request: Hide the Skip button #188

personjerry opened this issue Jun 25, 2020 · 5 comments

Comments

@personjerry
Copy link

Is your feature request related to a problem? Please describe.
My new user experience is very important and I don't want it to be skippable, so I'd like to hide the skip button in the default tooltip.

Describe the solution you'd like
Add a parameter to copilot() to hide the skip button. Drawback is it's another parameter to think about.

Describe alternatives you've considered
I've tried making the translation string to an empty string, but any falsy value is ignored.

Teachability, Documentation, Adoption, Migration Strategy
copilot({ allowSkip: true})

@BaderSerhan
Copy link

Hello.
What's the status of this?
I am currently using the library and would like to remove the skip button.
Thank you.

@ncoen97
Copy link

ncoen97 commented Jun 11, 2021

You can achieve that by setting your own tooltip component

@didac-wh
Copy link

didac-wh commented Nov 8, 2022

A dirty, quick, lazy way is to set "skip" property to a space. The button is still there, but users will unlikely press it.

export default copilot({
  verticalOffset: 32,
  animated: true,
  overlay: 'view',

  labels: {
    // TODO !! Copilot | Translation depends on React components... See: https://github.com/mohebifar/react-native-copilot/issues/260
    previous: "Anterior",
    next: "Siguiente",
    skip: ` `,
    finish: "Terminar",
  },
  // allowSkip: false  // TODO !! Copilot | Pending pull request. See: https://github.com/mohebifar/react-native-copilot/pull/187
  stepNumberComponent: () => (<></>),
})(Main);

@Sandipnag
Copy link

As there is no props, so according to me just comment the lines from luibrary which is responsible for this skip button.

To do this follow the steps below:-

  1. node_modules/react-native-copilot/dist/index.d.ts in this file remove skip from Labels (Line Number:- 25)
    After modification:-
    type Labels = Partial<Record<"previous" | "next" | "finish", string>>;

  2. from index.js file we have to change:-

comment out this line:-

{!isLastStep ? <import_react_native3.TouchableOpacity onPress={handleStop}>{labels.skip}</import_react_native3.TouchableOpacity> : null}

  1. in this object comment out skip

labels = {
finish: "Finish",
next: "Next",
previous: "Previous",
// skip: "Skip"
},

  1. Then make a patch, problem solved.

@jony89
Copy link

jony89 commented Dec 17, 2024

can be achieved with customizing the labels:

      <CopilotProvider stopOnOutsideClick={false} labels={{
        skip: '', next: 'Next', finish: 'Finish', previous: 'Previous',
      }}>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants