petlyh / JS-Dict

Japanese-English dictionary app powered by Jisho.org.
GNU General Public License v3.0
47 stars 2 forks source link

Add text selection action that opens results in a popup #11

Open gtbkul opened 2 months ago

gtbkul commented 2 months ago

Hi! First I'd like to thank you so much for making this app! It has been very helpful! Sadly I have no programming skills and would like to request the following feature to make this app better:

I think it will be very useful to implement the functionality as seen for the Translate You app in the video attachment. It pops up in the text selection pop-up and allows us to quickly see a translation in a pop-up window, without disrupting the workflow. Here is the github for the Translate You app that can be seen in the video attachment demonstrating the feature: https://github.com/you-apps/TranslateYou

https://github.com/user-attachments/assets/fd27a18f-c75c-4195-bb60-6c985b909ae7

Thank you!!

petlyh commented 2 months ago

Hi. Thanks for your feature request.

I'll probably implement request 1 and 3. However, with regards to your second feature request, the ACTION_TRANSLATE intent is made for translator apps and is for various reasons not really suitable for a dictionary app. I will however add support for PROCESS_TEXT intents, which will make JS-Dict show up in the text selection popup and search for the selected text in JS-Dict when tapped. That will at least save 1 or 2 taps over sharing the text to JS-Dict.

By the way, I'm going to split up your issue. In the future, please open a separate issue for each feature request.

gtbkul commented 2 months ago

Hi!

Thanks for your reply and being able to implement feature 1 and 3.

Regarding the second feature, I think there is some misunderstanding about my request. I did not mean to request a ACTION_TRANSLATE or any translation service. What I intended by that example is that there is an app (Translate You) that not only has PROCESS_TEXT intents, but also that instead of opening the Translate You app it just opens a pop up as you can see in the video in my last post corresponding to feature 2. I wished to request that when JS-dict is tapped in the text selection popup, it can be handled in a way that it opens a similar pop up with condensed UI instead of opening the full app. This would be very seamless as we will not need to leave our Japanese article/page to go to the JS-dict all and would instead be able to access Jisho through that pop-up. I tried to make a video demonstration for what I meant, please find it as follows:

https://github.com/user-attachments/assets/b020227e-103c-437b-af3f-09742ced353f

(Please excuse my bad editing) (I hope you are able to copy this feature from the Translate You app as it is open source: https://github.com/you-apps/TranslateYou)

Please let me know if there is any confusion about the feature request description, or if I am misunderstanding something.

Thanks!!

PS. I'm sorry about putting all requests in one issue, I'm new to github and not familiar with proper etiquette here, I'll keep it on mind for future!

petlyh commented 1 day ago

Hi. Sorry for the very late reply, I've been away for some time.

You're right, I seem to have misunderstood your request. It looks like Translate You uses a PROCESS_TEXT intent that launches a popup activity instead of the main app activity. It might be difficult to implement a standalone popup like that since this app uses Flutter, though I'll have to look into it.

There's also some other details to figure out, like how much information about each result should be shown in the popup, and whether more info about a result should be shown in the popup or in the main app when the result is pressed, etc. At the very least, I think the UI would need to be simplified a bit compared to the main app in order for it to make sense in a popup, though input is welcome on this.