Skip to content

improvement(api-markdown-documenter): Don't support LineBreakNodes as BlockContent #24767

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

Conversation

Josmithr
Copy link
Contributor

@Josmithr Josmithr commented Jun 4, 2025

Block Content items are implicitly separated by a line break, so allowing LineBreakNodes in that context is redundant and was not needed.
Support for LineBreakNodes in BlockContent contexts has been removed.

@Josmithr Josmithr requested review from alexvy86, jumyhre, a team and Copilot June 4, 2025 23:03
@github-actions github-actions bot added public api change Changes to a public API base: main PRs targeted against main branch labels Jun 4, 2025
Copy link
Contributor

@Copilot 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 removes support for the redundant LineBreakNode in BlockContent contexts. The changes include eliminating the LineBreakNode import and its mapping in BlockContent, removing filtering logic for adjacent line breaks in TsdocNodeTransforms, and updating the API reports, package version, and changelog.

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tools/api-markdown-documenter/src/documentation-domain/BlockContent.ts Removed LineBreakNode import and mapping from the BlockContentMap.
tools/api-markdown-documenter/src/api-item-transforms/TsdocNodeTransforms.ts Replaced mutation with a const declaration and removed redundant filtering logic and the now-unused helper function.
tools/api-markdown-documenter/api-report/api-markdown-documenter.public.api.md Removed the LineBreakNode entry from the public API report.
tools/api-markdown-documenter/api-report/api-markdown-documenter.beta.api.md Removed the LineBreakNode entry from the beta API report.
tools/api-markdown-documenter/api-report/api-markdown-documenter.alpha.api.md Removed the LineBreakNode entry from the alpha API report.
tools/api-markdown-documenter/package.json Updated the package version to reflect the changes.
tools/api-markdown-documenter/CHANGELOG.md Added a changelog entry documenting the removal of LineBreakNode from BlockContent.
Comments suppressed due to low confidence (8)

tools/api-markdown-documenter/src/documentation-domain/BlockContent.ts:8

  • Removal of the LineBreakNode import from BlockContent.ts is consistent with the design change; please confirm that no other dependent logic requires this type.
import type { LineBreakNode } from "./LineBreakNode.js";

tools/api-markdown-documenter/src/api-item-transforms/TsdocNodeTransforms.ts:108

  • The shift from a mutable to an immutable declaration and the removal of redundant new line filtering improves code clarity.
let transformedChildren: BlockContent[] = [];

tools/api-markdown-documenter/src/api-item-transforms/TsdocNodeTransforms.ts:472

  • Removal of the filterNewlinesAdjacentToParagraphs function is appropriate given that LineBreakNodes are no longer supported; ensure tests cover this change.
function filterNewlinesAdjacentToParagraphs(nodes: readonly BlockContent[]): BlockContent[] { ... }

tools/api-markdown-documenter/api-report/api-markdown-documenter.public.api.md:168

  • Removal of the LineBreakNode mapping in the public API report aligns with the updated design.
lineBreak: LineBreakNode;

tools/api-markdown-documenter/api-report/api-markdown-documenter.beta.api.md:168

  • Removing the LineBreakNode mapping from the beta API report is consistent with the overall removal of support.
lineBreak: LineBreakNode;

tools/api-markdown-documenter/api-report/api-markdown-documenter.alpha.api.md:168

  • Removal of the LineBreakNode mapping in the alpha API report is consistent with the updated design.
lineBreak: LineBreakNode;

tools/api-markdown-documenter/package.json:3

  • The version bump to 0.21.0 is appropriate and reflects the changes made; ensure that related documentation and tests are updated accordingly.
"version": "0.21.0",

tools/api-markdown-documenter/CHANGELOG.md:3

  • The changelog entry clearly documents the removal of LineBreakNode from BlockContent; ensure consistency in all release notes.
## 0.21.0

Copy link
Contributor

github-actions bot commented Jun 4, 2025

🔗 No broken links found! ✅

Your attention to detail is admirable.

linkcheck output


> fluid-framework-docs-site@0.0.0 ci:check-links /home/runner/work/FluidFramework/FluidFramework/docs
> start-server-and-test "npm run serve -- --no-open" 3000 check-links

1: starting server using command "npm run serve -- --no-open"
and when url "[ 'http://127.0.0.1:3000' ]" is responding with HTTP status code 200
running tests using command "npm run check-links"


> fluid-framework-docs-site@0.0.0 serve
> docusaurus serve --no-open

[SUCCESS] Serving "build" directory at: http://localhost:3000/

> fluid-framework-docs-site@0.0.0 check-links
> linkcheck http://localhost:3000 --skip-file skipped-urls.txt

Crawling...

Stats:
  222981 links
    1707 destination URLs
    1939 URLs ignored
       0 warnings
       0 errors


@Josmithr Josmithr merged commit bb49437 into microsoft:main Jun 6, 2025
33 checks passed
@Josmithr Josmithr deleted the api-markdown-documenter/line-breaks-block-content branch June 6, 2025 18:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
base: main PRs targeted against main branch public api change Changes to a public API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants