UI: Initial render whitespace bug (#11159)
## Addresses #11088 Updated solution: https://www.loom.com/share/e3ca30bebde54df5b8cbd8cac6d26780 - First refresh displays the bug: a white bar at the top of the page as the login page loads. - Second refresh displays the login page with the bug gone - Navigate at the end to an error page to confirm it is unaffected, since the initial solution affected the background color of those pages ## Checklist for submitter - [x] Changes file added for user-visible changes in `changes/` - [x] Manual QA for all new/changed functionality --------- Co-authored-by: Jacob Shandling <jacob@fleetdm.com>
This commit is contained in:
co-authored by
Jacob Shandling
parent
672c0d9239
commit
d5c9ae2baf
@@ -0,0 +1 @@
|
||||
- Fix a bug where a white bar appears at the top of the login page before the app renders.
|
||||
@@ -49,6 +49,8 @@ const statusMessages: IStatusMessages = {
|
||||
"There was an error with single sign-on. Please contact your Fleet administrator.",
|
||||
};
|
||||
|
||||
const baseClass = "login-page";
|
||||
|
||||
const LoginPage = ({ router, location }: ILoginPageProps) => {
|
||||
const {
|
||||
availableTeams,
|
||||
@@ -193,7 +195,7 @@ const LoginPage = ({ router, location }: ILoginPageProps) => {
|
||||
}, [redirectLocation]);
|
||||
|
||||
if (isLoadingSSOSettings) {
|
||||
return <Spinner />;
|
||||
return <Spinner className={`${baseClass}__loading-spinner`} />;
|
||||
}
|
||||
|
||||
return (
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
.login-page {
|
||||
&__loading-spinner.centered {
|
||||
margin: 0;
|
||||
position: absolute;
|
||||
left: 50vw;
|
||||
top: 40vh;
|
||||
}
|
||||
}
|
||||
.login-form-animation-leave {
|
||||
transform: scale(1);
|
||||
opacity: 1;
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
export interface IRequestCSRData {
|
||||
email: string;
|
||||
org_name: string;
|
||||
}
|
||||
Reference in New Issue
Block a user