corphish / TextTools

Text related functions accessible on text selection
Apache License 2.0
70 stars 3 forks source link

Copy Evaluated Math Expression #6

Open AjayRahul1 opened 3 months ago

AjayRahul1 commented 3 months ago

First of all, thank you for this app. This is something I've really wanted to make for myself using Android Studio.

I'd like to make a simple suggestion to enhance user experience.

Explanation why it enhances UX

I would think this enhances user experience because the user types the whole expression. If this replaces text, then if the user wanted to make any changes in the math expression, he/she needs to type it all again.

I hope this helps. Thank you :)

corphish commented 3 months ago

It could be given as an option along with existing method of replacing the mathematical expression with its result.

AjayRahul1 commented 3 months ago

Right. Rename current evaluate as Evaluate Inline. Create a new option to evaluate and copy the result and notify the user with a toast or a snackbar. That could be better I guess. I forked this repository and added the copying part myself but it's not the total functionality. So I think it's better for you to add functionality.

P.S: I am a basic Android Developer. So I wouldn't be able to add the code and contribute to this repository. Else I would have done the contribution. Thank you.

corphish commented 3 months ago

Functionality now available in https://github.com/corphish/TextTools/releases/tag/v1.3.1. Do try and let me know. If you have any suggestion, do mention.

AjayRahul1 commented 3 months ago

This is the best implementation and I can assure you that sir.

However in a few apps, there is one issue with "Append Result to the selected text".

In WhatsApp, this feature worked completely fine. But in TickTick, this worked in the way mentioned below.

If I select 200+100 and choose that option, Then text is becoming, "200+100200+100 = 300".

"""Edit: Also one more thing is that, once evaluate option is selected, there's no going back. I had to select atleast one of those options. Sliding back or clicking outside area doesn't do anything. So maybe you could do something on it. """

Thank you for considering my suggestion and adding it sir.

corphish commented 2 months ago

Ok so that's a different issue. Yes it looks like some apps handle PROCESS_TEXT intent differently.

For your second suggestion, are you talking about the normal (multiple option) variant or single option variant? It is not possible for the former but possible for the later.

AjayRahul1 commented 2 months ago

Screenshot_20240801-112036.png

I am talking about this Evaluate menu. Once we arrive at this menu by clicking "[T²] Evaluate", both the back button and clicking on the empty area around the menu cannot take me back. We definitely need to select at least one of those 3 options.

corphish commented 1 week ago

Should be fixed in the 1.4.0 release.