Skip to content

Commit

Permalink
Release 0.1.5 (#77)
Browse files Browse the repository at this point in the history
* init 0.1.4

* add changelog with details (#59)

* Add Font Color Setting (#55)

### Purpose
These changes add a new setting that allows users to define the color of the font within a highlight. This comes as a result from the following issue raided by @corbob: #53

 - Addresses: #53

### Files Changed

- `extension.ts`: add use of `color` key in decoration type setup which is read from settings or defaults to `white`
- `package.json`: defined new setting for font color so that it is available to users
- `README.md`: update documentation to reflect the new setting option and changelog details

### How to Test

- Run in terminal/command line: `git clone https://github.com/clarkio/vscode-twitch-highlighter.git`
- Run in terminal/command line: `cd vscode-twitch-highlighter && npm install`
- Press F5 or click debug button (green triangle/play button)
- Create a highlight to see the result

### What to Validate

- Make sure the visible font color of a highlight is defaulting to white
- Open settings in Extension Host instance of VS Code and make sure there is a setting available called "Highlight Font Color" (search for "Twitch Color").
- After changing the default font color to something other than white (such as "red") create a new highlight and confirm the font color in the highlight is now red

* Client refactor (#57)

The extension.ts document is getting unwieldy and needs some refactoring. I refactored the language client out of the extension.ts document into its own class in `twitchLanguageClient.ts`. Additionally, I renamed the `server.ts` to `twitchLanguageServer.ts` to better identify its purpose. Finally, I also cleaned up the unnecessary functions in `credentialManager.ts` and fixed the camel casing of the `twitchHighlighterTreeView.ts` which causes Linux to fail during a build. (e.g. casing matters on Linux)

* added category string in package.json (#63)

As stated [here](https://code.visualstudio.com/api/references/contribution-points#contributes.commands) in the VS Code documentation on contribution points, you can "define a category string which will prefix the command title and allow easy grouping within the Command Palette drop-down."

I'm not sure if this is something that you guys want, but it makes it so you don't have to repeat the `Twitch Highlighter:` part of the command title.  Grouping of the commands may make it look nicer in the command palette.

* update docs

* add ci/cd build instructions

* Added some arbitrary tests

* Removed Glitch from our icons

* Using Webpack to reduce our extension size

* add updates with prs to changelog

* move 0.1.4 to released section

and start 0.1.5 unreleased section

* update tags to each version for comparisons

* Comments and Multi-line Highlight Support

* Add unhighlight on disconnect

* Change `channels` setting to a string (#76)

* Change `channels` setting to a string

* Trim the channels for whitespaces

* Updated README.md (#75)

...to include the DevOps badges from Azure and some images.

* prep for 0.1.5 release

* fix up docs on channels setting and package description
  • Loading branch information
clarkio authored Mar 1, 2019
1 parent 4881196 commit 33be76f
Show file tree
Hide file tree
Showing 11 changed files with 237 additions and 131 deletions.
17 changes: 15 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Released]

## [0.1.4] - 2019-02-26
## [0.1.5]

### Added

- Ability to unhighlight on disconnect ([#67](https://github.com/clarkio/vscode-twitch-highlighter/pull/67) thanks @parithon)
- Option to highlight multiple lines via one command as well as a comment message ([#68](https://github.com/clarkio/vscode-twitch-highlighter/pull/68) thanks @parithon)
- DevOps badges to show status of development and production builds. Plus media to demonstrate the extension in use and a multi-line highlight example ([#75](https://github.com/clarkio/vscode-twitch-highlighter/pull/75) thanks @parithon)

## [0.1.4]

### Added

Expand Down Expand Up @@ -39,6 +47,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Issues where commands were not registering. The cause was from node_modules not being included in the package.

## [0.1.0] - 2019-02-01
## 0.1.0 - 2019-02-01

- Pre-release version to gather feedback from the community and help identify gaps.

[0.1.5]: https://github.com/clarkio/vscode-twitch-highlighter/compare/0.1.4...0.1.5
[0.1.4]: https://github.com/clarkio/vscode-twitch-highlighter/compare/0.1.3...0.1.4
[0.1.3]: https://github.com/clarkio/vscode-twitch-highlighter/compare/0.1.2...0.1.3
[0.1.2]: https://github.com/clarkio/vscode-twitch-highlighter/compare/b28e5041ac...0.1.2
50 changes: 30 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
# Twitch Line Highlighter VS Code Extension

| Master Branch | vNext Branch |
| ----------------------------------------------------- | -------------------------------------------------- |
| [![Master Status][masterstatuslogo]][masterstatusurl] | [![vNext Status][vnextstatuslogo]][vnextstatusurl] |

A VS Code extension to allow your Twitch viewers to help in spotting bugs, typos, etc. etc. by sending a command in chat that will highlight the line of code they want you to check.

![Video](./resources/intro-vid.gif)

## Requirements

In order to use this extension you will need the following things before going to the [Getting Started](#getting-started) section:
Expand All @@ -19,24 +25,14 @@ In order to use this extension you will need the following things before going t
- Keyboard shortcut: `CTRL/CMD + ,`

3. Type in "twitch" into the search bar
4. Find the `Twitch Highlighter: Channels` setting and click on "Edit in settings.json"
5. Add a new entry to the JSON settings file with the setting key `"twitchHighlighter.channels"` and a value that's an array of strings. For now this can just contain one string and its value should be the name of your Twitch account/channel.

Example:

```json
{
"twitchHighlighter.channels": ["clarkio"]
}
```

6. Save your changes and close that tab. Go back to the Settings UI tab.
7. Find the `Nickname` setting. If you are using your own account for the chat bot then enter your account username as the value here. If you created a separate account use that username. Save your changes.
8. In the status bar, click the "Disconnected" button. After clicking it, you'll see a notification that the extension is missing Twitch Credentials.
9. Click the "Set Credentials" button
10. You'll now see a prompt in the top middle of VS Code asking you to enter your Twitch Client Id. This is what you copied and saved from earlier. Copy and paste the value into this prompt and press `Enter`
11. Next you'll be prompted to enter your Twitch token. This is the secret you copied and saved from earlier. It should be a value prefixed with `oauth:`. Copy and paste the secret into this prompt and press `Enter`
12. Click the `Disconnected` button and you should see notifications indicating the extension is starting and finally started listening to the Twitch chat.
4. Find the `Twitch Highlighter: Channels` setting and enter the name of the channel(s) to which you'd like the extension to connect. Example: `clarkio` If you'd like to connect to more than one channel separate them by commas `,`. Example: `clarkio,parithon`
5. Save your changes and close that tab. Go back to the Settings UI tab.
6. Find the `Nickname` setting. If you are using your own account for the chat bot then enter your account username as the value here. If you created a separate account use that username. Save your changes.
7. In the status bar, click the "Disconnected" button. After clicking it, you'll see a notification that the extension is missing Twitch Credentials.
8. Click the "Set Credentials" button
9. You'll now see a prompt in the top middle of VS Code asking you to enter your Twitch Client Id. This is what you copied and saved from earlier. Copy and paste the value into this prompt and press `Enter`
10. Next you'll be prompted to enter your Twitch token. This is the secret you copied and saved from earlier. It should be a value prefixed with `oauth:`. Copy and paste the secret into this prompt and press `Enter`
11. Click the `Disconnected` button and you should see notifications indicating the extension is starting and finally started listening to the Twitch chat.

## Twitch Commands

Expand All @@ -48,10 +44,19 @@ To unhighlight a line, use:

!line !<LineNumber>

To highlight multiple lines, use the same syntax as above but include a range of lines to highlight:

!line <StartLineNumber>-<EndLineNumber>

Additionally, you can also include comments:

!line <LineNumber> This is a comment

![Multi-highlight example](./resources/multi-highlight-example.jpg)

## Extension Settings

- `twitchHighlighter.channels`: The channel name(s) to connect to on Twitch.
Example: `['clarkio'], Another Example: ['clarkio', 'parithon']
- `twitchHighlighter.channels`: A comma separated list of channel name(s) to connect to on Twitch. Example: 'clarkio', Another Example: 'clarkio, parithon'
- `twitchHighlighter.nickname`: The username the bot should use when joining a Twitch channel.

> Note: this is required if you'd like to have the bot send join/leave messages in your chat. It also needs to match the Twitch username with which you generated the OAuth token.
Expand Down Expand Up @@ -80,3 +85,8 @@ Some of the code in this extension has been adapted from the [twitchlint extensi
## Release Notes

See [CHANGELOG.md](CHANGELOG.md)

[masterstatuslogo]: https://clarkcode.visualstudio.com/vscode-line-highlighter-extension/_apis/build/status/Production%20Test%20&%20Build%20-%20VS%20Code%20Line%20Highlighter%20Extension?branchName=master
[masterstatusurl]: https://clarkcode.visualstudio.com/vscode-line-highlighter-extension/_build/latest?definitionId=23&branchName=master
[vnextstatuslogo]: https://clarkcode.visualstudio.com/vscode-line-highlighter-extension/_apis/build/status/Development%20Test%20&%20Build%20-%20VS%20Code%20Line%20Highlighter%20Extension?branchName=vnext
[vnextstatusurl]: https://clarkcode.visualstudio.com/vscode-line-highlighter-extension/_build/latest?definitionId=20&branchName=vnext
15 changes: 10 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "twitch-highlighter",
"displayName": "Twitch Highlighter",
"description": "Allow your Twitch viewers to help in spotting bugs, typos, etc. etc. bysending a command in chat that will highlight the line of code they want you to check.",
"version": "0.1.4",
"description": "Allow your Twitch viewers to help in spotting bugs, typos, etc. by sending a command in chat that will highlight the line of code they want you to check.",
"version": "0.1.5",
"preview": true,
"publisher": "clarkio",
"engines": {
Expand Down Expand Up @@ -146,9 +146,9 @@
"title": "Twitch Highlighter",
"properties": {
"twitchHighlighter.channels": {
"type": "array",
"default": [],
"description": "The channel name(s) to connect to on Twitch. Example: ['clarkio'], Another Example: ['clarkio', 'parithon']"
"type": "string",
"default": "",
"description": "A comma separated list of channel name(s) to connect to on Twitch. Example: 'clarkio', Another Example: 'clarkio, parithon'"
},
"twitchHighlighter.nickname": {
"type": "string",
Expand Down Expand Up @@ -185,6 +185,11 @@
"type": "string",
"default": "Twitch Highlighter has left the building!",
"description": "The message the bot will say when leaving a chat room"
},
"twitchHighlighter.unhighlightOnDisconnect": {
"type": "boolean",
"default": false,
"description": "Unhighlight all lines when disconnected from the chat service."
}
}
}
Expand Down
Binary file added resources/intro-vid.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/multi-highlight-example.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export enum Settings {
'announceBot' = 'announceBot',
'joinMessage' = 'joinMessage',
'leaveMessage' = 'leaveMessage',
'unhighlightOnDisconnect' = 'unhighlightOnDisconnect',
}

export enum Commands {
Expand Down
Loading

0 comments on commit 33be76f

Please sign in to comment.