react-native-copilot icon indicating copy to clipboard operation
react-native-copilot copied to clipboard

Has any one tried to use this library along with react navigation

Open KaulSalil opened this issue 5 years ago • 13 comments

Hi This library fits my use case very well ,unfortunately some of the views that i need highlighted are on different screens/routes/navigators/components . They are not a single component . One of the views that i need to highlight is in side drawer . The first screenshot contains the top tab bar in which i want to highlight all the individual items and the second screen shot contains the drawer which i want to high light . We are using react navigation . Kindly help please

screen shot 2018-09-14 at 7 32 39 pm

screen shot 2018-09-14 at 7 33 11 pm

KaulSalil avatar Sep 14 '18 14:09 KaulSalil

I believe it should be doable using the step change event listener and updating rn-navigation's state accordingly. I am currently working on a new example app that includes react-navigation. However, I can't estimate when I'll be able to finish it.

mohebifar avatar Sep 14 '18 18:09 mohebifar

i am also thinking on the similar lines will update you with the progress i make in this approach .

KaulSalil avatar Sep 15 '18 07:09 KaulSalil

I'm going to give this a stab this weekend. I'll report back as well.

pribeh avatar Sep 20 '18 15:09 pribeh

didnt have much luck with this till now .

KaulSalil avatar Sep 24 '18 11:09 KaulSalil

Thanks for updating us, @kaulsalil88. @pribeh Did you get a chance to take a stab at it?

RichardLitt avatar Sep 26 '18 21:09 RichardLitt

@RichardLitt Not yet. I'm also using React Native Navigation, but the logic shouldn't be that different. I'll likely be able to get to it next week.

pribeh avatar Sep 27 '18 02:09 pribeh

I have same issue. It's nice for the first screen:

screen shot 2018-11-12 at 4 48 51 pm screen shot 2018-11-12 at 4 49 19 pm

but when I navigate to another screen, I want to display tooltip at text AAAAA, but it looks weird:

screen shot 2018-11-12 at 4 50 56 pm

If I set position custom component at the bottom, even I can not see the Tooltip: screen shot 2018-11-12 at 4 59 08 pm

shamanking avatar Nov 12 '18 09:11 shamanking

I have solution for react-navigation, we need to calculate for obj.left and obj.top In CopilotModal.js, function _animateMove()

async _animateMove(obj = {}): void {
    const layout = await this.measure();
    obj.left = obj.left % Dimensions.get('window').width
    obj.top = obj.top % Dimensions.get('window').height

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

shamanking avatar Nov 12 '18 12:11 shamanking

hi, is there any solution for this ?

dianbagus96 avatar Dec 18 '18 09:12 dianbagus96

@dianbagus96 Not at the moment. Anyone is free to make a PR, at this point, though. :)

RichardLitt avatar Dec 20 '18 15:12 RichardLitt

@dianbagus96 : I solved it with timeout:

this.timer = setTimeout(() => {
        this.props.start()
      }, 1000)

shamanking avatar Dec 21 '18 08:12 shamanking

@dianbagus96 : I solved it with timeout:

this.timer = setTimeout(() => {
        this.props.start()
      }, 1000)

@shamanking awesome workaround

obiwankenoobi avatar Mar 14 '19 16:03 obiwankenoobi

@mohebifar

I believe it should be doable using the step change event listener and updating rn-navigation's state accordingly. I am currently working on a new example app that includes react-navigation. However, I can't estimate when I'll be able to finish it.

Hello, is there anyway i can use it with react navigation header icon and bottom tab nav icons ?

blazk0 avatar Aug 03 '19 16:08 blazk0