From 0c1846630c1073bef1ce3ac94540a0b06efa3d14 Mon Sep 17 00:00:00 2001 From: Luke Barnard Date: Wed, 9 May 2018 16:41:45 +0100 Subject: [PATCH] Improve appearance of short-lived app loading spinner by hiding it for 500ms - thereby only showing it if the loading is taking a long time. --- res/css/views/rooms/_AppsDrawer.scss | 13 +++++++++++++ src/components/views/elements/AppTile.js | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/res/css/views/rooms/_AppsDrawer.scss b/res/css/views/rooms/_AppsDrawer.scss index 0cf3e7b9cb..28d432686d 100644 --- a/res/css/views/rooms/_AppsDrawer.scss +++ b/res/css/views/rooms/_AppsDrawer.scss @@ -266,6 +266,19 @@ form.mx_Custom_Widget_Form div { right: 0; } +.mx_AppLoading_spinner_fadeIn { + animation-fill-mode: backwards; + animation-duration: 200ms; + animation-delay: 500ms; + animation-name: mx_AppLoading_spinner_fadeIn_animation; +} + +@keyframes mx_AppLoading_spinner_fadeIn_animation { + from { opacity: 0 } + to { opacity: 1 } +} + + .mx_AppLoading iframe { display: none; } diff --git a/src/components/views/elements/AppTile.js b/src/components/views/elements/AppTile.js index 1d04eb5196..63cf459987 100644 --- a/src/components/views/elements/AppTile.js +++ b/src/components/views/elements/AppTile.js @@ -534,7 +534,7 @@ export default class AppTile extends React.Component { if (this.props.show) { const loadingElement = ( -
+
);