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

[6.0] Support web socket channel #272

Closed
nutstick opened this issue Sep 25, 2021 · 7 comments
Closed

[6.0] Support web socket channel #272

nutstick opened this issue Sep 25, 2021 · 7 comments
Labels

Comments

@nutstick
Copy link
Contributor

Is your feature request related to a problem? Please describe.

Support channel as web socket channel in Preview. We use web socket server to integrate with quite a few tools, it will be helpful if we can continue to support this.

Describe the solution you'd like

Since it's already implemented in v5, we can continue to use the same interface e.g. disableWebsockets, host, port.

Describe alternatives you've considered

No alternatives yet, as far as I know

Are you able to assist bring the feature to reality?

Yes, I'd be happy to. I can follow implementation in v5. But I found some method is not supported in v6 such as this._stories.setChannel, might need you guys advise on this.

Additional context

These are some package/tools I used that rely on websocket

@dannyhw
Copy link
Member

dannyhw commented Sep 25, 2021

@nutstick Hey thanks for offering to help! That would be great actually, coincidentally I was actually trying to figure out how to do this today. The problem like you were getting at here is a lot of the apis have actually changed between 5.3 and 6.0 and it's been a bit difficult to get something working. If you like I could put what I currently have into a branch, maybe it can help. By the way this._stories.setChannel is done via the addons package now addons.setChannel(channel); and is already in 6.0 in Preview.tsx code.

I've said it before but just to be clear I do intend to bring back this feature and the server in some way I just haven't been able to find a good way to do it yet. Also I don't know the server implementation at all really since it was made a long time ago by someone else. Recently I've been trying to figure it out but I'm still at the beginning of that.

@dannyhw dannyhw added the 6.5 label Sep 25, 2021
@dannyhw dannyhw added this to the 6.1 milestone Sep 25, 2021
@dannyhw
Copy link
Member

dannyhw commented Sep 25, 2021

@nutstick I've made a branch with some experiments, not much there but it might be useful:
0316032

@nutstick
Copy link
Contributor Author

Thanks for quick reply! Amazing let me try this out

@nutstick
Copy link
Contributor Author

nutstick commented Oct 7, 2021

Hi @dannyhw sorry for late reply, I have try out your branch. Seems it's not working yet. But from the code look like we didn't call addons.setChannel(channel); when create new channel. After I add this, I can change selected story.

But I notice that the SET_STORIES is not fired if I only run addons.setChannel. Not sure if it's expected?

@dannyhw
Copy link
Member

dannyhw commented Oct 7, 2021

@nutstick yeah the branch wasn't working but it's just part of the changes needed. I just hadn't figured everything out yet. You're right I think I forgot to add the set channel thing. Not sure about the set stories thing I'd have to take another look at it.

@dannyhw
Copy link
Member

dannyhw commented Nov 7, 2022

I was able to get the server working with a bit of help and some hacks #393

Its not ready yet but if you want to follow progress you can check this PR

@dannyhw
Copy link
Member

dannyhw commented Mar 4, 2023

This was done already so im closing this.

@dannyhw dannyhw closed this as completed Mar 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

No branches or pull requests

2 participants