Releases: FastComments/fastcomments-react-native-sdk
Release list
v5.2.0
Comment menu: full web-parity moderation
Adds the moderator actions the web widget supports to the React Native comment menu, reachable through the typed SDK's ModerationApi (SSO-authenticated):
- Approve / unapprove and mark spam / not-spam
- Ban user - options sub-modal (ban vs shadow, via email / email-domain / IP, duration, reason, delete-all-comments)
- Give / remove badge - badge picker
- View all from IP - in-app paginated list with a link to the full web moderation dashboard
Visual parity
- Spam comments show a red border; unapproved (awaiting moderation) show an orange border (new
warningtheme token); the awaiting-approval notice renders. - Locked comments now display the padlock indicator.
- The comment-menu loading shimmer sweeps the selected row instead of a bar at the bottom.
Notes
- Moderation actions are admin-only (
isSiteAdmin); all mutating calls carrytenantId+ a broadcast id so the live echo is filtered and the comment stays in place. - Requires
fastcomments-sdk@^5.0.2.
Full changelog: v5.1.0...v5.2.0
v5.1.0
New
- Live chat streaming UX:
FastCommentsLiveChatmatches the web live-chat widget - compact Twitch-style rows (small avatar + activity dot, bold name inlined with the message), day separators, no per-message dates/reply bar, a red "Live" dot, a composer divider, Ctrl/Cmd+Enter submit, and an in-place save shimmer (no spinner/flicker). - Online users: a red presence dot, an always-on count, and
OnlineUsersFacepile+OnlineUsersListwidgets (Online/Offline sections viagetOfflineUsers,fillsidebar mode). Presence is applied incrementally from websocket frames (add/remove + a debouncedgetUsersInfoenrich) instead of re-fetching the whole list. - Feed parity with the Android SDK:
FastCommentsFeedPostCreate- a standalone post composer (AndroidFeedPostCreateViewequivalent): author header, rich enriched-editor body, media + link attachments, tags (tagSupplier), custom toolbar buttons, cancel/loading/error. Drive it from the feed's store viaonStoreReady, or pass aconfig.- Post rows gain author avatars, rich HTML content, a comment button opening the post's comments (
urlId = "post:<id>", like Android), share, and a delete menu. - Typed image layouts (single full-width, multi-image carousel, link-only action buttons);
config.hideFeedComposer.
- Store access:
onStoreReady(store)on the chat/commenting/feed widgets + the exportedFastCommentsStoretype, so hosts can render store-driven widgets alongside. - Every spinner replaced with a shimmer off one shared animation loop; anchored popovers (GIF/menus) flip above the trigger when there's no room below.
Fixed
- Reliable scroll-to-bottom on live-chat load (no clipped last message); the per-message reply/vote bar no longer wastes vertical space.
- Submit buttons (reply, SSO login, edit save) share one filled style with text-matching icons; the comment menu is a three-dot kebab in both modes.
Full changelog: see CHANGELOG.md.
v5.0.1
Patch fixing a rendering bug.
Fixed
- Voting a comment (or any single-comment update) flashed images in other comments: the list re-rendered every row on each store change, re-running react-native-render-html and reloading images. Comment rows now re-render only when their own layout inputs change (each row self-subscribes to its content), so unrelated rows and their images stay put. Also removes wasted render work on every interaction.
v5.0.0
Summary
Major release (5.0.0). A complete visual redesign built on a semantic theme-token layer, a new FastCommentsLiveChat widget, first-class web support via react-native-web, and an upgrade of the dev/test/example toolchain to React Native 0.81 / React 19. The break is the RN/React floor (New Architecture is now required), hence the major bump.
Why 5.0.0 (breaking)
- React Native 0.69 -> 0.81 and React 18 -> 19 on the dev/test side. The Fabric editor (
react-native-enriched) requires the New Architecture, the default since RN 0.76, so consumers on older RN cannot take this as a minor. - Complete UI redesign: theme tokens, restyled composer/toolbar, the LiveChat preset, anchored web dropdowns + notification popover.
- Dependency + behavior shifts:
fastcomments-sdk3.3.1 method renames and the notification page-subscription fix.
The SDK source only uses stable RN APIs, so a consumer's integration code is unaffected; what changes is the supported RN/React floor.
Theming
- New
FastCommentsThemesemantic token layer (colors, spacing, radius, font sizes, font weights, avatar sizes; token names mirror the Android SDK). The entire default style tree is generated from tokens. - Optional
themeprop onFastCommentsLiveCommenting,FastCommentsFeed, andFastCommentsLiveChat(typedFastCommentsThemeOverrides);getLightTheme()/getDarkTheme()/resolveTheme()exported. Dark mode is one token set. - Back-compat:
styles+thememerges on top (styles win);stylesalone keeps the legacy full-replace behavior. The dark/erebus skins derive from the dark theme;setupDarkModeSkinis deprecated in favor of thethemeprop.
Visual redesign ("modern neutral")
Hairline separators, pill vote buttons and chips, filled primary buttons, round shadow-free avatars, a consistent type scale, and themed link colors through render-html tagsStyles. The editor toolbar and mention popup no longer hardcode colors.
New widget: FastCommentsLiveChat (Android LiveChatView parity)
Chronological messages, composer below the list, a live header strip (connection dot + user count), auto-scroll to new messages (pauses while scrolled up, resumes at the bottom or on your own message), older history on scroll-to-top, votes and reply threading disabled. All presets overridable via config. config.maxReplyDepth: 0 hides reply buttons.
Web support
- First-class web rendering via
react-native-web. Overlays the virtualized list would otherwise clip (comment/sort menus, GIF popover, notification list) are portaled to the body and anchored under their trigger through shareduseAnchoredPosition/useDismissOnOutsideClickhooks (capture-phase outside-click that excludes the trigger and content; selection closes the menu explicitly). shadow*styles emit CSSboxShadowon web (react-native-web deprecatesshadow*); native keepsshadow*+elevation.
New config / features
hideTopBar(FastCommentsRNConfig): hide the logged-in user + notification-bell strip above the composer.- On web the notification list opens as an anchored popover under the bell instead of a full-screen modal.
- "Subscribe to this page" now persists:
getUserNotificationssendsurlId, so the server returns the correct per-pageisSubscribedand the checkbox no longer resets on reopen. onScrolltop-pagination guarded with a ref to close a double-fire window.
Bug fixes
- Feed posts composed in the SDK rendered with literal
<p>text (the server entity-escapes<p>). Now sends<br>-separated content like the web feed widget. - Multi-paragraph comments glued together: editor HTML is normalized (
editorHtmlToServerHtml) before comment create and edit.
Dependency note
Migrates to fastcomments-sdk 3.3.1. Renames/reshapes applied across the SDK: search/getTrending/getLarge -> getGifsSearch/getGifsTrending/getGifLarge; logout -> logoutPublic; page reacts -> getV2PageReacts/createV2PageReact/deleteV2PageReact/getV2PageReactUsers; getUserNotifications gains urlId; getCommentsForUser reshaped (dropped tenantId/urlId/sso/cursor params); reactFeedPostPublic dropped urlId. Enum value imports moved to fastcomments-sdk/server (the bare entry is type-only).
Testing
tsc --noEmitclean on the RN 0.81 / React 19 stack.- Unit (RN stubbed): 137 passing, including theme-styles and editor-normalization (red-green) and the new
editorHtmlToServerHtmlsingle-quote case. - Web lane (vitest + jsdom + real
react-native-web/tiptap): 12 passing (mount/loaded-state, GIF attach, ModalMenu select/dismiss/sub-modal, notification popover anchor + outside-click dismiss). - tests-ui harness loads and renders under the new stack (smoke + render-smoke via RTL
renderunder React 19). The full live E2E suite needs a backend key (FC_E2E_API_KEY) and was not re-run for the upgrade delta. - README refreshed: current screenshots, RN 0.81 guidance, and the
FastCommentsRNConfigoptions (includinghideTopBar).
Not covered: an on-device native iOS/Android build (the example app's native projects are still RN 0.69 and need regeneration on a machine with the RN toolchain), and the erebus skin on device.