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

Composable Extensions #61

Open
clarkio opened this issue Feb 13, 2019 · 6 comments
Open

Composable Extensions #61

clarkio opened this issue Feb 13, 2019 · 6 comments
Labels
research We need to look deeper into this topic

Comments

@clarkio
Copy link
Owner

clarkio commented Feb 13, 2019

It would be nice to break out components within this extension (such as the twitch chat listener component) into their own extension to allow other extensions to depend upon it and interact with it.

This would allow us to do things like letting the Highlighter UI display highlights regardless of which streaming platform chat system is connected.

@clarkio clarkio added the research We need to look deeper into this topic label Feb 13, 2019
@parithon
Copy link
Collaborator

With this in mind, should we rename the repo? I liked your description on stream, vscode-line-highlighter.

@clarkio
Copy link
Owner Author

clarkio commented Feb 17, 2019

Yes we'll need to do some significant refactoring to pull this off I think.

I've been looking into how the Azure suite of VS Code extensions work since there's a main extension "Azure Account" and then other extensions depend upon it (like Azure Functions).

Here's where Azure Functions extension declares its dependency on another extension (Azure Account): https://github.com/Microsoft/vscode-azurefunctions/blob/master/package.json#L864

I've not found how it's being used yet within the Azure Functions extension at this time thought.

@parithon
Copy link
Collaborator

It appears they call commands in Azure Account from Azure Functions.

See https://github.com/Microsoft/vscode-azurefunctions/blob/03274e2bbea279cc7b68663665cfffafb8f2c7dc/src/extension.ts#L91

@clarkio
Copy link
Owner Author

clarkio commented Feb 18, 2019

Oh, nice find! I overlooked that in the code! That's great to know for understanding how to call other extension commands.

Thinking about how we could modularize this extension, it seems like breaking out the language server (Twitch chat listener) from the UI components (commands, tree view, and status bar icon) into separate extensions would be best. What do you think?

With that in mind I suppose the integration point between UI based extensions and the language server extension would be to listen to the IPC messages on the connection, right? I wonder if those .onRequest() "events" (such as 'startchat' would need to be namespaced? Or maybe we need to rethink how that language server extension is implemented.

This was me sharing some thoughts to the discussion. Let me know if you have any as well.

@parithon
Copy link
Collaborator

I was thinking about that as well and I wondered, why do we need the language server? I agree that we need to separate the UI components from the chat service components.

I was thinking we could create an interface that chat extensions (i.e. our twitch client) would implement that includes the startchat and stopchat methods. Then we would have those chat extensions register with our 'core' extension. The 'core' extension would be responsible for starting each chat service that is registered.

@clarkio clarkio added this to the 0.1.6 milestone Feb 27, 2019
@parithon parithon removed this from the 0.2.0 milestone Mar 6, 2019
@parithon
Copy link
Collaborator

parithon commented Mar 6, 2019

Removed milestone 0.2.0 since we already baked that stone...

CodemanCodes pushed a commit to CodemanCodes/vscode-twitch-highlighter that referenced this issue Aug 27, 2019
CodemanCodes pushed a commit to CodemanCodes/vscode-twitch-highlighter that referenced this issue Aug 27, 2019
…-param

lowercase command as well as param. Closes clarkio#61
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
research We need to look deeper into this topic
Projects
None yet
Development

No branches or pull requests

2 participants