diff --git a/res/css/views/rooms/_AppsDrawer.pcss b/res/css/views/rooms/_AppsDrawer.pcss index 5ec32423f9e..1913ab799ca 100644 --- a/res/css/views/rooms/_AppsDrawer.pcss +++ b/res/css/views/rooms/_AppsDrawer.pcss @@ -266,6 +266,19 @@ limitations under the License. width: 100%; height: 100%; } + + /* const loadingElement */ + .mx_AppTileBody_fadeInSpinner { + /* place spinner and the message at the center of mx_AppTileBody */ + height: 100%; + width: 100%; + + font-weight: bold; /* message next to the spinner */ + animation-fill-mode: backwards; + animation-duration: 200ms; + animation-delay: 500ms; + animation-name: mx_AppTileBody_fadeInSpinnerAnimation; + } } .mx_AppTileBody { @@ -324,22 +337,9 @@ limitations under the License. iframe { display: none; } - - /* const loadingElement */ - .mx_AppTile_loading_fadeInSpinner { - animation-fill-mode: backwards; - animation-duration: 200ms; - animation-delay: 500ms; - animation-name: mx_AppTile_loading_fadeInSpinnerAnimation; - - .mx_Spinner { - position: absolute; - inset: 0; - } - } } -@keyframes mx_AppTile_loading_fadeInSpinnerAnimation { +@keyframes mx_AppTileBody_fadeInSpinnerAnimation { from { opacity: 0; } diff --git a/src/components/views/elements/AppTile.tsx b/src/components/views/elements/AppTile.tsx index 6f153a2b755..10cd8c40aa2 100644 --- a/src/components/views/elements/AppTile.tsx +++ b/src/components/views/elements/AppTile.tsx @@ -606,7 +606,7 @@ export default class AppTile extends React.Component { } const loadingElement = ( -
+
); diff --git a/test/components/views/elements/__snapshots__/AppTile-test.tsx.snap b/test/components/views/elements/__snapshots__/AppTile-test.tsx.snap index 4d8264b2275..95e1ce929aa 100644 --- a/test/components/views/elements/__snapshots__/AppTile-test.tsx.snap +++ b/test/components/views/elements/__snapshots__/AppTile-test.tsx.snap @@ -46,7 +46,7 @@ exports[`AppTile destroys non-persisted right panel widget on room change 1`] = class="mx_AppTileBody mx_AppTile_loading" >