Skip to content
Closed
Changes from 1 commit
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
Prev Previous commit
!fixup Prevent cumulative layout shift when richworkspace is loading
Instead of only increasing editor height with growing document length,
let's stick to a fixed height (150px) and use that one already while
loading the document.

The editor still increases when it gets focused.

Fixes: #2834
Fixes: #2803

Signed-off-by: Jonas <[email protected]>
  • Loading branch information
mejo- committed Jun 14, 2023
commit 748d58af5711b004a9e0970af4fe17a7c209c459
18 changes: 8 additions & 10 deletions src/views/RichWorkspace.vue
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ export default {
z-index: 61;
position: relative;
&.creatable {
min-height: 100px;
min-height: 150px;
}
}

Expand Down Expand Up @@ -259,15 +259,19 @@ export default {
}

#rich-workspace.focus {
min-height: 25vh;
min-height: 150px;
max-height: 50vh;
}

#rich-workspace:not(.focus), #rich-workspace.icon-loading {
min-height: 25vh;
max-height: 25vh;
min-height: 150px;
max-height: 150px;
position: relative;
overflow: hidden;

:deep([data-text-el="menubar"]) {
display: none;
}
}

#rich-workspace:not(.focus):not(.icon-loading):not(.empty):after {
Expand All @@ -285,10 +289,4 @@ export default {
#rich-workspace.dark:not(.focus):not(.icon-loading):after {
background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0), var(--color-main-background));
}

@media only screen and (max-width: 1024px) {
#rich-workspace:not(.focus) {
max-height: 30vh;
}
}
</style>