Skip to content

Clear user placeholder content when comments iframe loads#2002

Merged
umputun merged 1 commit intomasterfrom
fix/placeholder-clearing-1990
Feb 11, 2026
Merged

Clear user placeholder content when comments iframe loads#2002
umputun merged 1 commit intomasterfrom
fix/placeholder-clearing-1990

Conversation

@paskal
Copy link
Copy Markdown
Collaborator

@paskal paskal commented Feb 10, 2026

Summary

Allow users to add placeholder content (e.g. a loading spinner or "Loading comments..." text) inside the remark42 root div. When the iframe signals it has initialised, all non-iframe child nodes are removed from the root element.

This lets users show something meaningful while the comment widget loads without any changes to the embed script configuration.

Fixes #1990

Remove non-iframe child nodes from the root element once the
iframe signals it has initialised, allowing users to add
loading placeholders that get cleaned up automatically. Fixes #1990
@codecov
Copy link
Copy Markdown

codecov bot commented Feb 10, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 62.13%. Comparing base (41b75eb) to head (4d0bd29).
⚠️ Report is 35 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2002      +/-   ##
==========================================
- Coverage   64.88%   62.13%   -2.76%     
==========================================
  Files         140      132       -8     
  Lines        3258     3029     -229     
  Branches      815      721      -94     
==========================================
- Hits         2114     1882     -232     
- Misses       1030     1143     +113     
+ Partials      114        4     -110     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions
Copy link
Copy Markdown

size-limit report 📦

Path Size
public/embed.mjs 2.07 KB (+1.64% 🔺)
public/remark.mjs 73.91 KB (0%)
public/remark.css 8.26 KB (0%)
public/last-comments.mjs 36.17 KB (0%)
public/last-comments.css 3.75 KB (-0.03% 🔽)
public/deleteme.mjs 12.45 KB (0%)
public/counter.mjs 751 B (0%)

@paskal paskal marked this pull request as ready for review February 11, 2026 00:16
@paskal paskal requested a review from umputun as a code owner February 11, 2026 00:16
Copy link
Copy Markdown
Owner

@umputun umputun left a comment

Choose a reason for hiding this comment

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

lgtm, thx

@umputun umputun merged commit 195becc into master Feb 11, 2026
8 of 9 checks passed
@umputun umputun deleted the fix/placeholder-clearing-1990 branch February 11, 2026 04:50
@paskal paskal added this to the v1.16.0 milestone Mar 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Render placeholder in remark42 div until comments are loaded?

2 participants