whatsapp-anywhere icon indicating copy to clipboard operation
whatsapp-anywhere copied to clipboard

Don't show hyperlink for non-number text

Open gitcommitshow opened this issue 4 years ago • 9 comments

gitcommitshow avatar Jun 26 '21 10:06 gitcommitshow

Hello! I am new to open source and would like to work on this. Can I take this up?

I can contribute more to issues/features/docs etc. once I understand and get this set up.

nishit-prasad avatar Jun 26 '21 12:06 nishit-prasad

Can I take this up?

Absolutely, let me know if you need any support from my side

gitcommitshow avatar Jun 27 '21 04:06 gitcommitshow

@gitcommitshow Thank you!

Question, for this issue - is it a better idea that the right-click menu shows up only when you select a string that is a number? (Not able to see hyperlink anywhere - if I am understanding this right)

nishit-prasad avatar Jun 27 '21 08:06 nishit-prasad

Question, for this issue - is it a better idea that the right-click menu shows up only when you select a string that is a number? (Not able to see hyperlink anywhere - if I am understanding this right)

No. Right click context menu should always be shown. Because this is the default behaviour on browser that people expect. Right now, we add the selected text as one of the item in this right click context menu.

What we want to do now is to add that menu item only if the selected text contained at least 10 digits.

gitcommitshow avatar Jun 27 '21 14:06 gitcommitshow

Got it.

So currently in non-number string such as foo, I see the menu item as Whatsapp: foo.

So would you like to change it to just Whatsapp?

nishit-prasad avatar Jun 27 '21 18:06 nishit-prasad

So currently in non-number string such as foo, I see the menu item as Whatsapp: foo. So would you like to change it to just Whatsapp?

We can do one of the following

A. Change the text to Whatsapp: <Invalid No.> B. Don't show Whatsapp.... at all

I would vote for B option, but do whatever you think is the best for good user experience.

gitcommitshow avatar Jun 28 '21 00:06 gitcommitshow

Also check the issue #9 , we can fix that issue right after fixing this current issue. So having both of these fixes #5 and #9 will improve the user experience significantly IMO

gitcommitshow avatar Jun 28 '21 00:06 gitcommitshow

Thank you for the clarification.

So based on what I understand, if we go with option B then the menu item won't be displayed if the number is not a valid 10-digit number. Right?

And for #9 if we go with tooltip, we can just render WhatsApp icon - this way it can be less annoying instead of rendering text "Whatsapp" on tooltip.

nishit-prasad avatar Jun 29 '21 09:06 nishit-prasad

So based on what I understand, if we go with option B then the menu item won't be displayed if the number is not a valid 10-digit number. Right?

Yes. And we need to keep in mind - there are different formats for writing numbers that are correct e.g. 99999999, 9999-999-999, +01-9999999999, +019999999999, +920-9999999999 and many more.

And for #9 if we go with tooltip, we can just render WhatsApp icon - this way it can be less annoying instead of rendering text "Whatsapp" on tooltip.

Agree. We can put whatsapp icon next to the number so user can see the no. as well as the clickable icon

gitcommitshow avatar Jul 01 '21 01:07 gitcommitshow