From 59243b0cb3779471752b5a3f7fd1161454a88f76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Chris=20Ch=C3=A1vez?= Date: Thu, 13 Feb 2025 11:22:02 -0500 Subject: [PATCH] fix: Height in Advanced Editor [FC-0076] (#1649) Updates the height of the Advanced Editor. --- src/library-authoring/LibraryBlock/LibraryBlock.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/library-authoring/LibraryBlock/LibraryBlock.tsx b/src/library-authoring/LibraryBlock/LibraryBlock.tsx index e635f1f8ba..b23386c4d5 100644 --- a/src/library-authoring/LibraryBlock/LibraryBlock.tsx +++ b/src/library-authoring/LibraryBlock/LibraryBlock.tsx @@ -28,7 +28,10 @@ export const LibraryBlock = ({ view, }: LibraryBlockProps) => { const iframeRef = useRef(null); - const [iFrameHeight, setIFrameHeight] = useState(50); + const xblockView = view ?? 'student_view'; + const defaultiFrameHeight = xblockView === 'studio_view' ? 80 : 50; + + const [iFrameHeight, setIFrameHeight] = useState(defaultiFrameHeight); const studioBaseUrl = getConfig().STUDIO_BASE_URL; const intl = useIntl(); @@ -77,8 +80,6 @@ export const LibraryBlock = ({ const queryStr = version ? `?version=${version}` : ''; - const xblockView = view ?? 'student_view'; - return (