-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Core: Integrate serverChannel into channel #22940
Conversation
Add listening capability to serverChannel on node's side Fix data/args handling from serverChannel
# Conflicts: # code/lib/core-server/package.json # code/yarn.lock
…cts to both. leave serverChannel to point to main channel for backwards compatibility
…channels experiment with universal channel
@ndelangen I made some comments on #22939 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would like to consider creating a new kind of channel too, so postmessage channel doesn't implicitly contain a websocket channel (or just renaming postmessage channel). But how will this multiplexing work in RN where both channels are WS?
I should probably make the same multiplex change to the websocket channel package? |
…eact-native (websocket, without duplicating the storybook-server-channel transport
@ndelangen Will this PR get patched back to 7.0.x? |
@valentinpalkovic I wasn't planning to. |
This looks amazing! I wonder if there's some documentation we can add to this? |
@yannbf the idea is that it's experimental. We'll try to do a few things internally, test if we like it and maybe iterate on it before announcing it to the public for general use. Documenting it would certainly be welcome. How would you recommend we describe this change, in what document? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! It's working great and fulfills the needs of the onboarding 👯
Maybe we should wait until we actually implement it in RN but I'm wondering if instead of the current implementation where // in manager / preview code
import { websocketTransport } from '@storybook/channel-websocket';
import { postmessageTransport } from '@storybook/channel-postmessage';
this.channel = new Channel({ transports: [websocketTransport, postmessageTransport] }); |
I really don't like the idea of creating yet-another package, that is counter to what I'm actually trying to achieve long term. I don't agree that moving the code into each builder (twice because of SSv6 support) is the right move, but I'll do it. I've also deprecated the |
@tmeasday discussed with @ndelangen and he's going to revert the last set of changes and merge to unblock @yannbf . Let's spend a few minutes together tomorrow to discuss the ideal API here since the changes you suggested above result in a bunch of code duplication in the builders & @ndelangen doesn't want to introduce a new package. He has a better idea -- we think -- but would be good to hammer it out together synchronously. |
6bdec4c
to
fd08096
Compare
Closes #
Add listening capability to serverChannel on node's side
Fix data/args handling from serverChannel
What I did
preset.ts
How to test
add this to a
manager.ts
:add this to
preset.ts
:pre
-tag gets filled with data.The channel should work correctly as well in build-mode
Checklist
MIGRATION.MD
Maintainers
make sure to add the
ci:merged
orci:daily
GH label to it.["cleanup", "BREAKING CHANGE", "feature request", "bug", "documentation", "maintenance", "dependencies", "other"]