notes-android icon indicating copy to clipboard operation
notes-android copied to clipboard

Option to disable automatic phone number detection

Open chylex opened this issue 3 years ago • 1 comments

Is your feature request related to a problem? Please describe. Hi! I'm trying to write down bank account numbers (groups of 3-3-4 digits separated by spaces), but the app detects and formats them as phone numbers (note that 3-3-4 is not even a valid phone number format in my country). Clicking them by accident opens up the Phone app, which is annoying.

Describe the solution you'd like I would like to completely disable automatic detection of phone numbers, either globally or for individual notes. Personally I have never needed to click phone numbers in a notes app, so it would be nice to have the option to disable automatic detection and formatting of phone numbers.

Describe alternatives you've considered

  • I looked at the markdown syntax reference, but there was no mention of phone number parsing. I found that wrapping the number inside a code block works, but it doesn't make semantic sense.
  • An alternative solution might be to fix phone number detection to understand phone number formats based on the user's country, but that seems needlessly complicated, still prone to false positives, and could cause issues for users who take notes with international numbers.

Additional context I'm using 3.4.18 with Android 9.

chylex avatar Jan 27 '22 22:01 chylex

I just ran into this same problem. In a note with a bunch of numbers (mostly years and monetary values) almost all of them get converted into phone number links. This looks wrong, leads to weird formatting (numbers are links halfway through), and is just plain annoying, because you have to be careful not to click any of the links, or you'll suddenly open the phone app...

Here is a list of different numbers I tried out that will sometimes create correct phone links, often create links for things that aren't phone numbers at all, or even create phone links halfway through numbers.

1 // No link
23 // No link
456
7890
123 456 789
123-456-789
123.456.789
(123) 456 789
+(44)(20) 1234 5678
0123456789
[0123456789](tel:+49123456789) // Explicitly creates a link with tel:
tel:+49123456789 // Link starts after the tel:

3,14159 // Comma causes link for half the number
123.456,78€ // Comma causes link for half the number
123,79€ // Comma causes link for half the number
12,99€ // No link
3,99€ // No link

3.14159
123,456.78$ // Comma causes link for half the number
123.79$
12.99$
9.99$

2022-09-17 // This is one link
2022-09-17 12:34:56 // but this doesn't contain a link at all? 
01.02.1995 // German date = link
01.02.1995 12:35:40 // Everything up to the first colon is a link?
2022/12/01 // No link
2022/12/01 13:33:37 // No link

IMHO numbers (including special characters) are used in way too many different kinds of contexts/formats to reliably say: "A number containing at least 3 numbers, with additional (inconsistent at best) rules around special characters, is mostly likely a phone number and should be treated as such." Because those guesses are just gonna be wrong like 90% of the time, and will therefore highlight random numbers as phone numbers for no good reason. (For me personally this is more like 99,9% of the time, because I pretty much never write down phone numbers in my notes. Maybe in a Todo? Not in my notes though.)

Additionally if someone actually wants to easily dial a phone number from the notes, there are already (IMO) good enough options for this:

  • Just explicitly use a link with tel:: [0123456789](tel:+49123456789)
  • My years old android already suggests the phone app when I highlight a phone number in any text through long-press. I imagine iPhones do the same.

Alternatively I think it'd be fine to make phone numbers into links, but only if there were much stricter rules regarding the formatting, to reduce the falsely "guessed" numbers by a lot, f.e.:

  • Phone numbers HAVE TO start with a + sign. Might still cause problems if people write down numbers with +/- explicitly.
  • Even better: Phone numbers HAVE TO start with [Whitespace]tel:
  • Even even better: Both. 😉

PS: After writing all of that, I realized that this might actually be something that is caused by Android instead? Not sure, but don't think so.

Version

Notes 3.6.0 on Android 8.1.0

sadamczyk avatar Sep 10 '22 16:09 sadamczyk