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

Use copilot with custom native-base components #31

Closed
dirkvanherpen opened this issue May 20, 2018 · 17 comments
Closed

Use copilot with custom native-base components #31

dirkvanherpen opened this issue May 20, 2018 · 17 comments
Assignees
Labels

Comments

@dirkvanherpen
Copy link

It seems not possible to highlight buttons in the walkthrough.
I call this.props.start(); so that shouldn't be the problem. It might have to do with the custom components in native-base. If we are using the normal components it works perfectly, but with the custom components, it won't.
image

How can I make copilot work with custom native-base components?

@dirkvanherpen dirkvanherpen changed the title use copilot with buttons Use copilot with custom native-base components May 20, 2018
@mohebifar
Copy link
Owner

Is it Button from 'native-base' or Button from 'react-native'? If you don't have access to the underlying component's code (being a third-party lib), one possible workaround is to wrap it within a View component.

Only "native" components can be made walkthroughable using the walkthroughable helper.

https://github.com/okgrow/react-native-copilot#custom-components-as-steps

@dirkvanherpen
Copy link
Author

dirkvanherpen commented May 23, 2018

Thank you for the quick reply. It worked for me, meaning I get a step-by-step walkthrough, but the position of the highlights doesn't match the position of the buttons.

Code:
image

Application:
Step 1:
image
Step 2:
image

Any idea how I can fix this?

@mohebifar
Copy link
Owner

Could you please confirm that you're using v2.2.2?
v2.2.1 was buggy on Android having the same positioning issue and got fixed just last week.

@dirkvanherpen
Copy link
Author

I can confirm that I am using v2.2.2.

image

@mohebifar
Copy link
Owner

Okay, thanks. I'm curious to see what happens with 2.2.1.

@dirkvanherpen
Copy link
Author

I have already tried version 2.2.1, but I still have the same problem.

@mohebifar
Copy link
Owner

It'd be good if you share a minimal code that helps me reproduce this issue.

@mohebifar
Copy link
Owner

@dirkvanherpen Can you please now try v2.2.3?

@dirkvanherpen
Copy link
Author

I tried version 2.2.3 and 2.2.4, but I still have the same issues with both versions.

v2.2.3
image
v2.2.4
image

@dirkvanherpen
Copy link
Author

I have tried multiple versions to try to fix this, but I can't get the highlight parts exactly on the button.
Any idea how to fix this?

@Vishal-Lakkapathri
Copy link

Facing the same issue when used with https://wix.github.io/react-native-navigation.
Need Help!!

@sujitpk-perennial
Copy link

sujitpk-perennial commented Jun 13, 2018

Hello team, I am able to show the copilot UI for iOS properly. But for Android, the UI is not showing proper place. It is happening throughout the app. Also text also not visible. I am using "@okgrow/react-native-copilot": "^2.2.6"

screen shot 2018-06-13 at 3 22 10 pm

@RichardLitt
Copy link
Contributor

@mohebifar Can you take another look at this, please?

@mohebifar
Copy link
Owner

@sujitpk-perennial It is really hard to figure out what the issue is without being able to reproduce it. It would be great if you could provide a very minimal expo snack or a gist to help me reproduce this.

@sujitpk-perennial
Copy link

sujitpk-perennial commented Jun 15, 2018

@mohebifar I found that

  1. In style.js
    tooltipText: { }
When I added like 

tooltipText: {
    color: 'rgba(20,20,20,1)'
  }

Then I am able to see the color for text in Android.

  1. In CopilotModel.js file, I found one condition that

if (this.props.androidStatusBarVisible && Platform.OS === 'android') {
obj.top -= StatusBar.currentHeight; // eslint-disable-line no-param-reassign
}


   When I commented obj.top -= StatusBar.currentHeight; then I am able to see the badge number properly. 


   





@danielang
Copy link
Contributor

You can add:

copilot({
    androidStatusBarVisible: false
}),

@deepakverma4
Copy link

@dirkvanherpen @mohebifar facing same issue in android. have you found any solution for it?

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

No branches or pull requests

7 participants