Skip to content

Changelog widget

Show published releases in a floating card or a panel opened from your own button. Unread state belongs to this browser, not a signed-in user.

Embed published updates

Publish a release in a public organization and create an organization API key. Replace fb_pub_xxx below. Put the config before the loader and render trigger buttons before initialization.

<button type="button" data-reflet-changelog>
  What's new <span data-reflet-changelog-badge></span>
</button>
<script>
  window.RefletChangelog = {
    publicKey: "fb_pub_xxx",
    mode: "trigger",
    theme: "auto"
  };
</script>
<script src="https://www.reflet.app/widget/reflet-changelog.v1.js" async></script>

Use a real button for keyboard access. The badge is optional. If feedback is also embedded, initialize it before loading changelog; this loader replaces window.Reflet with its command function.

React

npm install reflet-sdk
"use client";

import { ChangelogWidget } from "reflet-sdk/react";

export function Updates() {
  return (
    <>
      <button type="button" data-reflet-changelog>
        What's new <span data-reflet-changelog-badge />
      </button>
      <ChangelogWidget publicKey="fb_pub_xxx" mode="trigger" />
    </>
  );
}

ChangelogWidget requires its own publicKey, even inside RefletProvider. It loads the changelog script and creates an instance; do not also add a configured script embed. Keep one mounted instance and stable callback props. Its instance is not exposed through a React ref or the script loader's global instance.

Configuration

Global config takes precedence over script attributes. Use it for predictable initialization when the document is still loading. The React wrapper accepts the config names as props. locale exists in the type but does not translate the widget's current labels.

Methods and callbacks

// Script loader API, after initialization:
window.Reflet("open_changelog");
window.Reflet("close_changelog");
const unread = window.Reflet("get_unread_changelog_count");
window.Reflet("mark_changelog_read");

// The script-created instance also exposes:
const widget = window.__refletChangelogWidgetInstance;
widget.toggle();
widget.getUnreadCount();
widget.markAsRead();
widget.destroy();

Global config and React props accept onOpen(), onClose() and onEntryClick(entry). An entry contains id, title, optional description/version/publishedAt, and items (linked feedback id/title pairs). Entry callbacks do not navigate automatically and are currently attached to click events, not keyboard actions. Do not use them as the only route to essential content.

Read state and limits

  • Explicitly opening the panel or dismissing the card marks fetched entries as read. markAsRead does the same; auto-open does not.
  • localStorage stores the latest seen publication timestamp under reflet_changelog_seen_ plus the public key. Counts include only fetched entries newer than that timestamp, not your entire release history.
  • No user token is sent. Read state is shared by visitors using the same browser origin/key and does not sync between devices. When storage is blocked, read state lasts only in memory for this instance.
  • Render triggers before initialization; later elements are not bound. The trigger panel uses a fixed position, not the clicked button's position.
  • Explicit open() focuses the close button, Escape closes the panel and close restores previous focus. The widget does not implement a full focus trap; test keyboard navigation in your host app.
  • Data loads on initialization, not on a polling interval. Failed requests appear in the panel with Retry. A private organization cannot publish its changelog through a public-key embed.

See API authentication and errors for origin restrictions. For publishing workflow, read using Reflet.