feat: expose internal contexts and composer components in the public API - #3242
Conversation
These components/hooks/contexts were used internally and referenced by the docs but were never re-exported from the package barrels, so consumers could not import them. Wire them into the public API: - context: VirtualizedMessageListContext, VirtualizedMessageListContextProvider, useVirtualizedMessageListContext, VirtualizedMessageListContextValue - components: SummarizedMessagePreview + useLatestMessagePreview (and its ChannelPreviewMessageType / ChannelPreviewDeliveryStatus / LatestMessagePreviewData / UseLatestMessagePreviewParams types) - message composer: VoiceRecordingPreviewSlot component; MessageComposerActions and AdditionalMessageComposerActions Purely additive barrel re-exports; no behavior change. yarn types and eslint pass.
|
No actionable comments were generated in the recent review. π βΉοΈ Recent review infoβοΈ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: π Files selected for processing (3)
π WalkthroughWalkthroughAdditional exports are added to the MessageComposer, components, and context barrel modules, including voice recording previews, composer actions, summarized message previews, and virtualized message list context. ChangesPublic barrel exports
Estimated code review effort: 1 (Trivial) | ~2 minutes Suggested reviewers: π₯ Pre-merge checks | β 5β Passed checks (5 passed)
β¨ Finishing Touchesπ Generate docstrings
π§ͺ Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Size Change: +35 B (0%) Total Size: 880 kB π¦ View Changed
βΉοΈ View Unchanged
|
Codecov Reportβ
All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3242 +/- ##
==========================================
+ Coverage 85.18% 85.21% +0.03%
==========================================
Files 505 505
Lines 15784 15784
Branches 5010 5010
==========================================
+ Hits 13446 13451 +5
+ Misses 2338 2333 -5 β View full report in Codecov by Harness. π New features to boost your workflow:
|
## [14.9.0](v14.8.0...v14.9.0) (2026-07-16) ### Bug Fixes * custom doUploadRequest permission adjustments ([#3243](#3243)) ([fa67adf](fa67adf)), closes [GetStream/stream-chat-js#1800](GetStream/stream-chat-js#1800) * **MessageComposer:** make textarea full-width in custom composer layouts ([#3241](#3241)) ([05236db](05236db)) ### Features * expose internal contexts and composer components in the public API ([#3242](#3242)) ([6b6a828](6b6a828)), closes [GetStream/docs-content#1431](https://github.com/GetStream/docs-content/issues/1431)
|
π This PR is included in version 14.9.0 π The release is available on: Your semantic-release bot π¦π |
Brings in the ComponentContext icons slots (#3246), the public-API context exports (#3242), extractDisplayInfo for Avatar (#3244), the tutorial example restructure (#3251), and stream-chat ^9.49.0 -> ^9.50.2. Conflict resolutions: - examples/tutorial/src/App.tsx: master rewrote the step list and already registers an emoji-picker step at position 7, so its structure wins and the branch's duplicate entry is dropped. Master's step description still advertised emoji-mart search, which this branch replaces with the built-in index, so it now names StreamEmojiPicker and built-in search. - examples/tutorial/src/6-emoji-picker/layout.css: master renamed the step directory 6- -> 7-, so accept the delete and port this branch's opt-in emoji-picker.css import into 7-emoji-picker/layout.css. Post-merge reconciliation: Master migrated the deprecated emoji-mart EmojiPicker to resolve its toggle icon from the new ComponentContext `icons` slot. StreamEmojiPicker did not exist on master, so a textually clean merge left the deprecated picker honoring the icons slot while the flagship picker ignored it. StreamEmojiPicker now reads IconEmoji via useComponentContextIcons() too, and its ButtonIconComponent prop is removed outright rather than deprecated: unlike the released EmojiPicker, that picker has never shipped, so there are no consumers to keep compatible and the context slot is the only override path. Both picker shell tests mocked '../../../context' without useComponentContextIcons, which master's change made a required export; the IconEmoji stub moves from the now-unused components barrel mock into the context mock. Verified on the merge result: 2946 tests passing (243 files), yarn types and yarn lint clean, yarn install clean with the lockfile unchanged, and the tutorial example type-checking.
Summary
Several components, hooks, and contexts are used internally and referenced by the docs, but were never re-exported from the package barrels β so consumers can't import them. This wires them into the public API. Purely additive barrel re-exports; no behavior change.
Newly exported
src/context/index.tsVirtualizedMessageListContext,VirtualizedMessageListContextProvider,useVirtualizedMessageListContext,VirtualizedMessageListContextValuesrc/components/index.tsSummarizedMessagePreview,useLatestMessagePreview(+ itsChannelPreviewMessageType,ChannelPreviewDeliveryStatus,LatestMessagePreviewData,UseLatestMessagePreviewParamstypes)src/components/MessageComposer/index.tsVoiceRecordingPreviewSlot(component; only its Props type was exported before)MessageComposerActionsandAdditionalMessageComposerActionsWhy
A docs audit of the v14 React SDK found multiple cookbook/reference pages instructing readers to import these symbols from
stream-chat-react, which fails at runtime because the barrels don't re-export them. Rather than route the docs around them, expose the symbols (the docs update is in GetStream/docs-content#1431).Notes
AdditionalMessageComposerActionsand the fouruseLatestMessagePreviewtypes ride along viaexport *β intentional; flag if you'd prefer narrower named exports.EditedMessagePreview,SendToChannelCheckbox,restorePreEditSnapshot.Checks
yarn typesβyarn eslint(changed files) βSummary by CodeRabbit