Skip to content

SD-1474: bug - some horizontal lines slightly overlap text#1841

Closed
johanneswilm wants to merge 7 commits intosuperdoc-dev:mainfrom
johanneswilm:sd-1474-bug-some-horizontal-lines-slightly-overlap-text
Closed

SD-1474: bug - some horizontal lines slightly overlap text#1841
johanneswilm wants to merge 7 commits intosuperdoc-dev:mainfrom
johanneswilm:sd-1474-bug-some-horizontal-lines-slightly-overlap-text

Conversation

@johanneswilm
Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings January 26, 2026 18:09
Copy link
Copy Markdown

@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: 1061dc4c63

ℹ️ 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".

Comment thread packages/layout-engine/painters/dom/src/renderer.ts Outdated
Copy link
Copy Markdown
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.

Copy link
Copy Markdown
Contributor

@caio-pizzol caio-pizzol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@johanneswilm nice fix — using negative offsets to push borders into margins makes sense.

one thing to watch: paragraphs with both shading and space > 0 will show a gap between the fill and the border. fine as a follow-up.

small DX suggestion on the repeated offset math. test coverage is good — consider adding a visual regression .docx too.

left inline comments.

Comment thread packages/layout-engine/painters/dom/src/renderer.ts
Comment thread packages/layout-engine/painters/dom/src/renderer.ts
…bug-some-horizontal-lines-slightly-overlap-text
Copy link
Copy Markdown
Contributor

@caio-pizzol caio-pizzol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@johanneswilm shading follow-up is split off to SD-2106, border loop discussion is settled — all good.

code is correct, approving. feel free to merge after the inline comments are addressed, if relevant.

Comment thread packages/layout-engine/painters/dom/src/renderer.ts Outdated
Comment thread packages/layout-engine/painters/dom/src/renderer.ts
@johanneswilm
Copy link
Copy Markdown
Contributor Author

Hey @caio-pizzol I've made the changes you requested. Unfortunately I don't have any access rights in relation to merging. That's fine with me, but it means someone else has to merge.

What would be more important to me would be to get the access rights needed so that I can add tags to PRs. Otherwise it's a bit difficult to communicate that a specific branch should not be merged, etc. . I'm doing that by putting it in the PR description, but it's easily overlooked.

Copy link
Copy Markdown
Contributor

@caio-pizzol caio-pizzol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hey @johanneswilm, thanks for the updates — the tests and comment cleanup look good.

before merging, I spotted one more thing: space is in points but width is in pixels, so adding them together in the offset calc is slightly off. left an inline comment with the fix.

re: access — I'll get you tag permissions on the repo so you can label PRs. makes sense.

if (!attrs?.borders && !attrs?.shading) return {};
const borderBox = getParagraphBorderBox(fragmentWidth, attrs.indent);

// Calculate border positioning to extend into margins
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

space is in points but width is in pixels — need to multiply space by PX_PER_PT before adding. same fix on the other three sides, and test expected values will need updating.

@caio-pizzol
Copy link
Copy Markdown
Contributor

closing in favor of #2324. thanks for the work on this.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants