From 7ef08314b8d329dda6abac2e56749b233fd2860a Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Fri, 19 Oct 2018 16:22:20 -0600 Subject: [PATCH 1/4] Redirect widgets to another location before deleting them This is so that shutdown hooks in the widget can correctly fire, such as Jitsi's hook to abandon its hold on the webcam. Fixes https://github.com/vector-im/riot-web/issues/7351 --- src/components/views/elements/AppTile.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/components/views/elements/AppTile.js b/src/components/views/elements/AppTile.js index 7be0bab33c..71cd65c89f 100644 --- a/src/components/views/elements/AppTile.js +++ b/src/components/views/elements/AppTile.js @@ -318,6 +318,19 @@ export default class AppTile extends React.Component { } this.setState({deleting: true}); + // HACK: This is a really dirty way to ensure that Jitsi cleans up + // its hold on the webcam. Without this, the widget holds a media + // stream open, even after death. See https://github.com/vector-im/riot-web/issues/7351 + if (this.refs.appFrame) { + // In practice we could just do `+= ''` to trick the browser + // into thinking the URL changed, however I can foresee this + // being optimized out by a browser. Instead, we'll just point + // the iframe at a page that is reasonably safe to use in the + // event the iframe doesn't wink away. + // This is relative to where the Riot instance is located. + this.refs.appFrame.src = '/config.json'; + } + WidgetUtils.setRoomWidget( this.props.room.roomId, this.props.id, From 206ad3159c6f1b41ebf1770dcb394d7cea77da30 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Thu, 25 Oct 2018 17:47:38 +0200 Subject: [PATCH 2/4] disable e2e tests for PRs targeted at experimental (redesign) --- .travis-test-riot.sh | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/.travis-test-riot.sh b/.travis-test-riot.sh index 7f2660a906..6cd073a1f8 100755 --- a/.travis-test-riot.sh +++ b/.travis-test-riot.sh @@ -27,12 +27,15 @@ npm run build npm run test popd -# run end to end tests -git clone https://github.com/matrix-org/matrix-react-end-to-end-tests.git --branch master -pushd matrix-react-end-to-end-tests -ln -s $REACT_SDK_DIR/$RIOT_WEB_DIR riot/riot-web -# PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true ./install.sh -# CHROME_PATH=$(which google-chrome-stable) ./run.sh -./install.sh -./run.sh --travis -popd +if [ "$TRAVIS_BRANCH" != "experimental" ] +then + # run end to end tests + git clone https://github.com/matrix-org/matrix-react-end-to-end-tests.git --branch master + pushd matrix-react-end-to-end-tests + ln -s $REACT_SDK_DIR/$RIOT_WEB_DIR riot/riot-web + # PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true ./install.sh + # CHROME_PATH=$(which google-chrome-stable) ./run.sh + ./install.sh + ./run.sh --travis + popd +fi From aaeb6e49785fdbf5b2e823ddb7e319d9052f2c0e Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Thu, 25 Oct 2018 15:59:42 -0600 Subject: [PATCH 3/4] Use about:blank instead --- src/components/views/elements/AppTile.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/views/elements/AppTile.js b/src/components/views/elements/AppTile.js index 71cd65c89f..23b24adbb4 100644 --- a/src/components/views/elements/AppTile.js +++ b/src/components/views/elements/AppTile.js @@ -328,7 +328,7 @@ export default class AppTile extends React.Component { // the iframe at a page that is reasonably safe to use in the // event the iframe doesn't wink away. // This is relative to where the Riot instance is located. - this.refs.appFrame.src = '/config.json'; + this.refs.appFrame.src = 'about:blank'; } WidgetUtils.setRoomWidget( From 2dc335798d0fcfb0212a24e46ed40aa16ad2b3c9 Mon Sep 17 00:00:00 2001 From: "J. Ryan Stinnett" Date: Fri, 26 Oct 2018 14:15:16 +0200 Subject: [PATCH 4/4] Repair DevTools button padding by centralizing styles This moves the padding styles for dialog content to the .mx_Dialog rule. In addition, it fixes vector-im/riot-web#7548 where the DevTools buttons had double padding. Signed-off-by: J. Ryan Stinnett --- res/css/_common.scss | 6 ++---- res/css/views/dialogs/_DevtoolsDialog.scss | 4 ---- res/css/views/dialogs/_ShareDialog.scss | 5 ----- res/css/views/dialogs/_UnknownDeviceDialog.scss | 5 +---- src/components/views/dialogs/DevtoolsDialog.js | 4 ++-- 5 files changed, 5 insertions(+), 19 deletions(-) diff --git a/res/css/_common.scss b/res/css/_common.scss index bf67edc1c3..9123e5ba8d 100644 --- a/res/css/_common.scss +++ b/res/css/_common.scss @@ -170,8 +170,7 @@ textarea { font-weight: 300; font-size: 15px; position: relative; - padding-left: 58px; - padding-bottom: 36px; + padding: 0 58px 36px; width: 60%; max-width: 704px; box-shadow: 0 1px 0 0 rgba(0, 0, 0, 0.2); @@ -216,14 +215,13 @@ textarea { } .mx_Dialog_content { - margin: 24px 58px 68px 0; + margin: 24px 0 68px; font-size: 14px; color: $primary-fg-color; word-wrap: break-word; } .mx_Dialog_buttons { - padding-right: 58px; text-align: right; } diff --git a/res/css/views/dialogs/_DevtoolsDialog.scss b/res/css/views/dialogs/_DevtoolsDialog.scss index 3764bb13b3..a4a868bd11 100644 --- a/res/css/views/dialogs/_DevtoolsDialog.scss +++ b/res/css/views/dialogs/_DevtoolsDialog.scss @@ -14,10 +14,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -.mx_DevTools_dialog { - padding-right: 58px; -} - .mx_DevTools_content { margin: 10px 0; } diff --git a/res/css/views/dialogs/_ShareDialog.scss b/res/css/views/dialogs/_ShareDialog.scss index 116bef8dfd..9a2f67dea3 100644 --- a/res/css/views/dialogs/_ShareDialog.scss +++ b/res/css/views/dialogs/_ShareDialog.scss @@ -14,11 +14,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -.mx_ShareDialog { - // this is to center the content - padding-right: 58px; -} - .mx_ShareDialog hr { margin-top: 25px; margin-bottom: 25px; diff --git a/res/css/views/dialogs/_UnknownDeviceDialog.scss b/res/css/views/dialogs/_UnknownDeviceDialog.scss index 3457e50b92..e3801e3550 100644 --- a/res/css/views/dialogs/_UnknownDeviceDialog.scss +++ b/res/css/views/dialogs/_UnknownDeviceDialog.scss @@ -20,9 +20,6 @@ limitations under the License. // is a pain in the ass. plus might as well make the dialog big given how // important it is. height: 100%; - - // position the gemini scrollbar nicely - padding-right: 58px; } .mx_UnknownDeviceDialog { @@ -51,4 +48,4 @@ limitations under the License. .mx_UnknownDeviceDialog .mx_UnknownDeviceDialog_deviceList li { height: 40px; border-bottom: 1px solid $primary-hairline-color; -} \ No newline at end of file +} diff --git a/src/components/views/dialogs/DevtoolsDialog.js b/src/components/views/dialogs/DevtoolsDialog.js index 22ee44f81a..ea198461c5 100644 --- a/src/components/views/dialogs/DevtoolsDialog.js +++ b/src/components/views/dialogs/DevtoolsDialog.js @@ -625,7 +625,7 @@ export default class DevtoolsDialog extends React.Component { let body; if (this.state.mode) { - body =
+ body =
{ this.state.mode.getLabel() }
Room ID: { this.props.roomId }
@@ -634,7 +634,7 @@ export default class DevtoolsDialog extends React.Component { } else { const classes = "mx_DevTools_RoomStateExplorer_button"; body =
-
+
{ _t('Toolbox') }
Room ID: { this.props.roomId }