Skip to content

Conversation

@luccas-harbour
Copy link
Contributor

@luccas-harbour luccas-harbour commented Jan 19, 2026

  • Adds v3 translators for all XML elements in numbering.xml and styles.xml
  • Correctly implements style resolution logic in the style-engine
    • Fixes style resolution for paragraphs inside tables
  • Fixes list marker positioning
  • Removes style resolution logic from all places other than the style-engine

Luccas Correa added 30 commits January 19, 2026 13:39
@linear
Copy link

linear bot commented Jan 19, 2026

@luccas-harbour luccas-harbour force-pushed the luccas/sd-1411-reorganize-style-resolution-for-paragraphs-in-the-layout branch from 9ac7d31 to 68820c0 Compare January 19, 2026 20:02
@luccas-harbour luccas-harbour marked this pull request as ready for review January 19, 2026 20:46
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: 1f93d3c2b3

ℹ️ 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 on lines +290 to +294
const markerRunProperties = resolveRunProperties(
converterContext!,
resolvedParagraphProperties.runProperties,
resolvedParagraphProperties,
converterContext!.tableStyleId,

Choose a reason for hiding this comment

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

P1 Badge Guard optional converterContext before list marker resolution

Here converterContext is asserted non-null to resolve list marker run properties, but computeParagraphAttrs accepts an optional converterContext and the adapter entrypoints allow it to be omitted. If a caller runs toFlowBlocks/paragraph conversion without a converterContext (valid per types) on a document that still has numberingProperties + listRendering, this path will dereference converterContext!.tableStyleId and throw instead of falling back to defaults, which is a regression from the previous optional behavior.

Useful? React with 👍 / 👎.

Comment on lines +252 to +256
const normalizedAlignment = normalizeAlignment(resolvedParagraphProperties.justification);
const normalizedBorders = normalizeParagraphBorders(resolvedParagraphProperties.borders);
const normalizedShading = normalizeParagraphShading(resolvedParagraphProperties.shading);
const paragraphDecimalSeparator = DEFAULT_DECIMAL_SEPARATOR;
const tabIntervalTwips = DEFAULT_TAB_INTERVAL_TWIPS;

Choose a reason for hiding this comment

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

P2 Badge Preserve locale decimal separator for decimal tab alignment

Decimal tab alignment depends on the paragraph decimal separator that previously came from styleContext defaults or document locale; this is now hard-coded to '.' for every paragraph. For documents whose default decimal separator is ',' (or any non-dot locale), decimal tab stops will align on the wrong character and produce visibly incorrect tabbed number layouts. The previous logic pulled the locale-specific separator, so this change drops that configuration path.

Useful? React with 👍 / 👎.

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.

2 participants