v0.5.0
What's new
Separate CSS bundle
Widget styles now ship as a standalone client.css file. This cuts client.js from 112 KB to 15 KB (4.7 KB gzip). The stylesheet is 91 KB (12.9 KB gzip), so the total for a styled embed is around 17.6 KB gzip — and browsers can cache the two files independently.
Update your embed snippet to include the stylesheet link:
<link rel="stylesheet" href="https://discuss.example.com/client.css">
<div id="discuss-comments"></div>
<script src="https://discuss.example.com/client.js"></script>The snippet in your admin dashboard has already been updated. Leaving out the <link> tag is valid if you're writing your own styles.
Icon slots
Swap out the built-in icons on the comment form with your own SVGs, or pass '' to hide one entirely:
new DiscussWidget({
icons: {
name: '<svg>...</svg>',
email: '<svg>...</svg>',
submit: '', // no icon on the submit button
}
});The input adjusts its padding automatically when an icon is removed.
Title option
Override the "Leave a comment" heading with any text:
new DiscussWidget({ title: 'Join the discussion' });Help menu in the admin sidebar
The version badge is now a proper Help menu with links to documentation, GitHub, changelog, and a bug report form. It also checks GitHub releases once per session and shows a notification if a newer version is available.
Gravatar fix on admin edit
Editing a commenter's email in the admin now updates their avatar immediately without needing a page reload.
Breaking change
The embed snippet must be updated to include the <link rel="stylesheet"> tag. See above.
Full changelog
See CHANGELOG.md for the complete list of changes.