-
Notifications
You must be signed in to change notification settings - Fork 61
SD-1474: add paragraph border size to paragraph size to prevent overlapping #1840
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SD-1474: add paragraph border size to paragraph size to prevent overlapping #1840
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d272ec58bf
ℹ️ 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".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR updates paragraph border rendering so that border spacing is reflected in the DOM layout, preventing borders from overlapping content, and extends tests to cover the new behavior. It also modifies how the @superdoc/superdoc package re-exports types from @superdoc/super-editor.
Changes:
- Adjust paragraph fragment rendering to add padding based on paragraph border
space+width, and update border overlay positioning to account for border spacing. - Enhance
createParagraphDecorationLayersto compute side-specific offsets for borders and apply them to the border overlay element. - Add a DomPainter test that verifies fragment padding and border overlay offsets when paragraph borders include spacing.
- Change the
@superdoc/superdoctypes re-export to target a new path in@superdoc/super-editor.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| packages/superdoc/src/types.ts | Re-exports types from @superdoc/super-editor using a new deep src/types.js path instead of the public ./types subpath. |
| packages/layout-engine/painters/dom/src/renderer.ts | Adds paragraph border-based padding to fragments and updates paragraph decoration layer positioning to honor border spacing on all sides. |
| packages/layout-engine/painters/dom/src/index.test.ts | Introduces a test that verifies padding and vertical border layer offsets when paragraph borders have non-zero space values. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
packages/superdoc/src/types.ts
Outdated
| @@ -1 +1 @@ | |||
| export type * from '@superdoc/super-editor/types'; | |||
| export type * from '@superdoc/super-editor/src/types.js'; | |||
Copilot
AI
Jan 26, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This re-export targets the internal src/types.js path of @superdoc/super-editor instead of the public ./types subpath exposed in that package’s exports map. Because this file is compiled to a .d.ts that will be consumed by external projects (which typically only see the exported ./types entry and don’t use the custom source condition), downstream TypeScript consumers may fail to resolve @superdoc/super-editor/src/types.js even though they can resolve @superdoc/super-editor/types. To keep the @superdoc/superdoc type surface stable and aligned with the public API of @superdoc/super-editor, this should re-export from the @superdoc/super-editor/types entrypoint instead of a deep src path.
| export type * from '@superdoc/super-editor/src/types.js'; | |
| export type * from '@superdoc/super-editor/types'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
No description provided.