-
Notifications
You must be signed in to change notification settings - Fork 985
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
Add 'Selectable' to a Text component on profile and wallet screens #3616
Comments
Balance: 0.000000 ETH |
@foopang Do you feel like you can fix this? :) I really like your contribution! |
@denis-sharypin Thanks! I will keep an eye on it. I feel that it is a very beginner-friendly task, I guess you may wanna let new contributors work on it first. |
…ile and wallet screens
@denis-sharypin I can pick this up but just wondering one thing, wouldn't it be a better experience to make this text copied-on-tapped (and on tap we show a little small popup with the text "Address copied to clipboard" or something)? It's less tap that way and there are no other possible actions intended for this text too. |
@go1t I thought about that. But decided to go with this solution bc it's simpler and quicker from implementation pov and such behavior consistent and native to the mobile platforms. Otherwise, I need to create a custom alert, then provide animation for this alert and behavior is not consistent with our patterns (it's a button behavior but we don't have buttons here). Later we will probably add a small button to this address which allows to copy this or even replace it with ens username. Would be great if you pick up this. |
Got it. I think the implementation would be about the same since normal But yeah I agree that adding a copy button would make the most sense. I also have some experience in UI design so I can give this approach a shot as well if you are not available to design this yet. But I can keep going in the original direction as well if you want. |
@go1t thanks! I would happy if we go in the original direction right now. |
@go1t @denis-sharypin @jeluard guys lets find some compromise because current solution from @go1t is over complicated for this issue, let's just implement standard os copy paste: long tap, select all, copy, wdyt? |
Let's add only |
@flexsurfer @denis-sharypin @jeluard There are four ways we can go about here:
If we can go with the 3rd option with compromise, it will be just the matter of adding an atom to the text component and that's it (essentially a couple extra lines). The 4th option is as simple as adding a selectable prop as well, as it's just replacing the Text with TextInput. Probably need to add some styles but that's it. That's why I think either the 3rd option or 4th option is the better way to go here. What do you think? |
@go1t With option 2, can end users still copy the address content? |
Yes. It’s just going to be a little confusing since the highlight would show up briefly then go away when the tooltip is there. But yeah the behavior of option 1 and 2 is an issue on react-native side that has been there for quite a while :/ |
Can we disable the tooltip? Essentially we need a simple way to copy the address. |
We definitely can. You can see our discussion in the comments above as well. |
@jeluard I personally don't want to introduce a new pattern right now (tap on something — get visual confirmation that it's copied with transition animations) |
@go1t Sorry I guess we will go with your option 4. then, if you can make it look like initial screenshots. |
got it! |
User Story
As a user, I want to have an opportunity to copy contact codes and wallet address manually.
Description
Type: Feature
Afer a long press, I would like to have an opportunity to copy contact codes and wallet adress through a native platform instrument for iOS and Android. I believe it could be done by adding props
Selectable
to a Text component. Docs: https://facebook.github.io/react-native/docs/text.html#selectable(pic for iOS, on Android it should show its native instrument)
Reproduction
All three codes that have to be copyable could be found here:
Profile tab
Share my contact code
buttonWallet tab
Receive transaction
buttonplus button
on aHome tab
Start new chat
Additional Information
The text was updated successfully, but these errors were encountered: