Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix placement of Loading… with the spinner on pinned widgets being reloaded #10970

Merged
merged 1 commit into from Jun 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
28 changes: 14 additions & 14 deletions res/css/views/rooms/_AppsDrawer.pcss
Expand Up @@ -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 {
Expand Down Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/views/elements/AppTile.tsx
Expand Up @@ -606,7 +606,7 @@ export default class AppTile extends React.Component<IProps, IState> {
}

const loadingElement = (
<div className="mx_AppTile_loading_fadeInSpinner">
<div className="mx_AppTileBody_fadeInSpinner">
<Spinner message={_t("Loading…")} />
</div>
);
Expand Down
Expand Up @@ -46,7 +46,7 @@ exports[`AppTile destroys non-persisted right panel widget on room change 1`] =
class="mx_AppTileBody mx_AppTile_loading"
>
<div
class="mx_AppTile_loading_fadeInSpinner"
class="mx_AppTileBody_fadeInSpinner"
>
<div
class="mx_Spinner"
Expand Down