Skip to content

Conversation

@johanneswilm
Copy link
Contributor

No description provided.

Copilot AI review requested due to automatic review settings January 26, 2026 17:11
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a 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".

Copy link
Contributor

Copilot AI left a 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 createParagraphDecorationLayers to 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/superdoc types 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.

@@ -1 +1 @@
export type * from '@superdoc/super-editor/types';
export type * from '@superdoc/super-editor/src/types.js';
Copy link

Copilot AI Jan 26, 2026

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.

Suggested change
export type * from '@superdoc/super-editor/src/types.js';
export type * from '@superdoc/super-editor/types';

Copilot uses AI. Check for mistakes.
Copy link
Contributor

Copilot AI left a 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant