Don't unnecessarily persist the host signup dialog (#9043)
https://github.com/matrix-org/matrix-react-sdk/pull/8747 made it more evident that the host signup dialog was relying on some quirks in how PersistedElement sizes and positions things that it probably shouldn't have been relying on. As far as I can tell, this dialog doesn't *need* to be a PersistedElement at all since it's mounted manually as part of LoggedInView, and so it doesn't look like there's any way for it to unexpectedly disappear on the user. According to Travis this is supposed to be a bespoke widget in a proper dialog, but this is intended as a more short-term fix.
This commit is contained in:
parent
b6a50ee5a5
commit
17699dfcd0
2 changed files with 56 additions and 76 deletions
|
@ -105,17 +105,6 @@ limitations under the License.
|
|||
right: 25px;
|
||||
}
|
||||
|
||||
.mx_HostSignup_persisted {
|
||||
width: 90vw;
|
||||
max-width: 580px;
|
||||
height: 80vh;
|
||||
max-height: 600px;
|
||||
top: 0;
|
||||
left: 0;
|
||||
position: fixed;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.mx_HostSignupDialog_minimized {
|
||||
position: fixed;
|
||||
bottom: 80px;
|
||||
|
|
|
@ -20,7 +20,6 @@ import { logger } from "matrix-js-sdk/src/logger";
|
|||
|
||||
import AccessibleButton from "../elements/AccessibleButton";
|
||||
import Modal from "../../../Modal";
|
||||
import PersistedElement from "../elements/PersistedElement";
|
||||
import QuestionDialog from './QuestionDialog';
|
||||
import SdkConfig from "../../../SdkConfig";
|
||||
import { _t } from "../../../languageHandler";
|
||||
|
@ -35,8 +34,6 @@ import {
|
|||
import { IConfigOptions } from "../../../IConfigOptions";
|
||||
import { SnakedObject } from "../../../utils/SnakedObject";
|
||||
|
||||
const HOST_SIGNUP_KEY = "host_signup";
|
||||
|
||||
interface IProps {}
|
||||
|
||||
interface IState {
|
||||
|
@ -111,8 +108,6 @@ export default class HostSignupDialog extends React.PureComponent<IProps, IState
|
|||
|
||||
private closeDialog = async () => {
|
||||
window.removeEventListener("message", this.messageHandler);
|
||||
// Ensure we destroy the host signup persisted element
|
||||
PersistedElement.destroyElement("host_signup");
|
||||
// Finally clear the flag in
|
||||
return HostSignupStore.instance.setHostSignupActive(false);
|
||||
};
|
||||
|
@ -235,8 +230,6 @@ export default class HostSignupDialog extends React.PureComponent<IProps, IState
|
|||
|
||||
public render(): React.ReactNode {
|
||||
return (
|
||||
<div className="mx_HostSignup_persisted">
|
||||
<PersistedElement key={HOST_SIGNUP_KEY} persistKey={HOST_SIGNUP_KEY}>
|
||||
<div className={classNames({ "mx_Dialog_wrapper": !this.state.minimized })}>
|
||||
<div
|
||||
className={classNames("mx_Dialog",
|
||||
|
@ -297,8 +290,6 @@ export default class HostSignupDialog extends React.PureComponent<IProps, IState
|
|||
}
|
||||
</div>
|
||||
</div>
|
||||
</PersistedElement>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue