clarkio / vscode-twitch-highlighter

This is a VS Code extension that will allow your Twitch chat to highlight a line of code via a command message. Example: `!line 8 server.js`. See master branch README.md for more details
https://clarkio.com
203 stars 14 forks source link

Add unhighlight on disconnect #67

Closed parithon closed 5 years ago

parithon commented 5 years ago

Purpose

When streamers disconnect from the chat service it would be helpful if the highlights that were generated while on stream automatically go unhighlight.

Files Changed

How to Test

  1. Clone the repo: git clone https://github.com/clarkio/vscode-twitch-highlighter.git
  2. Install the node dependencies: cd vscode-twitch-highlighter && npm install
  3. Press F5 or click debug button (green triangle/play button) in VSCode
  4. Set the Twitch Highlighter Unhighlight On Disconnect in your workspace settings
  5. Create a couple highlights while connected to the chat service
  6. Disconnect from the chat service

What to Validate

Addresses

64

parithon commented 5 years ago

I decided to keep the unhighlightOnDisconnect setting to false by default. If the broadcaster disconnects from the chat, the unhighlightOnDisconnect is false, and highlights exist, a dialog will be displayed that will ask what to do with the highlights. Three options will be available:

1) Always Remove - Removes all the highlighted lines and sets the unhighighlightOnDisconnect setting to true. 2) Remove - Removes all the highlighted lines 3) Keep - Does nothing, all highlights will remain and the chat will disconnect.

image

clarkio commented 5 years ago

@NickLarsen I tested locally and believe @parithon has addressed your valid concerns around the user-friendliness of this feature. When you get a moment could you re-review and let us know what you think.

Essentially now there is a notification to prompt you on how you want to handle the highlights on disconnect. Also if there is an interruption in the connection to the Twitch API that will not affect the highlights. The server implementation is set to attempt to reconnect as well.

NickLarsen commented 5 years ago

Sorry for not getting back to this earlier. From the screenshot it looks like an improvement and keeping it off by default is fine for now.