UrlChecker icon indicating copy to clipboard operation
UrlChecker copied to clipboard

Integrate URLCheck within text selection context menu

Open pressRtowin opened this issue 2 years ago • 12 comments

Describe a related problem (optional)

No response

Describe your suggested feature

Continuing the theme of "quicker/easier ways to summon URLCheck", this would allow skipping the Share or Open dialogs (which both introduce a small delay as well) entirely and going straight to URLCheck from selected links.

OpenLinkWith appears to implement this in two ways. I'm not sure what exactly determines which method is used, but selecting a URL in a text box within the browser yields this: Screenshot_20230223_180922_Samsung Internet which when tapped on, yields this: Screenshot_20230223_180942_Open Link With

On the other hand. Selecting the URL within the URL bar gives a slightly different option: Screenshot_20230223_181159_Samsung Internet but tapping on it brings you to the same menu. I'm not sure why two different texts are used here, or if that's relevant to implementing this in any way, but I thought I'd include it for completion.

Describe alternatives you've considered for your suggested feature

No response

Other details

No response

Acknowledgements

  • [X] I have searched the existing issues and this is a new ticket, NOT a duplicate or related to another open issue.
  • [X] I have written a short but informative title.
  • [X] I will fill out all of the requested information in this form.

pressRtowin avatar Feb 24 '23 00:02 pressRtowin

To add to this, a button/module that is only shown when accesed this way, this button would replace said URL.

PabloOQ avatar Feb 24 '23 20:02 PabloOQ

What do you mean by replace?

pressRtowin avatar Feb 24 '23 20:02 pressRtowin

When you use the shortcut to open the selected text, the app knows if the text comes from an editable view or not. And if it is editable, you can change it.

I guess what Pablo is suggesting is to add a module that will be shown only when opening this way from an editable text, with a button to replace the content and go back to the app.

The user steps would be:

  • select any url on an editable text
  • press the edit option to open URLCheck
  • modify the url as desired
  • press the new module "apply" (or whatever) button
  • URLCheck closes and the selected url is now automatically replaced with the new one

TrianguloY avatar Feb 24 '23 21:02 TrianguloY

~~Hi, If I may, I think @pressRtowin is asking if it was possible to copy the behavior of "openlinkwith" to a point, implement an option that directly adds URLCheck to the floating text selection menu, so that it calls URLCheck directly, or maybe to call the second floating menu for selecting applications, contacts etc...~~

Ilithy avatar Feb 24 '23 21:02 Ilithy

Ah I see. A module to re-enter the URLCheck modified URL into an editable field was not what I was originally getting at, but would be a nice addition. Although this adds yet another "end action" to the open/share cluster. 😅

But yes, as @Ilithy said, my original idea was just to have URLCheck in its current form able to open URLs directly from selected text.

pressRtowin avatar Feb 24 '23 21:02 pressRtowin

The "Apply" feature would definitely eliminate a lot of repetitive copy/pasting from my life, such as when sending links to friends within blocks of text where it wasn't convenient to use the "Share" function directly.

pressRtowin avatar Feb 24 '23 21:02 pressRtowin

Just to confirm: if you select an url, the first button in the small popup should open the first available app that can handle it. If URLCheck is configured as a default browser it will most probably be the one. On android 12 that first button has the app icon and name of the app, on Android 13 it just says "open" (thanks google). In any case a dedicated option to ensure it is opened is not a bad idea, even if the share menu is also available.

TrianguloY avatar Feb 24 '23 21:02 TrianguloY

Just to confirm: if you select an url, the first button in the small popup should open the first available app that can handle it. If URLCheck is configured as a default browser it will most probably be the one. On android 12 that first button has the app icon and name of the app, on Android 13 it just says "open" (thanks google). In any case a dedicated option to ensure it is opened is not a bad idea, even if the share menu is also available.

Also for people like me who avoid setting any defaults when possible 🙂

pressRtowin avatar Feb 24 '23 21:02 pressRtowin

Also, any clue how the order of that menu is determined and if URLCheck has any control over it? It's clearly not alphabetical.

pressRtowin avatar Feb 24 '23 22:02 pressRtowin

Just to confirm: if you select an url, the first button in the small popup should open the first available app that can handle it. If URLCheck is configured as a default browser it will most probably be the one. On android 12 that first button has the app icon and name of the app, on Android 13 it just says "open" (thanks google).

Unfortunately some applications modify this behavior, by modifying this floating menu, removing the direct opening function for example (as it does on my phone Vanadium for example, which removes this button to open "directly", it sulks not to be the default browser)

Maybe this could help: https://medium.com/androiddevelopers/custom-text-selection-actions-with-action-process-text-191f792d2999

Ilithy avatar Feb 24 '23 22:02 Ilithy

Interesting that they say this in that documentation:

Q: Can I trigger it only for certain types of text?

A: Nope. Your option will appear every time anyone selects text. Of course, chances are users won’t select an option to ‘Translate’ unless they want to translate, etc., but I’d be careful to code defensively as you cannot be sure what type of text context you’ll receive.

But I'm definitely seeing a different set of options when I open the menu from the URL bar vs from a standard text field. So there must be some way to control where/when it appears.

pressRtowin avatar Feb 24 '23 22:02 pressRtowin

Yup great feature, upvote

KorigamiK avatar Sep 04 '24 20:09 KorigamiK