Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change channels setting to a string #76

Merged
merged 3 commits into from
Mar 1, 2019
Merged

Conversation

parithon
Copy link
Collaborator

@parithon parithon commented Mar 1, 2019

Purpose

VSCode does not have a UI experience to change settings that are of type array; users are required to edit these setting using the text editor instead of the UI editor. Instead of using an array of type string for the channels setting we should use a comma separated string.

Changed Files

  • package.json Changed the setting from an array to a string and also changed the default value from an empty array [] to an empty string "".
  • extensionts Added a new function updateChannelsSetting which checks to see if the current setting is an array and if it is change it to a comma separated string value.
  • twitchLanguageServer.ts When getting the Twitch Chat Options, we split the comma separated string of channels into an array.

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. Check your settings and note that the current channels setting is an array, for example: ['clarkio'].
  4. Press F5 or click debug button (green triangle/play button) in VSCode.
  5. Check your settings again and it should now be a string, for example: 'clarkio'.
  6. Connect to the chat server.
  7. Use the highlight command !line or !highlight to highlight multiple lines and to add comments.
  8. Use the unhighlight command !line !<number> to unhighlight the lines.
  9. Disconnect from the chat server.

Addresses

#74

@parithon parithon requested a review from clarkio March 1, 2019 03:32
Copy link
Owner

@clarkio clarkio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@clarkio clarkio merged commit b91e419 into clarkio:vnext Mar 1, 2019
clarkio added a commit that referenced this pull request Mar 1, 2019
* 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
@parithon parithon deleted the issue-74 branch March 1, 2019 22:19
clarkio added a commit that referenced this pull request Mar 6, 2019
* 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

* Added a test theory for our bot command

* Solves Issue 78

* prep for 0.2.0

* update the why on connect/disconnect button move
CodemanCodes pushed a commit to CodemanCodes/vscode-twitch-highlighter that referenced this pull request Aug 27, 2019
…-clarkio

docs: add clarkio as a contributor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants