fregante / GhostText

👻 Use your text editor to write in your browser. Everything you type in the editor will be instantly updated in the browser (and vice versa).
https://GhostText.fregante.com
MIT License
3.25k stars 116 forks source link

Add notification and focus options #245

Closed eugenesvk closed 1 year ago

eugenesvk commented 1 year ago

Adds two options:

  1. Show notification messages on (dis)connect (on by default)
  2. Focus browser tab on disconnect (also on by default)
eugenesvk commented 1 year ago

tests also pass locally

fregante commented 1 year ago

I made some style adjustments. I believe updating webext-base-css will improve it further, but I'll do that separately:

Screenshot 1 Screenshot 2
fregante commented 1 year ago

I believe updating webext-base-css will improve it further,

Actually the ugly field is due to Parcel: https://github.com/parcel-bundler/parcel/issues/8866

fregante commented 1 year ago

I'm thinking about replacing the "Connected" notification with a non-removable overlay/UI:

Thoughts?

eugenesvk commented 1 year ago

I don't like the non-removable part as your other solution is already working great for me

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)

But I agree that for some users it might be better than right-clicking By the way, what about adding an option to bind a keyboard shortcut to disconnect?

fregante commented 1 year ago

I don't like the non-removable part

I suppose I can leave the right click and add the UI as a replacement of the connect notifications. This means you can still hide the UI and continue to use the right click.

By the way, what about adding an option to bind a keyboard shortcut to disconnect?

That's a welcome change and it's easy to implement too. I think it only needs a manifest.json change and a onCommand listener in background.js

PR welcome

There's also a related request to remove the default one (it can still be set though)

https://github.com/fregante/GhostText/issues/241

fregante commented 1 year ago

Done https://github.com/fregante/GhostText/pull/269