Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion website/src/components/DiffEditorMonaco.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,10 @@ export default function DiffEditor({ sides, fallback }: DiffMonacoProps) {
onMount={handleDiffMount}
height={height}
theme={MONACO_THEME}
loading={fallback}
// diffLoading lets the loading box take the static diff's height
loading={
<div className={styles.diffLoading}>{fallback}</div>
}
// Prevent "TextModel got disposed before DiffEditorWidget model got reset" error
// by not letting @monaco-editor/react manage model disposal
keepCurrentOriginalModel
Expand Down
5 changes: 5 additions & 0 deletions website/src/components/Playground/styles.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -1457,6 +1457,11 @@ div.fixtureJson + div.fixtureJson {
.playgroundEditor > section {
position: auto !important;
}
/* The section's inline height is Monaco's estimate; the static diff shown
while it loads wraps and has title bars, so let it keep its own height */
.playgroundEditor > section:has(.diffLoading) {
height: auto !important;
}

/* Side by side when the playground itself has enough width (docs sidebar
no longer forces an incorrect stack on homepage/blog): a grid, the file
Expand Down
Loading