feat(superdoc): support fixed-height container embedding with contained mode (SD-2242)#2423
Open
caio-pizzol wants to merge 6 commits intomainfrom
Open
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3e2b4498c7
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
…ed mode SD-2242: Add `contained` option that enables SuperDoc to scroll within a fixed-height parent container. When `contained: true`, height propagates through the DOM chain and `.super-editor-container` becomes the scroll container with `overflow: auto`. Key changes: - New `contained` boolean in Config type and React props - CSS height chain: .superdoc--contained → layers → document → sub-document - .super-editor-container.contained becomes scroll container (overflow: auto) - .super-editor overflow changed from hidden to visible in contained mode - CommentsLayer switched to position: absolute with pointer-events: none in contained mode to avoid blocking scroll and taking flow space - React wrapper conditionally sets height: 100% on editor container
Document the new `contained` option in both the vanilla SuperDoc configuration page and the React component configuration page, with usage examples showing fixed-height container embedding.
When contained mode is active with a visible toolbar, height: 100% on the editor container would overflow. Switch to flex layout so toolbar and editor share the fixed-height wrapper properly.
…ewers The sub-document container gets overflow: auto in contained mode so PDF and HTML documents scroll within fixed-height containers, not just DOCX. SuperEditor already manages its own scroll container.
The contained property is defined via JSDoc in superdoc's types and may not appear in generated .d.ts files. Use a type assertion instead of accessing restProps.contained directly.
a1ced4d to
811b739
Compare
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.
Add
containedoption that enables SuperDoc to scroll within a fixed-height parent container. Whencontained: true, height propagates through the DOM chain and.super-editor-containerbecomes the scroll container withoverflow: auto.Key changes:
containedboolean in Config type and React props