Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 43d9e30

Browse files
authored
Fix fadein spinner placement on AppTileBody (#10970)
1 parent 610ee53 commit 43d9e30

File tree

3 files changed

+16
-16
lines changed

3 files changed

+16
-16
lines changed

res/css/views/rooms/_AppsDrawer.pcss

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,19 @@ limitations under the License.
266266
width: 100%;
267267
height: 100%;
268268
}
269+
270+
/* const loadingElement */
271+
.mx_AppTileBody_fadeInSpinner {
272+
/* place spinner and the message at the center of mx_AppTileBody */
273+
height: 100%;
274+
width: 100%;
275+
276+
font-weight: bold; /* message next to the spinner */
277+
animation-fill-mode: backwards;
278+
animation-duration: 200ms;
279+
animation-delay: 500ms;
280+
animation-name: mx_AppTileBody_fadeInSpinnerAnimation;
281+
}
269282
}
270283

271284
.mx_AppTileBody {
@@ -324,22 +337,9 @@ limitations under the License.
324337
iframe {
325338
display: none;
326339
}
327-
328-
/* const loadingElement */
329-
.mx_AppTile_loading_fadeInSpinner {
330-
animation-fill-mode: backwards;
331-
animation-duration: 200ms;
332-
animation-delay: 500ms;
333-
animation-name: mx_AppTile_loading_fadeInSpinnerAnimation;
334-
335-
.mx_Spinner {
336-
position: absolute;
337-
inset: 0;
338-
}
339-
}
340340
}
341341

342-
@keyframes mx_AppTile_loading_fadeInSpinnerAnimation {
342+
@keyframes mx_AppTileBody_fadeInSpinnerAnimation {
343343
from {
344344
opacity: 0;
345345
}

src/components/views/elements/AppTile.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -606,7 +606,7 @@ export default class AppTile extends React.Component<IProps, IState> {
606606
}
607607

608608
const loadingElement = (
609-
<div className="mx_AppTile_loading_fadeInSpinner">
609+
<div className="mx_AppTileBody_fadeInSpinner">
610610
<Spinner message={_t("Loading…")} />
611611
</div>
612612
);

test/components/views/elements/__snapshots__/AppTile-test.tsx.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ exports[`AppTile destroys non-persisted right panel widget on room change 1`] =
4646
class="mx_AppTileBody mx_AppTile_loading"
4747
>
4848
<div
49-
class="mx_AppTile_loading_fadeInSpinner"
49+
class="mx_AppTileBody_fadeInSpinner"
5050
>
5151
<div
5252
class="mx_Spinner"

0 commit comments

Comments
 (0)