Skip to content

fix: remove DOM dependency from ArticleCard - #684

Open
vaishnavi192 wants to merge 1 commit into
containers:mainfrom
vaishnavi192:repro
Open

fix: remove DOM dependency from ArticleCard#684
vaishnavi192 wants to merge 1 commit into
containers:mainfrom
vaishnavi192:repro

Conversation

@vaishnavi192

Copy link
Copy Markdown

Fixes: #683

Removed the browser-dependent document.createElement() usage from ArticleCard and replaced the HTML-to-text conversion with an SSR-safe utility using the existing html-react-parser dependency. This allows ArticleCard to render during Docusaurus server-side/static rendering without requiring browser APIs.

####Before Screenshot
Terminal output showing the Docusaurus build failing while rendering /ssrissue because document is unavailable.
Screenshot 2026-08-13 193752

Test File
Screenshot 2026-08-13 194040

After Screenshot

Terminal output showing the Docusaurus build completing successfully after removing the browser DOM dependency from ArticleCard.
Screenshot 2026-08-14 161432

Checklist

Ensure you have completed the following checklist for your pull request to be reviewed:

  • Certify you wrote the patch or otherwise have the right to pass it on as an open-source patch by signing all
    commits. (git commit -s). (If needed, use git commit -s --amend). The author email must match
    the sign-off email address. See CONTRIBUTING.md
    for more information.
  • Referenced issues using Fixes: #00000 in commit message (if applicable)
  • PR description, commit message, and GitHub comments are human-written, per LLM Policy

Fixes: containers#683

Signed-off-by: vaishnavi192 <vaishnavi.m1084@gmail.com>
Copilot AI lite review requested due to automatic review settings August 14, 2026 11:55

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

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.

[Bug]: ArticleCard uses browser-only DOM API during server-side rendering

2 participants