Fevol / obsidian-translate

Translate text and entire notes in Obsidian
MIT License
102 stars 6 forks source link

Feature suggestion: button to clear both panels #64

Closed ksdavidc closed 9 months ago

ksdavidc commented 10 months ago

(Happy New Year. i. Long time, no see. I use this plugin almost daily and it has really helped me in my workflow. Thanks again for it.)

I had an idea for a useful feature to consider. You have button to clear the individual panels. I find that sometimes I wish there were a button to clear both panels at once, just to have a clean slate. I know it is not necessary, but it would be a little cleaner. Just a thought to consider.

Fevol commented 9 months ago

Thanks! Happy New Year to you too!

That does sound like an interesting feature, I'll have to look into a clean way for implementing it (probably a shortcut or quick action at the top bar).

Small note, though: it's probably going to take me a bit to get around to this. The plugin is in semi-maintenance mode as I'm currently spending all my spare time getting my other plugin finished finally. (Plus there are some fundamental issues of the plugin that need fixing, which will also cost a couple of days)

ksdavidc commented 9 months ago

No worries. I am happy as I am, and if it turns out not to be feasible/desirable/etc. not a problem.

ksdavidc commented 9 months ago

Basically working. Again, NOT A PRIORITY, but FYI: For me, this seems to work if the translate panel has translated results in it, but if I have typed somethign into the results panel, that does not get cleared (though original panel does). Also, I don't see a button, which is what I expected,but the hotkey works..

Fevol commented 9 months ago

For me, this seems to work if the translate panel has translated results in it, but if I have typed somethign into the results panel, that does not get cleared (though original panel does).

That's a bit strange. If I understand my own code correctly, both (input and translation) fields should always be fully cleared when pressing the button/hotkey combination, regardless of whether or not it already contained text.


Also, I don't see a button, which is what I expected,but the hotkey works..

Ah yeah, the button does indeed not get added automatically, as I felt that users would rather add it in themselves.

You can still add it in one of two ways:

  1. By adding to to the 'quickaction defaults' in settings (which will add the button to every new translation view you open)

image

  1. By adding it in the view appearance settings

image

image

ksdavidc commented 9 months ago

I had actually done all that :-)

I figured it out. I was using the plugin from a tab that I had dragged to the right sidepanel of my vault. I opened a new translate tab in my main panel and then it had the button, and then I replaced the old tab in my side panel and the button was there. Still no luck on it deleting typed in text.