Open fregante opened 3 years ago
I think that the current method is sufficient...
but I think that it would be more intuitive if clicking on the extension caused us to enter Toggle mode
instead of Register new element
mode. i.e. Clicking on an already-enabled field should disable it, and clicking on a non-enabled field should enable it
@fregante Ideas to disconnect:
How about adding another keyboard shortcut to disconnect? From a couple of months ago, I recall hitting the same (and only) shortcut shall toggle the text fields on and off. For now, hitting the shortcut for "Connect to GhostText" no longer disconnects. The downside is that now we need to remember another key-binding.
Personally, I would prefer having an option with the add-on that restores the old behavior. Maybe we can call it "toggle mode"? With one single shortcut, I enter and edit, and hit it again when done. I use GhostText mostly with Jupyter notebooks.
- How about adding another keyboard shortcut to disconnect
I like that. Keyboard shortcuts are cheap, as long as I can register an action without setting a default shortcut (so it's up to the user to customize it)
2. I would prefer having an option with the add-on that restores the old behavior
I feel you, the simplicity was good. I wonder if that should be the regular behavior, while still allowing multiple fields by:
However this would mean that the first Activation would work one way, and the next activations would work differently… a bit confusing.
Makes me wonder if GT should exclusively handle focused fields:
That's it. Simple. No field focused = do nothing.
You must select the field first and then you activate GhostText. This should simplify the code too, because there's no more "Focus (another) field to activate" state.
Perhaps with an additional behavior:
Full flow chart: https://user-images.githubusercontent.com/1402241/108940258-a2598300-7618-11eb-902f-b704c5a02c5a.png
There is definitely a great value in allowing multiple focus+connections and keeping the editor busy syncing up with all the input fields. Along with the gorgeous flow chart, I can see myself rearranging the tabs and panes opened in the editor to make use of the multiple simultaneous connections. Two concerns, though:
.ipynb
notebook simultaneously with an editor, well, it is advised to write modularized code in .py
scripts. I suppose I can be terribly wrong with the second concern.
By the way, is there an archive of older versions for the Firefox add-on? The versions on this page seem incomplete?
I see myself doing one-off edits mostly, where I only need one input field to activate. When I am done editing, it helps to disconnect GhostText add-on to keep all things back to normal. By now, I may have talked myself to vote for an extra option for a "toggle mode": when activated, the "Connect to GhostText" shortcut does two things below,
If I may recall, is this how GhostText has been working for years? However, I cannot find a newer version between December 2017 and Feb 2021 on the Firefox add-on page. The latest version back in 2017 is Version 17.12.11.910, and it does not allow me to assign a keyboard shortcut to "toggle" the add-on. I'll post a short Autohotkey script if I shall manage to assign a shortcut by clicking on the ghost-icon.
Here is some AHK script that looks for this tiny icon and moves the mouse onto it. To trigger it, use Gosub, icon_search_GhostTextFirefox
.
icon_search_GhostTextFirefox:
CoordMode, Pixel, Screen
CoordMode, Mouse, Screen
; Note, for now, the search canvas is 5600 pixels wide and 2000 pixels tall
ImageSearch, FoundX, FoundY, 0, 0, 5600, 2000, icon_library\GhostText_firefox.png
; Update the cursor location by a few more pixels
FoundX := FoundX + 20
FoundY := FoundY + 14
sleep 50
if (ErrorLevel = 2)
MsgBox Could not conduct the search.
else if (ErrorLevel = 1)
MsgBox Did not find such button.
else
MouseMove, %FoundX%, %FoundY%
return
Right-clicking is a bit awkward and doesn't work when the icon is in a menu on Safari (it used to be the same in Chrome, but they added hamburgers now)
I think GhostText should have a minimal UI to allow disconnection. This would appear sticky on the page:
The only concern is integrating it with the notifications. Maybe:
Originally posted by @subnut in https://github.com/GhostText/GhostText/issues/172#issuecomment-735098823:
Yeah the current disconnection logic isn't super clear. In the previous version you would just click the button again and it would disconnect, but now it just looks for more fields.
So the solution I came up with is to right click the button 😬 or to just close the editor tab (which would make more sense, since you're done with it so you want to go back to the browser)
Does anyone have any suggestions for an intuitive way to disconnect the editor from the browser?