feat(aggregations): sticky document header in stage preview COMPASS-10630#8019
Draft
cursor[bot] wants to merge 8 commits into
Draft
feat(aggregations): sticky document header in stage preview COMPASS-10630#8019cursor[bot] wants to merge 8 commits into
cursor[bot] wants to merge 8 commits into
Conversation
Support rendering a subset of root-level visible fields, optional line counter offset, and hiding the root visible-fields toggle for split layouts.
When stickyDocumentHeaderInScrollContainer is set, keep the first root field and action bar in a sticky row with remaining fields in a nested scroll area. Fix document event unsubscribe to use off().
Enable stickyDocumentHeaderInScrollContainer for preview documents and adjust the preview card flex layout so the inner scroll region works.
Use overflow:hidden on the stage preview card wrapper so scrolling happens only in the document body flex region; sticky was ineffective when the parent div was the scrollport.
Preview cards were allowed to grow to full document height, so the inner document scroller never activated and the stage preview column scrolled the entire card. Cap card height, tighten flex min-heights, and clip the card so only the document body scrolls.
… scroll documentStyles used flex-shrink: 0, which preserved the full document height inside the capped KeylineCard so the ReadonlyDocument body never scrolled. Use flex-shrink: 1, min-height: 0, and max-height: 100% so the inner scroller gets a definite height.
…views
DocumentActionsGroup hides action buttons until hover by default; in the
split preview header the caret was effectively invisible. Pass
onlyShowOnHover={false} when stickyDocumentHeaderInScrollContainer is set.
Co-authored-by: misbamongo <misbamongo@users.noreply.github.com>
Replace pinned top header with a fixed left column for expand/actions while the full document scrolls beside it. Add DocumentActionsGroup layout=gutter and StickyPreviewGutter chrome; reduce extraGutterWidth in preview scroll area. Co-authored-by: misbamongo <misbamongo@users.noreply.github.com>
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.
Description
Stage preview document cards now keep the first root field row (typically
_id) and the expand/collapse caret + actions visible while the rest of the document scrolls inside the card.Follow-up fix: The first implementation used
position: stickyon the header row, but the stage preview wrapper usedoverflow: auto, so that wrapper became the scrollport and the entire document (including the "sticky" row) scrolled together—matching the reported screenshot. The preview card wrapper now usesoverflow: hiddenwith a flex column layout so only the document body region scrolls; the header stays pinned without relying on sticky.Also fixed
ReadonlyDocumentevent cleanup:unsubscribeFromDocumentEventsnow callsdoc.offinstead of incorrectly re-registering listeners.Checklist
Motivation and Context
Addresses COMPASS-10630: long aggregation preview documents required scrolling to the top to reach the expand caret and
_idrow.Types of changes