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.