fix(ui): add border between live preview window and document fields#16793
Merged
JarrodMFlesch merged 1 commit intoMay 29, 2026
Merged
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
📦 esbuild Bundle Analysis for payloadThis analysis was generated by esbuild-bundle-analyzer. 🤖 |
PatrikKozak
approved these changes
May 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Adds a visual border separating the Live Preview window from the document fields panel, and fixes two edge cases where the border was either missing or doubled.
Why
Case 1: Collections with sidebar fields — border appeared fine (but for the wrong reason)
When a collection has sidebar fields,
document-fields--has-sidebarsets--main-borderondocument-fields__edit, which draws aborder-rightbetween the main fields and the sidebar. This border happened to visually separate the document from the live preview window too — but only because the layout stacked them adjacently. It wasn't an intentional live-preview border.Case 2: Collections without sidebar fields — border was missing
When there are no sidebar fields (or the sidebar fields are empty),
--main-borderresolves tonone, so no divider was drawn at all. When live preview was active, the iframe just appeared flush against the document fields with no visual separation.Case 3: With sidebar fields + live preview active — double border
When live preview is active,
forceSidebarWrapis set onDocumentFields, which applies the.document-fields--force-sidebar-wrapclass. However,--main-borderwas still in effect from--has-sidebar, meaning the sidebar'sborder-rightand any new live-preview border would both render — creating a 2px thick border.Case 4: Expanded (full-width) live preview — border next to nav
When the live preview is expanded to 100% width, its
border-leftsat right next to the nav'sborder-right, producing a doubled border there too.Fix
border-left: var(--stroke-width-small) solid var(--color-border)to.live-preview-window--is-live-previewing— this is the single source of truth for the live-preview divider.--main-border: noneto.document-fields--force-sidebar-wrap(which is only applied when live preview is active) to prevent the sidebar'sborder-rightfrom doubling up.border-left: noneto.live-preview-window--is-expandedso the border disappears when expanded to full width (where it would clash with the nav border).