From 562e608538886ef827ee9430bc4a7c215e907cb2 Mon Sep 17 00:00:00 2001 From: Gytis Vinclovas Date: Thu, 22 Jun 2017 14:30:24 +0300 Subject: [PATCH 1/2] websockets (ws) had removed socket.upgradeReq property, so instead we use req now. --- app/react-native/src/server/index.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/app/react-native/src/server/index.js b/app/react-native/src/server/index.js index ed284ab31b4..09e0a34284b 100755 --- a/app/react-native/src/server/index.js +++ b/app/react-native/src/server/index.js @@ -12,14 +12,12 @@ export default class Server { this.expressApp.use(storybook(options)); this.httpServer.on('request', this.expressApp); this.wsServer = new ws.Server({ server: this.httpServer }); - this.wsServer.on('connection', s => this.handleWS(s)); + this.wsServer.on('connection', (s, req) => this.handleWS(s, req)); } - handleWS(socket) { + handleWS(socket, req) { if (this.options.manualId) { - const params = socket.upgradeReq && socket.upgradeReq.url - ? querystring.parse(socket.upgradeReq.url.substr(1)) - : {}; + const params = req.url ? querystring.parse(req.url.substr(1)) : {}; if (params.pairedId) { socket.pairedId = params.pairedId; // eslint-disable-line From 549e55e05b14f2657fa8965fbe519ee37a72ac39 Mon Sep 17 00:00:00 2001 From: Duncan Beevers Date: Sat, 17 Jun 2017 12:48:25 -0700 Subject: [PATCH 2/2] Addon Info: Omit empty inline info header --- addons/info/src/components/Story.js | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/addons/info/src/components/Story.js b/addons/info/src/components/Story.js index 7e412085cc4..618d64d4f31 100644 --- a/addons/info/src/components/Story.js +++ b/addons/info/src/components/Story.js @@ -125,11 +125,7 @@ export default class Story extends React.Component { _renderInline() { return (
-
-
- {this._getInfoHeader()} -
-
+ {this._renderInlineHeader()}
{this._renderStory()}
@@ -145,6 +141,19 @@ export default class Story extends React.Component { ); } + _renderInlineHeader() { + const infoHeader = this._getInfoHeader(); + + return ( + infoHeader && +
+
+ {infoHeader} +
+
+ ); + } + _renderOverlay() { const linkStyle = { ...stylesheet.link.base,