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:
|
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