Skip to content
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 setting to disable the highlighted text menu shortcut #2173

Merged
merged 3 commits into from
Dec 27, 2023

Conversation

ConcurrentCrab
Copy link
Contributor

Hello! thank you for the great app!

This is a PR that adds an option to disable the "open with" option shown on highlighted text in many apps like chromium browsers, because I personally find it quite annoying and I never use it. The default behavior of it is set to enabled, and as such it doesn't affect any existing or new installations.

Things I'm not sure about:

  • Should the alias component name be extracted into a string resource? Android has weird rules about it, even if the build is marder and the packagename is net.gsantner.markor_test, the component name for the alias is still net.gsantner.markor.AliasDocumentProcessText.
  • It works... mostly. Mostly instantly. Sometimes it doesn't work for reasons unclear to me, without any exceptions thrown, and you need to go into settings and toggle it back twice for the setting to take effect. I don't really get the android intent model, but I think this has more to do with Android caching the intent filter than how we're setting it. We might need to find a way to reliably bust the cache on this setting flip.

@harshad1
Copy link
Collaborator

harshad1 commented Dec 1, 2023

AFAIK trying to affect this option is not well supported on android and is kinda janky overall. I recommend shelving this until we have a robust solution.

And even then I would suggest that this is a non-issue and we should think really hard about adding this (and having yet another settings option) at all.

@ConcurrentCrab IMO you should just add this to your local build. I too build markor locally with a few custom additions.

@ConcurrentCrab
Copy link
Contributor Author

@harshad1 I too would agree that it's important to find a reliable mechanism for implementation of this toggle. A non-functioning setting is no good to anybody. That is why I put up the PR, to see if anybody had a better approach to this (especially since it's hard enough to find support for android that isn't either extremely outdated or useless SEO spam).

That said, I wouldn't agree with that assessment of it being yet another option adding clutter to settings. Because the way I see it, the option Markor shows everytime I highlight text is, to me, unnecessary visual clutter as well. And I'd rather that clutter live in the settings than there.

Of course I have to also recognise the fact that this is just my own (and possibly some other people's) opinions on this, and others may not share it. Such differences of opinions are what configuration options are meant to solve right :)

@gsantner
Copy link
Owner

gsantner commented Dec 3, 2023

Simple idea/solution:
To enable/disable this as well by the "special launchers" settings option. That is basically nowadays the thing people use to turn off unwanted shortcuts/activities. Those are often the same people being upset that there is this feature/button.

So that sounds like a good fit and doesn't require a new settings option.

@ConcurrentCrab
Copy link
Contributor Author

Simple idea/solution: To enable/disable this as well by the "special launchers" settings option. That is basically nowadays the thing people use to turn off unwanted shortcuts/activities. Those are often the same people being upset that there is this feature/button.

So that sounds like a good fit and doesn't require a new settings option.

@gsantner that seems good to me, as I don't have those turned on either. But the setting for the extra launcher shortcuts is disabled by default, while this text highlight option is enabled by default. So we'll have to settle on one default for both.

I'll be honest, I really don't see what the deal is about there being another option in settings. The launcher and the highlight menu are things people see many, many times in a day, so naturally they will want a setting to control how they look. A settings menu is something people go into once, change everything to their liking, and then never go back. I think that deal makes perfect sense.

@gsantner
Copy link
Owner

gsantner commented Dec 3, 2023

I'll be honest, I really don't see what the deal is about there being another option in settings.

Everything that is added, means that it is there from that point. Requires maintenance, results in bug reports if it suddenly does behave different. Requires translations. Is bloat to users who don't care about it/don't touch it. Steers further away from keeping-it-simple-and-lightweight.

So we'll have to settle on one default for both.

Default can stay unchanged for the option, thus hiding the button by default.

@ConcurrentCrab
Copy link
Contributor Author

Amended the suggested changes.

@gsantner gsantner added this to the Markor v2.12 milestone Dec 27, 2023
@gsantner gsantner merged commit 1f6a07d into gsantner:master Dec 27, 2023
1 check passed
@gsantner
Copy link
Owner

Thank you, merged

@ConcurrentCrab
Copy link
Contributor Author

@gsantner Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants