GoodDollar / GoodCollective

Monorepo for GoodCollective (Segmented UBI and Direct Payments Pool)
MIT License
3 stars 1 forks source link

[Improvements] Superfluid Link should open in new page #99

Closed vldkhh closed 6 months ago

vldkhh commented 6 months ago

image

krisbitney commented 6 months ago

The image isn't displaying and i'm not sure what this issue means. Could you clarify?

vldkhh commented 6 months ago

currently, the link is opened on the same page.

krisbitney commented 6 months ago

Okay, I understand. That will be out of scope for the MVP because it's a little bit complex to handle in React Native.

It is complex because React Native is made to work with Web, Android, iOS. Since Android and iOS apps don't have the intrinsic concept of tabs, React Native doesn't support opening a link in a new tab/window out of the box.

If someone knows of an easy way to support this feature, I'd be happy to add it. But when I looked into it, the solutions I found weren't so simple.

vldkhh commented 6 months ago

@L03TJ3

L03TJ3 commented 6 months ago

@krisbitney sorry to ping you twice. Misclicked.

You can use the Link component from the native-base library for this.

Reference: https://docs.nativebase.io/link

Example implementation here: https://github.com/GoodDollar/GoodWeb3-Mono/blob/6d4b2d1b9e4335cdeed84b896c2dd90676777e33/packages/good-design/src/core/web3/modals/RedirectModal.tsx#L17

krisbitney commented 6 months ago

It is fixed in this PR: https://github.com/GoodDollar/GoodCollective/pull/117

Thanks @L03TJ3 . That component was already being used, but I realized there was a bug due to it being wrapped by a text element instead of the other way around. (i.e. it was <text><Link></Link></text> instead of the text being nested within the Link). Your example helped me see the issue.

L03TJ3 commented 6 months ago

Ah yeah now I see that link is used everywhere already :nerd_face: but ok nice! are you going to use that pr for other issues as well? or can I merge @krisbitney

krisbitney commented 6 months ago

Ah yeah now I see that link is used everywhere already 🤓 but ok nice! are you going to use that pr for other issues as well? or can I merge @krisbitney

You can merge if you'd like

L03TJ3 commented 6 months ago

ye just cleaning up the board a bit. Confirmed this is working so closing