Skip to content

Math: implement m:rad radical/sqrt converter#2730

Merged
caio-pizzol merged 8 commits intosuperdoc-dev:mainfrom
baristaGeek:fix/radical-sqrt-converter
Apr 8, 2026
Merged

Math: implement m:rad radical/sqrt converter#2730
caio-pizzol merged 8 commits intosuperdoc-dev:mainfrom
baristaGeek:fix/radical-sqrt-converter

Conversation

@baristaGeek
Copy link
Copy Markdown
Contributor

  • Changes are focused (one fix/feature per PR)
  • Tests added or updated
  • Test suite passes locally (pnpm test)
  • Code is formatted (pnpm run format:check)
  • Commit messages follow conventional commits
  • PR description links to related issue

Implemented this change using existing coding patterns and tested with the doc provided in the issue. Updated tests, added new ones for this converter, committed with the linter's guidelines and made sure the 857 tests passed.

Screenshot 2026-04-07 at 12 20 49 PM

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: d59d1d4272

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

caio-pizzol

This comment was marked as outdated.

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.

@baristaGeek nice work, clean implementation that follows the existing converter patterns. one thing to fix: when m:deg is missing entirely, this should render as a square root. also a stale comment in the behavior tests to update now that radical is implemented. left a few inline comments.

one more thing: tests/behavior/tests/importing/math-equations.spec.ts line 114 still lists radical as "unimplemented" — should be updated now.

Comment thread packages/layout-engine/painters/dom/src/features/math/converters/radical.ts Outdated
Comment thread packages/layout-engine/painters/dom/src/features/math/converters/radical.ts Outdated
@caio-pizzol
Copy link
Copy Markdown
Contributor

caio-pizzol commented Apr 7, 2026

btw — for future OMML work, we have an ECMA-376 spec MCP server you can use from Claude Code to look up sections directly:

claude mcp add --transport http ecma-spec https://api.ooxml.dev/mcp

https://ooxml.dev/mcp

@caio-pizzol caio-pizzol self-assigned this Apr 7, 2026
baristaGeek and others added 3 commits April 8, 2026 00:24
…rs/radical.ts

Co-authored-by: Caio Pizzol <97641911+caio-pizzol@users.noreply.github.com>
…rs/radical.ts

Co-authored-by: Caio Pizzol <97641911+caio-pizzol@users.noreply.github.com>
@baristaGeek
Copy link
Copy Markdown
Contributor Author

@baristaGeek nice work, clean implementation that follows the existing converter patterns. one thing to fix: when m:deg is missing entirely, this should render as a square root. also a stale comment in the behavior tests to update now that radical is implemented. left a few inline comments.

one more thing: tests/behavior/tests/importing/math-equations.spec.ts line 114 still lists radical as "unimplemented" — should be updated now.

Thanks @caio-pizzol your inline comments address all these issues. I removed the radicals from the list of examples in line 114

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.

@baristaGeek all feedback addressed — the !deg fix, spec section number, both new tests, and the behavior test comment update. lgtm, approving.

Adds a Playwright test asserting that <msqrt> elements render in the DOM
when loading a document with radical equations (degHide=true).
@caio-pizzol
Copy link
Copy Markdown
Contributor

@baristaGeek two things we're adding:

  1. behavior test — a test checking that <msqrt> shows up in the rendered page (same style as the fraction and sub-superscript tests). pushing to your branch soon.

  2. test document — uploaded a 17-case Word file to the test corpus covering every m:rad variant from the spec. layout and visual tests will pick it up automatically.

@caio-pizzol caio-pizzol enabled auto-merge April 8, 2026 04:39
@caio-pizzol caio-pizzol added this pull request to the merge queue Apr 8, 2026
Merged via the queue into superdoc-dev:main with commit da444eb Apr 8, 2026
49 of 50 checks passed
@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented Apr 8, 2026

🎉 This PR is included in vscode-ext v1.1.0-next.73

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented Apr 8, 2026

🎉 This PR is included in @superdoc-dev/react v1.0.0-next.27

The release is available on GitHub release

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented Apr 8, 2026

🎉 This PR is included in esign v2.2.0-next.31

The release is available on GitHub release

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented Apr 8, 2026

🎉 This PR is included in template-builder v1.3.0-next.33

The release is available on GitHub release

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented Apr 8, 2026

🎉 This PR is included in superdoc v1.24.0-next.70

The release is available on GitHub release

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented Apr 8, 2026

🎉 This PR is included in superdoc-cli v0.5.0-next.71

The release is available on GitHub release

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented Apr 8, 2026

🎉 This PR is included in superdoc-sdk v1.3.0-next.72

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented Apr 10, 2026

🎉 This PR is included in superdoc-sdk v1.4.0

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented Apr 10, 2026

🎉 This PR is included in superdoc v1.25.0

The release is available on GitHub release

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented Apr 10, 2026

🎉 This PR is included in superdoc-cli v0.6.0

The release is available on GitHub release

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented Apr 10, 2026

🎉 This PR is included in vscode-ext v2.3.0-next.1

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented Apr 10, 2026

🎉 This PR is included in template-builder v1.5.0-next.1

The release is available on GitHub release

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented Apr 10, 2026

🎉 This PR is included in esign v2.3.0-next.1

The release is available on GitHub release

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.

2 participants