Add a config option to control the default widget container height (#12893)

* Add a config option to control the default widget container height

* Oops: need to remember to git checkout
This commit is contained in:
David Baker 2024-08-27 10:59:54 +01:00 committed by GitHub
parent e599428b74
commit f0a75d8ad5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 87 additions and 1 deletions

View file

@ -35,6 +35,7 @@ import { clamp, percentageOf, percentageWithin } from "../../../utils/numbers";
import UIStore from "../../../stores/UIStore";
import { ActionPayload } from "../../../dispatcher/payloads";
import Spinner from "../elements/Spinner";
import SdkConfig from "../../../SdkConfig";
interface IProps {
userId: string;
@ -335,7 +336,7 @@ const PersistentVResizer: React.FC<IPersistentResizerProps> = ({
defaultHeight = clamp(defaultHeight, 0, 100);
defaultHeight = percentageWithin(defaultHeight / 100, minHeight, maxHeight);
} else {
defaultHeight = 280;
defaultHeight = SdkConfig.get().default_widget_container_height ?? 280;
}
return (