| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
feat: native multipart upload (#3566) ## 🎯 Goal This PR adds optional native multipart upload support for React Native and Expo packages, with native iOS/Android uploaders, a JS axios adapter, upload progress propagation and new attachment progress UI. Additionally, it also moves pending attachment uploads onto `client.uploadManager`, adds local attachment id tracking, improves video/document attachment handling, and updates SampleApp to exercise the new native upload path. The reason why we decided to add an opt-in native upload is related to the fact that `axios` does not always report upload progress correctly on React Native, especially Android. It will sometimes either not update the progress at all or report it badly, causing UI glitches. Additionally, native uploads are much, much faster as we take advantage of streaming directly without any intermediate ephemeral files in order to do that. Finally, `axios` can easily break if an override to the underlying RN's `fetch` implementation has been made, especially on `Android`. ## What Changed - Added a shared native multipart upload module for iOS and Android, including request parsing, file/text multipart parts, progress events, cancellation, timeouts, response handling, and bounded response body reads. - Added native package and Expo package bindings for `StreamMultipartUploader`, plus native handler registration through `stream-chat-react-native` and `stream-chat-expo` - Added core JS helpers and public types for native multipart upload requests, responses, progress events, abort handling, and uploader creation - Added `installNativeMultipartAdapter` / `wrapAxiosAdapterWithNativeMultipart` to route multipart `FormData` axios requests through the native uploader when available, while leaving non-multipart requests on the existing adapter - Added `Chat` support for enabling native multipart uploads via `useNativeMultipartUpload`; SampleApp enables this path - Reworked pending message attachment uploads to use `client.uploadManager.upload` by local attachment id instead of directly calling `channel.sendImage` / `channel.sendFile` - Added `localId` propagation from local attachments into message attachments so pending uploads can be correlated with `client.uploadManager` - Updated message sendability and upload indicator behavior to depend on `allowSendBeforeAttachmentsUpload` rather than offline support - Added upload progress UI for image, video, file, and audio attachments, including circular determinate progress, media overlays, file/audio byte progress labels, and a short completion hold to avoid UI flicker - Added new overrideable/default components for attachment upload progress: `AttachmentUploadIndicator`, `CircularProgressIndicator`, and `MediaUploadProgressOverlay` - Updated gallery/video thumbnail rendering so pending media attachments can show upload progress overlays - Updated document picking in both native and Expo packages to generate thumbnails for picked video files (this was missing from V9 initially) - Updated iOS video thumbnail URL handling to strip query and fragment data from local file URLs - Refined native iOS shimmer behavior to reduce animation restarts, handle foreground/background transitions, visibility, alpha, trait changes, and resolved color updates more reliably (this should improve shimmer performance for iOS significantly) - Updated `Android` shared native source syncing to resolve shared native sources from the canonical project path - Replaced SampleApp’s `react-native-fast-image` dependency with `@d11/react-native-fast-image` ## 🛠 Implementation details <!-- Provide a description of the implementation --> ## 🎨 UI Changes <!-- Add relevant screenshots --> <details> <summary>iOS</summary> <table> <thead> <tr> <td>Before</td> <td>After</td> </tr> </thead> <tbody> <tr> <td> <!--<img src="" /> --> </td> <td> <!--<img src="" /> --> </td> </tr> </tbody> </table> </details> <details> <summary>Android</summary> <table> <thead> <tr> <td>Before</td> <td>After</td> </tr> </thead> <tbody> <tr> <td> <!--<img src="" /> --> </td> <td> <!--<img src="" /> --> </td> </tr> </tbody> </table> </details> ## 🧪 Testing <!-- Explain how this change can be tested (or why it can't be tested) --> ## ☑️ Checklist - [ ] I have signed the [Stream CLA](https://docs.google.com/forms/d/e/1FAIpQLScFKsKkAJI7mhCr7K9rEIOpqIDThrWxuvxnwUq2XkHyG154vQ/viewform) (required) - [ ] PR targets the `develop` branch - [ ] Documentation is updated - [ ] New code is tested in main example apps, including all possible scenarios - [ ] SampleApp iOS and Android - [ ] Expo iOS and Android --------- Co-authored-by: Zita Szupera <szuperaz@gmail.com> | 5 个月前 | |
chore: upgrade to TypeScript 6.0.3, ES2022 target, and shared ts-config presets (#3663) ## What & why Upgrades every workspace to **TypeScript 6.0.3** with **`target: ES2022`**, and removes tsconfig duplication via a new shared preset package. Enabling type-checking across the previously-unchecked packages also surfaced (and this PR fixes) a pre-existing bug in the core package's published type resolution plus a batch of latent type errors. ## Changes ### Shared config - New **private** `@stream-io/typescript-config` workspace (`configs/typescript-config/`): - `base.json` — cross-cutting policy (ES2022 target, strict, interop, …) - `library.json` — full React Native library config (extends `base`) - Core, the native/expo wrappers, and all 3 example apps extend these instead of duplicating compiler options. Example apps array-extend `["<framework base>", "@stream-io/typescript-config/base.json"]`. ### TypeScript 6.0.3 / ES2022 - TS `6.0.3` in all 7 manifests; `target: ES2022` everywhere. - `lib` kept at `ESNext` — the SDK uses the ES2023 `Array.prototype.toReversed()`. - TS 6.0 no longer auto-includes `@types/jest`, so it's referenced explicitly from a test-only `package/src/__tests__/jest-globals.d.ts` (excluded from the published build). ### Core publishing fix (consumer-facing) - `react-native-builder-bob` emitted declarations under `lib/typescript/src/` while `package.json#types` pointed at `lib/typescript/index.d.ts` — so TS consumers couldn't resolve the SDK's types via `types`. Added `rootDir: "./src"` so declarations emit flat to match `types`. This was also the root cause that blocked the wrappers/examples from resolving core's types. - Exported `PickImageOptions` from the core entrypoint (defined+exported in `native.ts` but never surfaced from `index`). ### Wrappers (`stream-chat-react-native`, `stream-chat-expo`) - Added a `typecheck` script + tsconfig (they had neither). The dynamic optional-`require` shims relax `noImplicitAny`/`strictNullChecks`/unused checks (kept `noImplicitReturns`). - Fixed real bugs: missing `return`s in `shareImage`, missing `resizeMode`/`rate` on the video shim, an inconsistent `startRecording` return shape. ### Example apps - Fixed ~60 pre-existing latent type errors unmasked by enabling typecheck: theme palette typing (the legacy flat `colors` palette, read via a local `AppTheme` cast — behavior-preserving), null-safety guards, and several SDK-API-drift fixes. ### CI - `check-pr.yml` now runs `yarn typecheck` across the whole workspace (core + 2 wrappers + 3 examples) instead of only the core package; the root `typecheck` aggregate includes the wrappers. ## Verification - `yarn build` ✅ - `yarn typecheck` (core + 2 wrappers + 3 examples) ✅ **0 errors** - `yarn lint` ✅ ## Notes for reviewers - **Commit type**: filed as `chore:` (release-neutral). The core changes (flat `types` path + `PickImageOptions` export) are genuinely consumer-facing — if you want them shipped, retype as `fix:` to cut a patch. - **Wrapper strictness**: `strictNullChecks`/`noImplicitAny` are relaxed **only** for the two wrapper packages (dynamic optional-dep shims), not for core. - **Example theming**: the apps' custom `colors` palette was already inert for SDK theming (the SDK reads semantics/primitives, not `theme.colors`); this PR preserves that behavior. Migrating the palette to the token model to restore custom branding would be a separate enhancement. - Did not run the full unit suite locally (the only core source change is the additive `PickImageOptions` export); CI runs `test:coverage`. --------- Co-authored-by: Ivan Sekovanikj <ivan.sekovanikj@getstream.io> | 2 个月前 | |
chore: upgrade to TypeScript 6.0.3, ES2022 target, and shared ts-config presets (#3663) ## What & why Upgrades every workspace to **TypeScript 6.0.3** with **`target: ES2022`**, and removes tsconfig duplication via a new shared preset package. Enabling type-checking across the previously-unchecked packages also surfaced (and this PR fixes) a pre-existing bug in the core package's published type resolution plus a batch of latent type errors. ## Changes ### Shared config - New **private** `@stream-io/typescript-config` workspace (`configs/typescript-config/`): - `base.json` — cross-cutting policy (ES2022 target, strict, interop, …) - `library.json` — full React Native library config (extends `base`) - Core, the native/expo wrappers, and all 3 example apps extend these instead of duplicating compiler options. Example apps array-extend `["<framework base>", "@stream-io/typescript-config/base.json"]`. ### TypeScript 6.0.3 / ES2022 - TS `6.0.3` in all 7 manifests; `target: ES2022` everywhere. - `lib` kept at `ESNext` — the SDK uses the ES2023 `Array.prototype.toReversed()`. - TS 6.0 no longer auto-includes `@types/jest`, so it's referenced explicitly from a test-only `package/src/__tests__/jest-globals.d.ts` (excluded from the published build). ### Core publishing fix (consumer-facing) - `react-native-builder-bob` emitted declarations under `lib/typescript/src/` while `package.json#types` pointed at `lib/typescript/index.d.ts` — so TS consumers couldn't resolve the SDK's types via `types`. Added `rootDir: "./src"` so declarations emit flat to match `types`. This was also the root cause that blocked the wrappers/examples from resolving core's types. - Exported `PickImageOptions` from the core entrypoint (defined+exported in `native.ts` but never surfaced from `index`). ### Wrappers (`stream-chat-react-native`, `stream-chat-expo`) - Added a `typecheck` script + tsconfig (they had neither). The dynamic optional-`require` shims relax `noImplicitAny`/`strictNullChecks`/unused checks (kept `noImplicitReturns`). - Fixed real bugs: missing `return`s in `shareImage`, missing `resizeMode`/`rate` on the video shim, an inconsistent `startRecording` return shape. ### Example apps - Fixed ~60 pre-existing latent type errors unmasked by enabling typecheck: theme palette typing (the legacy flat `colors` palette, read via a local `AppTheme` cast — behavior-preserving), null-safety guards, and several SDK-API-drift fixes. ### CI - `check-pr.yml` now runs `yarn typecheck` across the whole workspace (core + 2 wrappers + 3 examples) instead of only the core package; the root `typecheck` aggregate includes the wrappers. ## Verification - `yarn build` ✅ - `yarn typecheck` (core + 2 wrappers + 3 examples) ✅ **0 errors** - `yarn lint` ✅ ## Notes for reviewers - **Commit type**: filed as `chore:` (release-neutral). The core changes (flat `types` path + `PickImageOptions` export) are genuinely consumer-facing — if you want them shipped, retype as `fix:` to cut a patch. - **Wrapper strictness**: `strictNullChecks`/`noImplicitAny` are relaxed **only** for the two wrapper packages (dynamic optional-dep shims), not for core. - **Example theming**: the apps' custom `colors` palette was already inert for SDK theming (the SDK reads semantics/primitives, not `theme.colors`); this PR preserves that behavior. Migrating the palette to the token model to restore custom branding would be a separate enhancement. - Did not run the full unit suite locally (the only core source change is the additive `PickImageOptions` export); CI runs `test:coverage`. --------- Co-authored-by: Ivan Sekovanikj <ivan.sekovanikj@getstream.io> | 2 个月前 | |
feat: add support for react compiler on RN 0.77 (#3024) | 1 年前 | |
feat: native shimmer and image loading redesign (#3467) ## 🎯 Goal In this PR, we redesign the implementation of `ImageLoadingIndicator` to present as a gradient shimmer with an activity indicator. Since we tried a couple of approaches (one with `LinearGradient` from `RNSVG`), at the end we settled for a purely native implementation for performance reasons. Having that many animated views be potentially active on the screen tanks scrolling performance of the `MessageList` (i.e a lot of images loading, perhaps with poor network conditions if they aren't cached). The shimmer is Fabric only, lives in shared native sources, and is exposed through the native handler registration flow for consistent integration across the current SDK setup. Visuals and behaviour are aligned between Android and iOS, keeping a single moving shimmer gradient, and tuning width/shape/alpha for a smoother effect closer to the previous output. For packaging and local development flow, native source sync is now driven from `shared-native` as the source of truth so local dev and release packaging stay aligned, with build/script flow updated so copies refresh automatically when running the sample app. I'm not yet sure this is the correct approach, but since this is relatively new as we didn't have that many native implementations in the SDK in the past it'll have to do for now and we'll of course refine it as we go on. Just for reference, the native shimmer implementation improves: - Scrolling on Android by about 30-40 FPS (yes, really) - Scrolling on iOS by about 10 FPS (it was fine-ish before as well) compared to a `LinearGradient` and `Animated.View` approach for rendering a shimmer. TODO: - [x] Write docs for the native side - [x] Some additional cleanup - [x] Maybe tweak/polish the shimmer/gradient a little bit more - [x] Consolidate where we copy resources from (probably one folder for the shared stuff, and we always copy from there) so that future native implementations are trivial to add and all of the tooling works - [x] Have another run at the `build.gradle` copying edge cases, I think this can be done simpler ## 🛠 Implementation details <!-- Provide a description of the implementation --> ## 🎨 UI Changes <!-- Add relevant screenshots --> <details> <summary>iOS</summary> <table> <thead> <tr> <td>Before</td> <td>After</td> </tr> </thead> <tbody> <tr> <td> <!--<img src="" /> --> </td> <td> <!--<img src="" /> --> </td> </tr> </tbody> </table> </details> <details> <summary>Android</summary> <table> <thead> <tr> <td>Before</td> <td>After</td> </tr> </thead> <tbody> <tr> <td> <!--<img src="" /> --> </td> <td> <!--<img src="" /> --> </td> </tr> </tbody> </table> </details> ## 🧪 Testing <!-- Explain how this change can be tested (or why it can't be tested) --> ## ☑️ Checklist - [ ] I have signed the [Stream CLA](https://docs.google.com/forms/d/e/1FAIpQLScFKsKkAJI7mhCr7K9rEIOpqIDThrWxuvxnwUq2XkHyG154vQ/viewform) (required) - [ ] PR targets the `develop` branch - [ ] Documentation is updated - [ ] New code is tested in main example apps, including all possible scenarios - [ ] SampleApp iOS and Android - [ ] Expo iOS and Android --------- Co-authored-by: Khushal Agarwal <khushal.agarwal987@gmail.com> | 6 个月前 | |
fix: audio recordings fixes and performance improvements (#3514) ## 🎯 Goal This PR fixes several SDK side audio bugs and interaction issues around voice recordings and audio attachments. The main change is a (long overdue) rewrite of our audio playing management so that it no longer relies on `react-native-video` for `stream-chat-react-native`. The main rationale' was the fact that it would appear the specific format we use was not seekable at all (and no way to force `react-native-video` to seek with `AdtsExtractor.FLAG_ENABLE_CONSTANT_BITRATE_SEEKING_ALWAYS`, at least that I know of). In addition to that, using `react-native-nitro-sound` is much more stable and performant. Additionally, this PR also includes: - a complete rewrite of how our waveform component works (`WaveProgressBar`) - smoother waveform playback/drag behavior in `WaveProgressBar` - fixed drag crash caused by incorrect `worklet` usage - fixed seek release oscillation in audio attachments - improved drag hit area - fixed thumb tail overshoot - reduced idle waveform rendering cost - stabilized duration label width to avoid layout churn - fixed Android native speed change while paused starting playback - fixed Expo iOS seek by converting ms to seconds in the Expo audio adapter ## 🛠 Implementation details <!-- Provide a description of the implementation --> ## 🎨 UI Changes <!-- Add relevant screenshots --> <details> <summary>iOS</summary> <table> <thead> <tr> <td>Before</td> <td>After</td> </tr> </thead> <tbody> <tr> <td> <!--<img src="" /> --> </td> <td> <!--<img src="" /> --> </td> </tr> </tbody> </table> </details> <details> <summary>Android</summary> <table> <thead> <tr> <td>Before</td> <td>After</td> </tr> </thead> <tbody> <tr> <td> <!--<img src="" /> --> </td> <td> <!--<img src="" /> --> </td> </tr> </tbody> </table> </details> ## 🧪 Testing <!-- Explain how this change can be tested (or why it can't be tested) --> ## ☑️ Checklist - [ ] I have signed the [Stream CLA](https://docs.google.com/forms/d/e/1FAIpQLScFKsKkAJI7mhCr7K9rEIOpqIDThrWxuvxnwUq2XkHyG154vQ/viewform) (required) - [ ] PR targets the `develop` branch - [ ] Documentation is updated - [ ] New code is tested in main example apps, including all possible scenarios - [ ] SampleApp iOS and Android - [ ] Expo iOS and Android | 6 个月前 | |
perf: gallery perf improvements (#3662) ## 🎯 Goal The fullscreen ImageGallery was designed for in message galleries (<= 4 attachments per message). The newer `ChannelDetails` "Photos & Videos" feature opens the same gallery with 50–100+ assets, which exposed several latent problems: - Android OOM crashes when swiping through video heavy galleries - ExoPlayer's default 50s buffer (for `react-native-video` as an example) + multiple simultaneous `Video` elements blew the Java heap even on mid tier devices - Visible swipe jank on Android driven by an avalanche of per swipe rerenders cascading from `ImageGallery` down through every mounted slide and every `useAnimatedStyle` worklet - Latent bugs: stale closures in the `Image.getSize` fallback for asset dimensions; phantom `isPlaying === true` state after slide unmount; `useState` for currentImageHeight causing a redundant parent re-render per swipe; redundant `[index, setIndex]` state in the gestures hook duplicating store-side currentIndex; etc The goal of this PR is to fix the crashes and reduce per swipe rerenders to the architectural minimum without changing any gallery interactions visible to the user. ## 🛠 Implementation details Crash fix - `ExoPlayer` buffer config and instance capping - `AnimatedGalleryVideo` now uses a tighter mount window than the image side: `shouldRender = Math.abs(currentIndex - index) < 2` (3 slides - `prev`, `current`, `next`) instead of the original `< 4` (up to 7 slides). Image slides keep the `< 4` window since they're not subject to the same memory or decoder slot pressure - Caps simultaneous mounted `<NativeHandlers.Video>` elements at 3 regardless of how many video assets the gallery contains. This is the structural fix for the original Android crash: `ExoPlayer` instance count was the primary axis blowing the Java heap and 7+ simultaneous instances also exceeded Android's hardware `MediaCodec` decoder cap (~4–6 slots on most mid-tier devices) - Hardcoded conservative buffer config in both `Video` wrappers (`native-package/optionalDependencies/Video.tsx` for `react-native-video` and `expo-package/optionalDependencies/Video.tsx` for `expo-video`). Each wrapper uses its lib's native API directly and we apply this automatically: - `react-native-video`: `bufferConfig` with `minBufferMs: 5000, maxBufferMs: 10000, bufferForPlaybackMs: 1000, bufferForPlaybackAfterRebufferMs: 2000` - `expo-video`: `player.bufferOptions = { preferredForwardBufferDuration: 10, minBufferForPlayback: 1, maxBufferBytes: 6_000_000 }` set inside the `useVideoPlayer` setup callback - Per instance Java heap source byte usage drops from `~30 MB` (50s of buffer read ahead at 5 Mbps) to ~6 MB. With three Video elements alive in the slide window, baseline drops from ~90 MB to ~18 MB on the 256 MB heap - Integrators with different needs can replace the `Video` wrapper via `registerNativeHandlers({ Video: ... })` Rerender reduction - single source of truth for `currentIndex` Historically, our gallery appears to be very unoptimized in React terms. Aside from having many unnecessary rerenders, we'd also rerender each attachment in the gallery on every index change. In addition to be terrible semantically, it's also something that we use purely for animations/gestures. Conversely, we don't particularly need state anywhere and so we move most of these interactions to purely shared values to make sure there is no work on the JS thread at all (or at least as little as possible in this iteration). For this, we introduce a SV version of `currentIndex` within the store itself which we keep in lockstep with `state.currentIndex` via the existing setter. Most notably: - Worklet consumers (gesture math in `useImageGalleryGestures`, transforms in `useAnimatedGalleryStyle`, the `useAnimatedReaction` in `ImageGallery` that drives `translationX`, the `useDerivedValue` for `headerFooterOpacity`) read `currentIndexShared.value` directly on the UI thread. This makes sure that animated styles are not recreated on every swipe - Dropped the redundant `[index, setIndex] = useState(currentIndex)` in `useImageGalleryGestures` - moveToNext/Previous read fresh from `store.state.getLatestValue()` - Slide components (`AnimatedGalleryImage`, `AnimatedGalleryVideo`) replaced their `useStateStore({ currentIndex })` subscription with a slim per instance `useCallback` selector returning only `{ shouldRender }`. `useStateStore`'s shallow equality will short circuit when the boolean doesn't flip so most slides stay silent during swipes; only the 1–2 entering or leaving the mount window rerender - Wrapped `AnimatedGalleryVideo` in `React.memo` so parent rerenders don't cascade through to mounted video slides (I am mostly against this but due to how the gallery works right now it would appear that React compiler cannot figure out that it should stop rendering in these instances - Extracted the accessible `"X of N"` View into a separate `ImageGalleryA11yProbe` sibling component that subscribes to `currentIndex` locally only mounted when accessibility is enabled. `ImageGalleryWithContext` itself no longer subscribes to `currentIndex` at all. The calculation of `currentImageHeight` has also been moved to a SV. Smaller fixes - `AnimatedGalleryVideo`'s cleanup now calls `videoPlayer.onRemove()` (was just `playerRef = null`) and pauses the native player and zeroes pooled JS state (isPlaying, position, duration, progress) so a swipe back doesn't autoplay from the start with a stale state - Pause active player on index change moved from a `useEffect` in `ImageGallery` to the `currentIndex` setter on the store and keeps the invariant local to the state it depends on. - `useAnimatedGalleryStyle`'s worklet now derives `selected`/`previous` from `currentIndexShared.value` inside the worklet - Pan gesture classification threshold unified across iOS and Android (`maxXYRatio = 0.25` instead of `isAndroid ? 1 : 0.25`). The previous Android specific 1 made natural diagonal finger arcs misclassify as vertical, causing the page flip to snap back instead of advancing unless the gesture has greater momentum Note: There are many other, less obvious ways to improve the gallery however I'd like to do those in a separate PR as such heavy refactorings we'd like to do carefully. Also, here are some measured metrics (generated by the new performance script, specifically for Android): ``` ┌───────────────────────┬─────────┬─────────┬────────────────┐ │ Metric │ Develop │ Branch │ Δ │ ├───────────────────────┼─────────┼─────────┼────────────────┤ │ Memory │ │ │ │ ├───────────────────────┼─────────┼─────────┼────────────────┤ │ Java Heap PSS │ 157 MB │ 99 MB │ −58 MB (−37%) │ ├───────────────────────┼─────────┼─────────┼────────────────┤ │ Total PSS │ 1.22 GB │ 1.21 GB │ ~0 │ ├───────────────────────┼─────────┼─────────┼────────────────┤ │ Views (Objects) │ 2552 │ 2367 │ −185 (−7%) │ ├───────────────────────┼─────────┼─────────┼────────────────┤ │ Frame timing │ │ │ │ ├───────────────────────┼─────────┼─────────┼────────────────┤ │ 50p frame │ 26 ms │ 22 ms │ −4 ms (−15%) │ ├───────────────────────┼─────────┼─────────┼────────────────┤ │ 90p frame │ 73 ms │ 61 ms │ −12 ms (−16%) │ ├───────────────────────┼─────────┼─────────┼────────────────┤ │ 95p frame │ 117 ms │ 89 ms │ −28 ms (−24%) │ ├───────────────────────┼─────────┼─────────┼────────────────┤ │ 99p frame │ 250 ms │ 150 ms │ −100 ms (−40%) │ ├───────────────────────┼─────────┼─────────┼────────────────┤ │ Frame quality │ │ │ │ ├───────────────────────┼─────────┼─────────┼────────────────┤ │ Janky frames │ 20.7% │ 15.3% │ −5.4pp (−26%) │ ├───────────────────────┼─────────┼─────────┼────────────────┤ │ Janky (legacy) │ 59.3% │ 41.2% │ −18.1pp (−31%) │ ├───────────────────────┼─────────┼─────────┼────────────────┤ │ Slow bitmap uploads │ 17 │ 7 │ −10 (−59%) │ ├───────────────────────┼─────────┼─────────┼────────────────┤ │ Slow UI thread │ 113 │ 107 │ −6 (−5%) │ ├───────────────────────┼─────────┼─────────┼────────────────┤ │ Frame deadline missed │ 116 │ 111 │ −5 (−4%) │ └───────────────────────┴─────────┴─────────┴────────────────┘ ``` (done comparing the **worst** run on this branch as compared to the **best** run on [this one](https://github.com/GetStream/stream-chat-react-native/pulls)) ## 🎨 UI Changes <!-- Add relevant screenshots --> <details> <summary>iOS</summary> <table> <thead> <tr> <td>Before</td> <td>After</td> </tr> </thead> <tbody> <tr> <td> <!--<img src="" /> --> </td> <td> <!--<img src="" /> --> </td> </tr> </tbody> </table> </details> <details> <summary>Android</summary> <table> <thead> <tr> <td>Before</td> <td>After</td> </tr> </thead> <tbody> <tr> <td> <!--<img src="" /> --> </td> <td> <!--<img src="" /> --> </td> </tr> </tbody> </table> </details> ## 🧪 Testing <!-- Explain how this change can be tested (or why it can't be tested) --> ## ☑️ Checklist - [ ] I have signed the [Stream CLA](https://docs.google.com/forms/d/e/1FAIpQLScFKsKkAJI7mhCr7K9rEIOpqIDThrWxuvxnwUq2XkHyG154vQ/viewform) (required) - [ ] PR targets the `develop` branch - [ ] Documentation is updated - [ ] New code is tested in main example apps, including all possible scenarios - [ ] SampleApp iOS and Android - [ ] Expo iOS and Android --------- Co-authored-by: Zita Szupera <szuperaz@gmail.com> | 3 个月前 | |
feat!: V6.0.0 (#2844) BREAKING CHANGE: v6 release * fix: remove netinfo from native handlers and add it as dev dependency of core (#2538) * fix: add expo-clipboard to peer deps of expo-package (#2537) * fix: remove netinfo from native handlers and add it as dev dependency of core * fix: lint issues * fix: revert back isMounted logic * fix: change peer dep * feat: remove usage of flatlist-mvcp in favour of mvcp support in RN >= 0.72 (#2539) * fix: add expo-clipboard to peer deps of expo-package (#2537) * feat: remove usage of flatlist-mvcp in favour of mvcp support in RN >= 0.72 * fix: remove flatlist-mvcp from example apps * chore: update peer dep of react native * fix: change quotedMessage type to MessageType or undefined (#2527) * fix: change quotedMessage type to MessageType or undefined * docs: fix lint issues * fix: change react-native-image-resizer to @bam.tech/react-native-image-resizer (#2534) * fix: reaction list reactions sorting order based on created_at * fix: show reactions using reactions_group * fix: tests * fix: useProcessReactions hook * fix: useProcessReactions hook and Channel message spread * fix: change react-native-image-resizer to @bam.tech/react-native-image-resizer * fix: remove reaction_counts from offline DB * chore: update yarn.lock files * fix: add reanimated and gesture handler as peer deps to package * fix: change old gesture handler useAnimatedGestureHandler to the new API (#2563) * feat: configure ReactionList reaction theme (#2561) * fix: expo sample app keyboardVerticalOffset for channel and thread screen * fix: change old gesture handler useAnimatedGestureHandler to the new API * feat: move react-native-quick-sqlite to op-sqlite (#2541) * feat: move react-native-quick-sqlite to op-sqlite * docs: update docs * fix: podfile changes * docs: add troubleshoot guide * fix: issues with import * fix: update yarn.lock * chore: update deps of expo messaging app * feat: use react-native-blob-util instead of the react-native-fs and make it optional dependency (#2578) * feat: use react-native-blob-util instead of the react-native-fs and make it optional dependency * chore: fix peerdeps and add dcos * fix: deps version on package.json * docs: add migration guide for v5 to v6 * docs: add migration guide for v5 to v6 * docs: add migration guide for v5 to v6 * fix: upgrade cameraroll, documentpicker, haptics feedback and image crop picker to new arch compatible version * fix: change react-native-image-crop-picker to react-native-image-picker and make it optional * docs: add migration guide * fix: make expo-image-picker optional * fix: make expo-image-picker optional * docs: apply docs changes * fix: add check for handlers in native.ts * fix: resolve conflicts from branch develop to v6 (#2621) * fix: resolve conflicts from branch develop to v6 * fix: remove cameraroll on ts messaging app * fix: remove shared folder * chore: bump vale version * chore: bump vale version * chore: update vale version * chore: resolve conflicts from develop * chore: fix vale issues * chore: fix vale issues * fix: react-native-safe-area-context ios build issue * fix: bottom sheet version * fix: remove flipper debugger * fix: issue with rn-svg on android and rn-video fabric compatibility * fix: animations usage in ImageGallery (#2627) * fix: remove rn-sqlite patch * fix: animations laginess on the ImageGallery and MessageOverlay on new architecture (#2633) * chore: resolve conflicts from develop (#2682) * fix: upgrade firebase versions to fix crash (#2646) * fix: audio recording variety bugs (#2648) * fix: variety of bugs in async audio feature * fix: upload of empty messages and console.log cleanup * fix: expo permission race conditions * fix: create pure version of stopRecording() for usage on unmount * fix: remove redundant export * fix: actually amend failing test suites * chore: remove constructors as they are not needed * fix: pr remarks * chore: write some simplistic functionality tests * chore: return class instance rather than class itself for better usability * chore: add more robust tests * fix: linter errors * fix: only display waveform whenever the mic is locked * docs: add Deep Linking guide for the chat SDK (#2651) * fix: change Block user action to Ban user action and UI cookbook for blocking users (#2649) * fix: change Block user action to Ban user action * fix: change Block user action to Ban user action * fix: add back blockUser action and deprecate it * docs: UI Cookbook for Blocking users * chore(release): 5.36.1 [skip ci] * chore(release): 1.28.1 [skip ci] * fix: issue with loading app settings when the connectUser is not called on app (#2654) * fix: issue with loading app settings when the connectUser is not called on app * fix: add comments * fix: add comments * fix: unable to upload file due to special characters in the file name (#2656) * fix: sdk size pr (#2657) * [CI] Update SDK Size (#2653) Co-authored-by: Khushal Agarwal <khushal.agarwal987@gmail.com> Co-authored-by: Stream Bot <runner@fv-az1148-731.o3ts4yn1huletmfehy03vvfvxg.dx.internal.cloudapp.net> * chore(release): 5.36.2 [skip ci] * chore(release): 1.28.2 [skip ci] * feat: add live location sharing cookbook (#2659) * feat: add live location ui cookbook * fix: prettier lint * Update docusaurus/docs/reactnative/guides/live-location-sharing.mdx Co-authored-by: Oliver Lazoroski <oliver.lazoroski@gmail.com> * lint fixes * fix lint issues * fix locks * move to ruby 3.1 and greater --------- Co-authored-by: Oliver Lazoroski <oliver.lazoroski@gmail.com> * chore(release): 5.37.0 [skip ci] * chore(release): 1.29.0 [skip ci] * fix: avoid prepending http before native supported url schemes (#2661) * fix: avoid prepending http before native supported url schemes * fix: move check to link parsing module * fix: bad memoisation in window, screen dimension listener hooks (#2664) * fix: bad memoisation in window, screen dimension listener hooks * remove unused variable * feat: add create chat client hook for easy usage (#2660) * feat: add create chat client hook for easy usage * docs: use useCreateChatClient hook for client creation * fix: bump fastlane plugin version (#2665) * fix: add theme properties for EmptyStateIndicator for message list (#2667) * fix: add theme properties for EmptyStateIndicator for message list * fix: update snapshots * fix: apply card cover theme property order * fix: pagination typescript errors and db synchronization bugs (#2669) * fix: pagination typescript errors and db synchronization bugs * chore: write test for db serialization issue * fix: linter issues * [CI] Bump max tolerance for sdk size analysis (#2674) * chore: bump sample app version to v1.30.0 * fix: remove nin and ne operator usage in the SDK and the sample app (#2672) * fix: remove and operator usage in the SDK and the sample app * fix: remove console log * fix: change console log to warn * fix: add improvemnts * fix: import of debouncefunc * fix: import of debouncefunc * fix: restructure queryMembers, queryUsers and ACItriggersettings * fix: error bubbling for suggestions in auto complete input * fix: request image access permissions for iOS only for native image picking (#2677) * fix: properly resolve sendMessage during memoization (#2675) * fix: properly resolve sendMessage during memoization * fix: remedy change so that it does not cause performance issues * chore: revert sendMessage in the dep array * fix: deprecate messageReactions prop and use isMessageActionsVisible instead for messageActions (#2676) * fix: deprecate messageReactions prop and use isMessageActionsVisible instead for messageActions * docs: fix custom message actions * fix: execution logic for showMessageOverlay * chore(release): 5.38.0 [skip ci] * chore(release): 1.29.1 [skip ci] * fix: update yarn.lock for the project (#2681) * fix: copy message action type for message actions (#2679) * chore: update sdk size (#2678) Co-authored-by: Khushal Agarwal <khushal.agarwal987@gmail.com> Co-authored-by: Stream Bot <runner@fv-az1756-392.rxb2ubmju23uthz3oztawtjyeg.dx.internal.cloudapp.net> * chore: resolve conflicts from develop * fix: vale lint issues * fix: new arch project config --------- Co-authored-by: Ivan Sekovanikj <31964049+isekovanic@users.noreply.github.com> Co-authored-by: semantic-release-bot <semantic-release-bot@martynus.net> Co-authored-by: Alexey Alter-Pesotskiy <alex@testableapple.com> Co-authored-by: Stream SDK Bot <60655709+Stream-SDK-Bot@users.noreply.github.com> Co-authored-by: Stream Bot <runner@fv-az1148-731.o3ts4yn1huletmfehy03vvfvxg.dx.internal.cloudapp.net> Co-authored-by: Santhosh Vaiyapuri <3846977+santhoshvai@users.noreply.github.com> Co-authored-by: Oliver Lazoroski <oliver.lazoroski@gmail.com> Co-authored-by: Ivan Sekovanikj <ivan.sekovanikj@getstream.io> Co-authored-by: Stream Bot <runner@fv-az1756-392.rxb2ubmju23uthz3oztawtjyeg.dx.internal.cloudapp.net> * fix: chat.test.ts * chore: cleanup v3 docs setup and e2e tests from project (#2701) * feat: add new message action list and reaction selector UI (#2686) * feat: remove StreamChatRN in favour of a global context ChatConfigContext that allows providing global values (#2703) * fix: remove deprecated code from v6 branch (#2702) * fix: remove deprecated code from v6 branch * fix: remove deprecated code from v6 branch * docs: add deprecated docs * docs: add deprecated docs * chore: resolve conflicts from base branch * docs: improve deprecated docs * chore: resolve conflicts from develop * feat: new reaction list design and improvements to MessageSimple component (#2700) * feat: add new message action list and reaction selector UI * fix: remove unnecessary props from OverlayContext * docs: add comments for the props * tests: add tests for the components * tests: add tests for the components * fix: chat.test.ts * fix: chat.test.ts * fix: add tests for the code * fix: use rn animated to create new modal and add docs * fix: add opacity for the message action list item when pressed * fix: make modal better and change component names * fix: update test snapdhots * docs: message actions customizations * docs: message actions customizations * fix: theme improvements * fix: message component render improvements * docs: update migration guide * feat: new reaction list design and improvements to MessageSimple component * tests: add tests for the components * docs: reaction list new design docs * docs: add changes to migration guide * docs: add changes to migration guide * docs: add changes to migration guide * chore: resolve conflicts from base branch * chore: resolve conflicts from base branch * fix: sample app overlay backdrop bug * fix: reaction list type * feat: add FlatList for Reaction Picker * feat: add FlatList for Reaction Picker * feat: add FlatList for Reaction Picker * fix: circular dependency issue * fix: upgrade expo to latest in expo messaging app * fix: padding for reaction picker * fix: update dependencies for native cli apps * fix: add Flatlist mvcp as optional package and peer deps versions (#2720) * fix: add Flatlist mvcp as optional package and peer deps versions * fix: add Flatlist mvcp as optional package and peer deps versions * docs: fix native handler docs * docs: fix vale issues * docs: remove native handler docs * fix: lint issues * fix: design issues with ReactionList bottom UI (#2717) * fix: design issues with ReactionList bottom UI * fix: vale issues * fix: add a log that complains for removal for mvcp package on RN version <0.72 (#2724) * fix: add a log that complains for removal for mvcp package on RN version <0.72 * fix: add a log that complains for removal for mvcp package on RN version <0.72 * fix: build issues * fix: add variable under the if block Co-authored-by: Oliver Lazoroski <oliver.lazoroski@gmail.com> * fix: log --------- Co-authored-by: Oliver Lazoroski <oliver.lazoroski@gmail.com> * fix: bottom sheet modal improvements * fix: use process reactions improvements for thread list * docs: docusaurus setup for v6 release (#2721) * docs: docusaurus setup for v6 release * docs: docusaurus setup for v6 release * docs: fix vale issues * docs: add v5 docs to v5 folder * chore: setup workflow and improve migration guide for v6 rc release (#2727) * fix: linting issues * featv6 rc release * feat!: v6 rc release * feat!: v6 rc release * BREAKING CHANGE: v6 rc release * fix: upgrade react native version in sample apps to 0.73.10 (#2728) * feat!: rc release v6 (#2729) * feat: styles changes for MessageActionList * feat: styles changes for MessageUserReactions * chore: fix noteKeywords in release config * feat: improve Message.tsx render conditional (#2733) BREAKING CHANGE: Update the Message.tsx conditional in the component to use ternary * feat: remove dry run mode from release config BREAKING CHANGE: Update the release config * fix: way of reading the value from animated shared values in the components (#2738) * fix: way of reading the value from animated shared values in the components * fix: unify styles to one hook * fix: lint issues * fix: upgrade the RN version in example apps to 0.75.4 (#2739) * fix: upgrade the RN version in example apps to 0.74.6 * fix: upgrade the RN version in example apps to 0.75.4 * fix: upgrade the RN version in example apps to 0.75.4 * fix: pod install issue * fix: pod install issue * fix: pod install issue * fix: pod install issue * fix: pod install issue * feat: move react native image resizer native module to the SDK (#2751) * feat: move react native image resizer to the native package natively * fix: android and ios native module * fix: add StreamChatReactNative module for ios * fix: add StreamChatReactNative module for ios and android * fix: add StreamChatReactNative module for ios and android * docs: update docs for the removal of the image resizer package * fix: tests for audio controller * fix: tests for audio controller * fix: update sample app * fix: update sample app * fix: update sample app * fix: attachment picker image picker icon visibility as per dependency * fix: changes after merge * fix: lint issues * fix: revalidate pod cache * chore: revert cache revalidation * fix: sender and receiver message theme colors * fix: sender and receiver message theme colors (#2767) * fix: upgrade op-sqlite version to be compatible with latest react native version (#2761) * fix: upgrade op-sqlite version to be compatible with latest react native version * fix: lint issues * docs: add new architecture guide docs * revert: "docs: add new architecture guide docs" This reverts commit be16a66e7759f5737b174777110eaef798922c0c. * docs: fix migration guide * fix: add back set initial state * chore: backport the polls docs to v5 too * fix: add versioned sidebar update as well * chore: upgrade sample apps to RN 0.76.1 and added new arch docs (#2756) * chore: upgrade sample apps to RN 0.76.1 * docs: add new architecture guide * docs: add new architecture guide * fix: vale issues * chore: update the sample apps * fix: poll offline fixes (#2772) * fix: message disallowed indicator display (#2754) * fix: native image picker poll control (#2762) * fix: check for channel validity before consuming config (#2760) * fix: receiverMessageBackgroundColor hotfix (#2763) * fix: receiverMessageBackgroundColor hotfix * fix: tests * chore(release): 5.41.3 [skip ci] * chore(release): 1.31.4 [skip ci] * fix: theme for the message bubble and replies (#2766) * fix: theme for the message bubble and replies * fix: theme for the message bubble and replies * fix: add null coleasing operator * fix: poll edge cases (#2768) * fix: poll related edge cases with offline storage * feat: offline db for polls wip * fix: reconcile own_votes properly * fix: all underlying offline store issues with polls * fix: properly resolve own_votes and latest_answers * fix: remove faulty poll check * chore: remove commented out code * chore: remove log * fix: multiple answers bug and remove logs * chore: remove index as we have primary key * chore(release): 5.41.4 [skip ci] * chore(release): 1.31.5 [skip ci] * fix: errors during resolving conflicts and yarn.locks * fix: pod cache revalidation * fix: lint issues --------- Co-authored-by: semantic-release-bot <semantic-release-bot@martynus.net> Co-authored-by: Khushal Agarwal <khushal.agarwal987@gmail.com> * fix: revert cache revalidation and introduce dummy change in docs to trigger build * fix: resolve lint issues once again * fix: remove channel constants - isAdmin, isOwner and isModerator * fix: offline mode channel hydration issues * fix: remove channel constants - isAdmin, isOwner and isModerator (#2778) * fix: sender and receiver message theme colors * fix: remove channel constants - isAdmin, isOwner and isModerator * fix: faulty build for sample apps * fix: update yarn.lock files to fix build * fix: android modal size * fix: race conditions on db open and close * fix: move dropTables into check as well * fix: crash in some instances of useIsChannelMuted hook invocation * fix: properly use hook in channel preview * fix: edge cases and test * fix: regex state machine stack depth crash * fix: update test * fix: channel hook regressions * fix: expo media library permissions race conditions * feat: enable moderation v2 on the sdk and sample apps * fix: listen to correct channel read events * fix: add FlatList default for Expo * feat: add support for membership customization * fix: modify deployment workflow of SampleApp so that we get a release * fix: try bumping firebase version * fix: revert FB changes and CODE_SIGN_STYLE regression * fix: PROVISIONING_PROFILE_SPECIFIER specific val * fix: certificate distribution settings * fix: upgrade bottom sheet and fix reanimated errors in new arch (#2806) * fix: upgrade bottom sheet to get rid of warnings * fix: add sample app yarn.lock as well * fix: all remnants of reanimated errors * fix: update peer dependencies * fix: channel.state break on going to background * fix: expo media library exceptions in new arch * chore: resolve conflicts from develop on v6 (#2813) * chore(release): 5.42.0 [skip ci] * chore(release): 1.31.6 [skip ci] * fix: android modal size (#2784) * fix: backport crash fix (#2787) * fix: crash in some instances of useIsChannelMuted hook invocation * fix: properly use hook in channel preview * fix: edge cases and test * chore(release): 5.42.1 [skip ci] * chore(release): 1.31.7 [skip ci] * fix: recursion depth on regex parse issue (#2790) * fix: channel hook regressions * fix: expo media library permissions race conditions * fix: listen to correct channel read events * chore(release): 5.42.2 [skip ci] * chore(release): 1.31.8 [skip ci] * feat: moderation v2 support (#2801) * feat: enable moderation v2 on the sdk and sample apps * chore: update yarn.lock files as well * feat: add support for membership customization (#2802) * feat: add support for membership customization * fix: lint issues * chore(release): 5.43.0 [skip ci] * chore(release): 1.32.0 [skip ci] * fix: channel.state break on going to background (#2809) * chore(release): 5.43.1 [skip ci] * chore(release): 1.32.1 [skip ci] * chore: resolve conflicts from develop on v6 --------- Co-authored-by: Ivan Sekovanikj <31964049+isekovanic@users.noreply.github.com> Co-authored-by: semantic-release-bot <semantic-release-bot@martynus.net> Co-authored-by: Ivan Sekovanikj <ivan.sekovanikj@getstream.io> * fix: camera roll issues * fix: refactor photo resolution to native level * fix: expo media library * fix: properly resolve videos too * chore: remove console.log * chore: update yarn.lock files for example apps * fix: bring back camera-roll to SampleApp * fix: also podfile.lock * fix: remove console.log * fix: issues with video preview * chore: remove console.log * chore: resolve conflicts from develop * feat: ai-bot integration poc (#2819) * feat: add StreamingMessageView to kick off ai feature * fix: issues with message view * feat: add AITypingIndicatorView * feat: make send message button react to ai state * fix: improve typewriter animation * fix: improvements in ui and typewriter * chore: add customizations to StreamingMessageView * fix: hook deps * chore: extract logic in hook * fix: custom events * fix: revert the type change in favor of changes in the LLC * feat: codeblock scrollable view * feat: table initial reimpl * feat: finish table impl * fix: horizontal scroll list performance issues * feat: add markdown parsing fixes, optimistic code capture and various improvements * fix: theme prop and theming in general * fix: remove edited lalbel for ai messages * fix: bug with stop streaming button and types * fix: colors in md rendering * fix: rename custom scrollview * chore: translations * fix: remove TODO * chore: extract indicator styles in theme * fix: safeguard if channel does not exist * fix: get rid of enum and introduce proper type * fix: allow only message overrides * chore: update event names as per the changes * fix: bump stream-chat-js version to v8.46.0 * fix: use channel method for sending events * fix: cover background mode case * fix: use type from LLC * chore: add jsdocs * fix: move check to checker fn * fix: add overrides for StreamingMessageView * chore: add override for stop streaming button * chore: upgrade expo sample app to expo 52 * fix: remove unnecessary android and ios permissions * chore: update yarn.lock files * refactor: remove stale subscriber count logic and types refactor (#2832) * refactor: remove stale subscriber count logic and types refactor (#2782) * fix: lint issues * feat: Message list pagination implementation using hasPrev and hasNext (#2799) * refactor: remove stale subscriber count logic and types refactor (#2782) * feat: new message list pagination implementation * fix: channel state initial data * fix: revert back the onStartReached change * fix: lint and tests * fix: added tests for the hooks and message pagination * fix: podlock file for sample app * fix: throttle logic for the copy message state * fix: add back channel.deleted event * fix: useeffect deps * fix: add theme for the bottom sheet styles and message user reactions item (#2827) * fix: refactor some of the buttons * fix: refactor context usage * fix: solve final cyclical dep * fix: add corrected app.json * fix: convert all poll buttons to pressables * fix: lint issues (that somehow passed without issues before) * chore: move add comment button to correct file * fix: move vote button to correct file too * fix: image gallery issues (#2835) * fix: infinite image loading issue * fix: image gallery animations issue * fix: remove unnecessary logs * fix: image gallery header and footer safe area view (#2840) * chore: remove disable if frozen channel (#2841) * chore: write tests for disallowed sending messages (#2839) * chore: write tests for disallowed sending messages * fix: make test name more concise * chore: remove redundant assertion * chore: add test for the editing state as well * fix: only disable message input ui when capabilities change (#2836) * chore: remove disableIfFrozenChannel prop * fix: lint issues * fix: old arch image resizer native module spec file name fix (#2842) * fix: image gallery header and footer safe area view * fix: old arch image resizer native module spec file name fix * chore: fix all of the GH workflow stuff related to v6 in prep for releasing (#2843) --------- Co-authored-by: Khushal Agarwal <khushal.agarwal987@gmail.com> Co-authored-by: semantic-release-bot <semantic-release-bot@martynus.net> Co-authored-by: Alexey Alter-Pesotskiy <alex@testableapple.com> Co-authored-by: Stream SDK Bot <60655709+Stream-SDK-Bot@users.noreply.github.com> Co-authored-by: Stream Bot <runner@fv-az1148-731.o3ts4yn1huletmfehy03vvfvxg.dx.internal.cloudapp.net> Co-authored-by: Santhosh Vaiyapuri <3846977+santhoshvai@users.noreply.github.com> Co-authored-by: Oliver Lazoroski <oliver.lazoroski@gmail.com> Co-authored-by: Stream Bot <runner@fv-az1756-392.rxb2ubmju23uthz3oztawtjyeg.dx.internal.cloudapp.net> | 1 年前 | |
feat: on the fly thumbnail generation (#3523) ## 🎯 Goal This PR adds native video thumbnail generation for local assets and wires it into the attachment flows. The rationale' behind the PR is the fact that starting RN 0.84 and onwards, `ImageBackground` can no longer reliably render `ph:///` video assets on iOS (and probably other edge cases too). Thumbnails are now generated natively on iOS and Android for local video assets coming from the attachment picker / image picker / camera flows, cached in the app cache directory, and reused if they were already generated before. The native API is batched, so we can generate multiple thumbnails in one go instead of doing them one by one. The module only handles local assets. If thumbnail generation fails for a single video, we soft fail that item only and fall back to the existing placeholder / no thumbnail UI instead of failing the whole batch. So in other words: - added native video thumbnail generation on iOS and Android under shared-native - exposed it through a new TurboModule `StreamVideoThumbnail` API - batched thumbnail generation for `getPhotos`, `pickImage`, and `takePhoto` - added deterministic cache reuse for generated thumbnails - limited concurrent native generation to avoid decode storms - made thumbnail generation best-effort per item: - native returns `{ uri, error }` per requested asset - failed items no longer fail the whole batch - restricted `thumbnail` generation for local assets only - Android: raw path, `file://`, `content://` - iOS: raw path, `file://`, `ph://` - switched attachment picker items and image upload previews away from ImageBackground to plain Image Notes - this is new architecture only - thumbnails are written to the app cache dir, so they can survive relaunches but are still disposable cache - existing cached thumbnails from the old cache folder name will not be reused ## 🛠 Implementation details <!-- Provide a description of the implementation --> ## 🎨 UI Changes <!-- Add relevant screenshots --> <details> <summary>iOS</summary> <table> <thead> <tr> <td>Before</td> <td>After</td> </tr> </thead> <tbody> <tr> <td> <!--<img src="" /> --> </td> <td> <!--<img src="" /> --> </td> </tr> </tbody> </table> </details> <details> <summary>Android</summary> <table> <thead> <tr> <td>Before</td> <td>After</td> </tr> </thead> <tbody> <tr> <td> <!--<img src="" /> --> </td> <td> <!--<img src="" /> --> </td> </tr> </tbody> </table> </details> ## 🧪 Testing <!-- Explain how this change can be tested (or why it can't be tested) --> ## ☑️ Checklist - [ ] I have signed the [Stream CLA](https://docs.google.com/forms/d/e/1FAIpQLScFKsKkAJI7mhCr7K9rEIOpqIDThrWxuvxnwUq2XkHyG154vQ/viewform) (required) - [ ] PR targets the `develop` branch - [ ] Documentation is updated - [ ] New code is tested in main example apps, including all possible scenarios - [ ] SampleApp iOS and Android - [ ] Expo iOS and Android | 6 个月前 | |
feat!: V6.0.0 (#2844) BREAKING CHANGE: v6 release * fix: remove netinfo from native handlers and add it as dev dependency of core (#2538) * fix: add expo-clipboard to peer deps of expo-package (#2537) * fix: remove netinfo from native handlers and add it as dev dependency of core * fix: lint issues * fix: revert back isMounted logic * fix: change peer dep * feat: remove usage of flatlist-mvcp in favour of mvcp support in RN >= 0.72 (#2539) * fix: add expo-clipboard to peer deps of expo-package (#2537) * feat: remove usage of flatlist-mvcp in favour of mvcp support in RN >= 0.72 * fix: remove flatlist-mvcp from example apps * chore: update peer dep of react native * fix: change quotedMessage type to MessageType or undefined (#2527) * fix: change quotedMessage type to MessageType or undefined * docs: fix lint issues * fix: change react-native-image-resizer to @bam.tech/react-native-image-resizer (#2534) * fix: reaction list reactions sorting order based on created_at * fix: show reactions using reactions_group * fix: tests * fix: useProcessReactions hook * fix: useProcessReactions hook and Channel message spread * fix: change react-native-image-resizer to @bam.tech/react-native-image-resizer * fix: remove reaction_counts from offline DB * chore: update yarn.lock files * fix: add reanimated and gesture handler as peer deps to package * fix: change old gesture handler useAnimatedGestureHandler to the new API (#2563) * feat: configure ReactionList reaction theme (#2561) * fix: expo sample app keyboardVerticalOffset for channel and thread screen * fix: change old gesture handler useAnimatedGestureHandler to the new API * feat: move react-native-quick-sqlite to op-sqlite (#2541) * feat: move react-native-quick-sqlite to op-sqlite * docs: update docs * fix: podfile changes * docs: add troubleshoot guide * fix: issues with import * fix: update yarn.lock * chore: update deps of expo messaging app * feat: use react-native-blob-util instead of the react-native-fs and make it optional dependency (#2578) * feat: use react-native-blob-util instead of the react-native-fs and make it optional dependency * chore: fix peerdeps and add dcos * fix: deps version on package.json * docs: add migration guide for v5 to v6 * docs: add migration guide for v5 to v6 * docs: add migration guide for v5 to v6 * fix: upgrade cameraroll, documentpicker, haptics feedback and image crop picker to new arch compatible version * fix: change react-native-image-crop-picker to react-native-image-picker and make it optional * docs: add migration guide * fix: make expo-image-picker optional * fix: make expo-image-picker optional * docs: apply docs changes * fix: add check for handlers in native.ts * fix: resolve conflicts from branch develop to v6 (#2621) * fix: resolve conflicts from branch develop to v6 * fix: remove cameraroll on ts messaging app * fix: remove shared folder * chore: bump vale version * chore: bump vale version * chore: update vale version * chore: resolve conflicts from develop * chore: fix vale issues * chore: fix vale issues * fix: react-native-safe-area-context ios build issue * fix: bottom sheet version * fix: remove flipper debugger * fix: issue with rn-svg on android and rn-video fabric compatibility * fix: animations usage in ImageGallery (#2627) * fix: remove rn-sqlite patch * fix: animations laginess on the ImageGallery and MessageOverlay on new architecture (#2633) * chore: resolve conflicts from develop (#2682) * fix: upgrade firebase versions to fix crash (#2646) * fix: audio recording variety bugs (#2648) * fix: variety of bugs in async audio feature * fix: upload of empty messages and console.log cleanup * fix: expo permission race conditions * fix: create pure version of stopRecording() for usage on unmount * fix: remove redundant export * fix: actually amend failing test suites * chore: remove constructors as they are not needed * fix: pr remarks * chore: write some simplistic functionality tests * chore: return class instance rather than class itself for better usability * chore: add more robust tests * fix: linter errors * fix: only display waveform whenever the mic is locked * docs: add Deep Linking guide for the chat SDK (#2651) * fix: change Block user action to Ban user action and UI cookbook for blocking users (#2649) * fix: change Block user action to Ban user action * fix: change Block user action to Ban user action * fix: add back blockUser action and deprecate it * docs: UI Cookbook for Blocking users * chore(release): 5.36.1 [skip ci] * chore(release): 1.28.1 [skip ci] * fix: issue with loading app settings when the connectUser is not called on app (#2654) * fix: issue with loading app settings when the connectUser is not called on app * fix: add comments * fix: add comments * fix: unable to upload file due to special characters in the file name (#2656) * fix: sdk size pr (#2657) * [CI] Update SDK Size (#2653) Co-authored-by: Khushal Agarwal <khushal.agarwal987@gmail.com> Co-authored-by: Stream Bot <runner@fv-az1148-731.o3ts4yn1huletmfehy03vvfvxg.dx.internal.cloudapp.net> * chore(release): 5.36.2 [skip ci] * chore(release): 1.28.2 [skip ci] * feat: add live location sharing cookbook (#2659) * feat: add live location ui cookbook * fix: prettier lint * Update docusaurus/docs/reactnative/guides/live-location-sharing.mdx Co-authored-by: Oliver Lazoroski <oliver.lazoroski@gmail.com> * lint fixes * fix lint issues * fix locks * move to ruby 3.1 and greater --------- Co-authored-by: Oliver Lazoroski <oliver.lazoroski@gmail.com> * chore(release): 5.37.0 [skip ci] * chore(release): 1.29.0 [skip ci] * fix: avoid prepending http before native supported url schemes (#2661) * fix: avoid prepending http before native supported url schemes * fix: move check to link parsing module * fix: bad memoisation in window, screen dimension listener hooks (#2664) * fix: bad memoisation in window, screen dimension listener hooks * remove unused variable * feat: add create chat client hook for easy usage (#2660) * feat: add create chat client hook for easy usage * docs: use useCreateChatClient hook for client creation * fix: bump fastlane plugin version (#2665) * fix: add theme properties for EmptyStateIndicator for message list (#2667) * fix: add theme properties for EmptyStateIndicator for message list * fix: update snapshots * fix: apply card cover theme property order * fix: pagination typescript errors and db synchronization bugs (#2669) * fix: pagination typescript errors and db synchronization bugs * chore: write test for db serialization issue * fix: linter issues * [CI] Bump max tolerance for sdk size analysis (#2674) * chore: bump sample app version to v1.30.0 * fix: remove nin and ne operator usage in the SDK and the sample app (#2672) * fix: remove and operator usage in the SDK and the sample app * fix: remove console log * fix: change console log to warn * fix: add improvemnts * fix: import of debouncefunc * fix: import of debouncefunc * fix: restructure queryMembers, queryUsers and ACItriggersettings * fix: error bubbling for suggestions in auto complete input * fix: request image access permissions for iOS only for native image picking (#2677) * fix: properly resolve sendMessage during memoization (#2675) * fix: properly resolve sendMessage during memoization * fix: remedy change so that it does not cause performance issues * chore: revert sendMessage in the dep array * fix: deprecate messageReactions prop and use isMessageActionsVisible instead for messageActions (#2676) * fix: deprecate messageReactions prop and use isMessageActionsVisible instead for messageActions * docs: fix custom message actions * fix: execution logic for showMessageOverlay * chore(release): 5.38.0 [skip ci] * chore(release): 1.29.1 [skip ci] * fix: update yarn.lock for the project (#2681) * fix: copy message action type for message actions (#2679) * chore: update sdk size (#2678) Co-authored-by: Khushal Agarwal <khushal.agarwal987@gmail.com> Co-authored-by: Stream Bot <runner@fv-az1756-392.rxb2ubmju23uthz3oztawtjyeg.dx.internal.cloudapp.net> * chore: resolve conflicts from develop * fix: vale lint issues * fix: new arch project config --------- Co-authored-by: Ivan Sekovanikj <31964049+isekovanic@users.noreply.github.com> Co-authored-by: semantic-release-bot <semantic-release-bot@martynus.net> Co-authored-by: Alexey Alter-Pesotskiy <alex@testableapple.com> Co-authored-by: Stream SDK Bot <60655709+Stream-SDK-Bot@users.noreply.github.com> Co-authored-by: Stream Bot <runner@fv-az1148-731.o3ts4yn1huletmfehy03vvfvxg.dx.internal.cloudapp.net> Co-authored-by: Santhosh Vaiyapuri <3846977+santhoshvai@users.noreply.github.com> Co-authored-by: Oliver Lazoroski <oliver.lazoroski@gmail.com> Co-authored-by: Ivan Sekovanikj <ivan.sekovanikj@getstream.io> Co-authored-by: Stream Bot <runner@fv-az1756-392.rxb2ubmju23uthz3oztawtjyeg.dx.internal.cloudapp.net> * fix: chat.test.ts * chore: cleanup v3 docs setup and e2e tests from project (#2701) * feat: add new message action list and reaction selector UI (#2686) * feat: remove StreamChatRN in favour of a global context ChatConfigContext that allows providing global values (#2703) * fix: remove deprecated code from v6 branch (#2702) * fix: remove deprecated code from v6 branch * fix: remove deprecated code from v6 branch * docs: add deprecated docs * docs: add deprecated docs * chore: resolve conflicts from base branch * docs: improve deprecated docs * chore: resolve conflicts from develop * feat: new reaction list design and improvements to MessageSimple component (#2700) * feat: add new message action list and reaction selector UI * fix: remove unnecessary props from OverlayContext * docs: add comments for the props * tests: add tests for the components * tests: add tests for the components * fix: chat.test.ts * fix: chat.test.ts * fix: add tests for the code * fix: use rn animated to create new modal and add docs * fix: add opacity for the message action list item when pressed * fix: make modal better and change component names * fix: update test snapdhots * docs: message actions customizations * docs: message actions customizations * fix: theme improvements * fix: message component render improvements * docs: update migration guide * feat: new reaction list design and improvements to MessageSimple component * tests: add tests for the components * docs: reaction list new design docs * docs: add changes to migration guide * docs: add changes to migration guide * docs: add changes to migration guide * chore: resolve conflicts from base branch * chore: resolve conflicts from base branch * fix: sample app overlay backdrop bug * fix: reaction list type * feat: add FlatList for Reaction Picker * feat: add FlatList for Reaction Picker * feat: add FlatList for Reaction Picker * fix: circular dependency issue * fix: upgrade expo to latest in expo messaging app * fix: padding for reaction picker * fix: update dependencies for native cli apps * fix: add Flatlist mvcp as optional package and peer deps versions (#2720) * fix: add Flatlist mvcp as optional package and peer deps versions * fix: add Flatlist mvcp as optional package and peer deps versions * docs: fix native handler docs * docs: fix vale issues * docs: remove native handler docs * fix: lint issues * fix: design issues with ReactionList bottom UI (#2717) * fix: design issues with ReactionList bottom UI * fix: vale issues * fix: add a log that complains for removal for mvcp package on RN version <0.72 (#2724) * fix: add a log that complains for removal for mvcp package on RN version <0.72 * fix: add a log that complains for removal for mvcp package on RN version <0.72 * fix: build issues * fix: add variable under the if block Co-authored-by: Oliver Lazoroski <oliver.lazoroski@gmail.com> * fix: log --------- Co-authored-by: Oliver Lazoroski <oliver.lazoroski@gmail.com> * fix: bottom sheet modal improvements * fix: use process reactions improvements for thread list * docs: docusaurus setup for v6 release (#2721) * docs: docusaurus setup for v6 release * docs: docusaurus setup for v6 release * docs: fix vale issues * docs: add v5 docs to v5 folder * chore: setup workflow and improve migration guide for v6 rc release (#2727) * fix: linting issues * featv6 rc release * feat!: v6 rc release * feat!: v6 rc release * BREAKING CHANGE: v6 rc release * fix: upgrade react native version in sample apps to 0.73.10 (#2728) * feat!: rc release v6 (#2729) * feat: styles changes for MessageActionList * feat: styles changes for MessageUserReactions * chore: fix noteKeywords in release config * feat: improve Message.tsx render conditional (#2733) BREAKING CHANGE: Update the Message.tsx conditional in the component to use ternary * feat: remove dry run mode from release config BREAKING CHANGE: Update the release config * fix: way of reading the value from animated shared values in the components (#2738) * fix: way of reading the value from animated shared values in the components * fix: unify styles to one hook * fix: lint issues * fix: upgrade the RN version in example apps to 0.75.4 (#2739) * fix: upgrade the RN version in example apps to 0.74.6 * fix: upgrade the RN version in example apps to 0.75.4 * fix: upgrade the RN version in example apps to 0.75.4 * fix: pod install issue * fix: pod install issue * fix: pod install issue * fix: pod install issue * fix: pod install issue * feat: move react native image resizer native module to the SDK (#2751) * feat: move react native image resizer to the native package natively * fix: android and ios native module * fix: add StreamChatReactNative module for ios * fix: add StreamChatReactNative module for ios and android * fix: add StreamChatReactNative module for ios and android * docs: update docs for the removal of the image resizer package * fix: tests for audio controller * fix: tests for audio controller * fix: update sample app * fix: update sample app * fix: update sample app * fix: attachment picker image picker icon visibility as per dependency * fix: changes after merge * fix: lint issues * fix: revalidate pod cache * chore: revert cache revalidation * fix: sender and receiver message theme colors * fix: sender and receiver message theme colors (#2767) * fix: upgrade op-sqlite version to be compatible with latest react native version (#2761) * fix: upgrade op-sqlite version to be compatible with latest react native version * fix: lint issues * docs: add new architecture guide docs * revert: "docs: add new architecture guide docs" This reverts commit be16a66e7759f5737b174777110eaef798922c0c. * docs: fix migration guide * fix: add back set initial state * chore: backport the polls docs to v5 too * fix: add versioned sidebar update as well * chore: upgrade sample apps to RN 0.76.1 and added new arch docs (#2756) * chore: upgrade sample apps to RN 0.76.1 * docs: add new architecture guide * docs: add new architecture guide * fix: vale issues * chore: update the sample apps * fix: poll offline fixes (#2772) * fix: message disallowed indicator display (#2754) * fix: native image picker poll control (#2762) * fix: check for channel validity before consuming config (#2760) * fix: receiverMessageBackgroundColor hotfix (#2763) * fix: receiverMessageBackgroundColor hotfix * fix: tests * chore(release): 5.41.3 [skip ci] * chore(release): 1.31.4 [skip ci] * fix: theme for the message bubble and replies (#2766) * fix: theme for the message bubble and replies * fix: theme for the message bubble and replies * fix: add null coleasing operator * fix: poll edge cases (#2768) * fix: poll related edge cases with offline storage * feat: offline db for polls wip * fix: reconcile own_votes properly * fix: all underlying offline store issues with polls * fix: properly resolve own_votes and latest_answers * fix: remove faulty poll check * chore: remove commented out code * chore: remove log * fix: multiple answers bug and remove logs * chore: remove index as we have primary key * chore(release): 5.41.4 [skip ci] * chore(release): 1.31.5 [skip ci] * fix: errors during resolving conflicts and yarn.locks * fix: pod cache revalidation * fix: lint issues --------- Co-authored-by: semantic-release-bot <semantic-release-bot@martynus.net> Co-authored-by: Khushal Agarwal <khushal.agarwal987@gmail.com> * fix: revert cache revalidation and introduce dummy change in docs to trigger build * fix: resolve lint issues once again * fix: remove channel constants - isAdmin, isOwner and isModerator * fix: offline mode channel hydration issues * fix: remove channel constants - isAdmin, isOwner and isModerator (#2778) * fix: sender and receiver message theme colors * fix: remove channel constants - isAdmin, isOwner and isModerator * fix: faulty build for sample apps * fix: update yarn.lock files to fix build * fix: android modal size * fix: race conditions on db open and close * fix: move dropTables into check as well * fix: crash in some instances of useIsChannelMuted hook invocation * fix: properly use hook in channel preview * fix: edge cases and test * fix: regex state machine stack depth crash * fix: update test * fix: channel hook regressions * fix: expo media library permissions race conditions * feat: enable moderation v2 on the sdk and sample apps * fix: listen to correct channel read events * fix: add FlatList default for Expo * feat: add support for membership customization * fix: modify deployment workflow of SampleApp so that we get a release * fix: try bumping firebase version * fix: revert FB changes and CODE_SIGN_STYLE regression * fix: PROVISIONING_PROFILE_SPECIFIER specific val * fix: certificate distribution settings * fix: upgrade bottom sheet and fix reanimated errors in new arch (#2806) * fix: upgrade bottom sheet to get rid of warnings * fix: add sample app yarn.lock as well * fix: all remnants of reanimated errors * fix: update peer dependencies * fix: channel.state break on going to background * fix: expo media library exceptions in new arch * chore: resolve conflicts from develop on v6 (#2813) * chore(release): 5.42.0 [skip ci] * chore(release): 1.31.6 [skip ci] * fix: android modal size (#2784) * fix: backport crash fix (#2787) * fix: crash in some instances of useIsChannelMuted hook invocation * fix: properly use hook in channel preview * fix: edge cases and test * chore(release): 5.42.1 [skip ci] * chore(release): 1.31.7 [skip ci] * fix: recursion depth on regex parse issue (#2790) * fix: channel hook regressions * fix: expo media library permissions race conditions * fix: listen to correct channel read events * chore(release): 5.42.2 [skip ci] * chore(release): 1.31.8 [skip ci] * feat: moderation v2 support (#2801) * feat: enable moderation v2 on the sdk and sample apps * chore: update yarn.lock files as well * feat: add support for membership customization (#2802) * feat: add support for membership customization * fix: lint issues * chore(release): 5.43.0 [skip ci] * chore(release): 1.32.0 [skip ci] * fix: channel.state break on going to background (#2809) * chore(release): 5.43.1 [skip ci] * chore(release): 1.32.1 [skip ci] * chore: resolve conflicts from develop on v6 --------- Co-authored-by: Ivan Sekovanikj <31964049+isekovanic@users.noreply.github.com> Co-authored-by: semantic-release-bot <semantic-release-bot@martynus.net> Co-authored-by: Ivan Sekovanikj <ivan.sekovanikj@getstream.io> * fix: camera roll issues * fix: refactor photo resolution to native level * fix: expo media library * fix: properly resolve videos too * chore: remove console.log * chore: update yarn.lock files for example apps * fix: bring back camera-roll to SampleApp * fix: also podfile.lock * fix: remove console.log * fix: issues with video preview * chore: remove console.log * chore: resolve conflicts from develop * feat: ai-bot integration poc (#2819) * feat: add StreamingMessageView to kick off ai feature * fix: issues with message view * feat: add AITypingIndicatorView * feat: make send message button react to ai state * fix: improve typewriter animation * fix: improvements in ui and typewriter * chore: add customizations to StreamingMessageView * fix: hook deps * chore: extract logic in hook * fix: custom events * fix: revert the type change in favor of changes in the LLC * feat: codeblock scrollable view * feat: table initial reimpl * feat: finish table impl * fix: horizontal scroll list performance issues * feat: add markdown parsing fixes, optimistic code capture and various improvements * fix: theme prop and theming in general * fix: remove edited lalbel for ai messages * fix: bug with stop streaming button and types * fix: colors in md rendering * fix: rename custom scrollview * chore: translations * fix: remove TODO * chore: extract indicator styles in theme * fix: safeguard if channel does not exist * fix: get rid of enum and introduce proper type * fix: allow only message overrides * chore: update event names as per the changes * fix: bump stream-chat-js version to v8.46.0 * fix: use channel method for sending events * fix: cover background mode case * fix: use type from LLC * chore: add jsdocs * fix: move check to checker fn * fix: add overrides for StreamingMessageView * chore: add override for stop streaming button * chore: upgrade expo sample app to expo 52 * fix: remove unnecessary android and ios permissions * chore: update yarn.lock files * refactor: remove stale subscriber count logic and types refactor (#2832) * refactor: remove stale subscriber count logic and types refactor (#2782) * fix: lint issues * feat: Message list pagination implementation using hasPrev and hasNext (#2799) * refactor: remove stale subscriber count logic and types refactor (#2782) * feat: new message list pagination implementation * fix: channel state initial data * fix: revert back the onStartReached change * fix: lint and tests * fix: added tests for the hooks and message pagination * fix: podlock file for sample app * fix: throttle logic for the copy message state * fix: add back channel.deleted event * fix: useeffect deps * fix: add theme for the bottom sheet styles and message user reactions item (#2827) * fix: refactor some of the buttons * fix: refactor context usage * fix: solve final cyclical dep * fix: add corrected app.json * fix: convert all poll buttons to pressables * fix: lint issues (that somehow passed without issues before) * chore: move add comment button to correct file * fix: move vote button to correct file too * fix: image gallery issues (#2835) * fix: infinite image loading issue * fix: image gallery animations issue * fix: remove unnecessary logs * fix: image gallery header and footer safe area view (#2840) * chore: remove disable if frozen channel (#2841) * chore: write tests for disallowed sending messages (#2839) * chore: write tests for disallowed sending messages * fix: make test name more concise * chore: remove redundant assertion * chore: add test for the editing state as well * fix: only disable message input ui when capabilities change (#2836) * chore: remove disableIfFrozenChannel prop * fix: lint issues * fix: old arch image resizer native module spec file name fix (#2842) * fix: image gallery header and footer safe area view * fix: old arch image resizer native module spec file name fix * chore: fix all of the GH workflow stuff related to v6 in prep for releasing (#2843) --------- Co-authored-by: Khushal Agarwal <khushal.agarwal987@gmail.com> Co-authored-by: semantic-release-bot <semantic-release-bot@martynus.net> Co-authored-by: Alexey Alter-Pesotskiy <alex@testableapple.com> Co-authored-by: Stream SDK Bot <60655709+Stream-SDK-Bot@users.noreply.github.com> Co-authored-by: Stream Bot <runner@fv-az1148-731.o3ts4yn1huletmfehy03vvfvxg.dx.internal.cloudapp.net> Co-authored-by: Santhosh Vaiyapuri <3846977+santhoshvai@users.noreply.github.com> Co-authored-by: Oliver Lazoroski <oliver.lazoroski@gmail.com> Co-authored-by: Stream Bot <runner@fv-az1756-392.rxb2ubmju23uthz3oztawtjyeg.dx.internal.cloudapp.net> | 1 年前 | |
feat: on the fly thumbnail generation (#3523) ## 🎯 Goal This PR adds native video thumbnail generation for local assets and wires it into the attachment flows. The rationale' behind the PR is the fact that starting RN 0.84 and onwards, `ImageBackground` can no longer reliably render `ph:///` video assets on iOS (and probably other edge cases too). Thumbnails are now generated natively on iOS and Android for local video assets coming from the attachment picker / image picker / camera flows, cached in the app cache directory, and reused if they were already generated before. The native API is batched, so we can generate multiple thumbnails in one go instead of doing them one by one. The module only handles local assets. If thumbnail generation fails for a single video, we soft fail that item only and fall back to the existing placeholder / no thumbnail UI instead of failing the whole batch. So in other words: - added native video thumbnail generation on iOS and Android under shared-native - exposed it through a new TurboModule `StreamVideoThumbnail` API - batched thumbnail generation for `getPhotos`, `pickImage`, and `takePhoto` - added deterministic cache reuse for generated thumbnails - limited concurrent native generation to avoid decode storms - made thumbnail generation best-effort per item: - native returns `{ uri, error }` per requested asset - failed items no longer fail the whole batch - restricted `thumbnail` generation for local assets only - Android: raw path, `file://`, `content://` - iOS: raw path, `file://`, `ph://` - switched attachment picker items and image upload previews away from ImageBackground to plain Image Notes - this is new architecture only - thumbnails are written to the app cache dir, so they can survive relaunches but are still disposable cache - existing cached thumbnails from the old cache folder name will not be reused ## 🛠 Implementation details <!-- Provide a description of the implementation --> ## 🎨 UI Changes <!-- Add relevant screenshots --> <details> <summary>iOS</summary> <table> <thead> <tr> <td>Before</td> <td>After</td> </tr> </thead> <tbody> <tr> <td> <!--<img src="" /> --> </td> <td> <!--<img src="" /> --> </td> </tr> </tbody> </table> </details> <details> <summary>Android</summary> <table> <thead> <tr> <td>Before</td> <td>After</td> </tr> </thead> <tbody> <tr> <td> <!--<img src="" /> --> </td> <td> <!--<img src="" /> --> </td> </tr> </tbody> </table> </details> ## 🧪 Testing <!-- Explain how this change can be tested (or why it can't be tested) --> ## ☑️ Checklist - [ ] I have signed the [Stream CLA](https://docs.google.com/forms/d/e/1FAIpQLScFKsKkAJI7mhCr7K9rEIOpqIDThrWxuvxnwUq2XkHyG154vQ/viewform) (required) - [ ] PR targets the `develop` branch - [ ] Documentation is updated - [ ] New code is tested in main example apps, including all possible scenarios - [ ] SampleApp iOS and Android - [ ] Expo iOS and Android | 6 个月前 | |
feat!: V6.0.0 (#2844) BREAKING CHANGE: v6 release * fix: remove netinfo from native handlers and add it as dev dependency of core (#2538) * fix: add expo-clipboard to peer deps of expo-package (#2537) * fix: remove netinfo from native handlers and add it as dev dependency of core * fix: lint issues * fix: revert back isMounted logic * fix: change peer dep * feat: remove usage of flatlist-mvcp in favour of mvcp support in RN >= 0.72 (#2539) * fix: add expo-clipboard to peer deps of expo-package (#2537) * feat: remove usage of flatlist-mvcp in favour of mvcp support in RN >= 0.72 * fix: remove flatlist-mvcp from example apps * chore: update peer dep of react native * fix: change quotedMessage type to MessageType or undefined (#2527) * fix: change quotedMessage type to MessageType or undefined * docs: fix lint issues * fix: change react-native-image-resizer to @bam.tech/react-native-image-resizer (#2534) * fix: reaction list reactions sorting order based on created_at * fix: show reactions using reactions_group * fix: tests * fix: useProcessReactions hook * fix: useProcessReactions hook and Channel message spread * fix: change react-native-image-resizer to @bam.tech/react-native-image-resizer * fix: remove reaction_counts from offline DB * chore: update yarn.lock files * fix: add reanimated and gesture handler as peer deps to package * fix: change old gesture handler useAnimatedGestureHandler to the new API (#2563) * feat: configure ReactionList reaction theme (#2561) * fix: expo sample app keyboardVerticalOffset for channel and thread screen * fix: change old gesture handler useAnimatedGestureHandler to the new API * feat: move react-native-quick-sqlite to op-sqlite (#2541) * feat: move react-native-quick-sqlite to op-sqlite * docs: update docs * fix: podfile changes * docs: add troubleshoot guide * fix: issues with import * fix: update yarn.lock * chore: update deps of expo messaging app * feat: use react-native-blob-util instead of the react-native-fs and make it optional dependency (#2578) * feat: use react-native-blob-util instead of the react-native-fs and make it optional dependency * chore: fix peerdeps and add dcos * fix: deps version on package.json * docs: add migration guide for v5 to v6 * docs: add migration guide for v5 to v6 * docs: add migration guide for v5 to v6 * fix: upgrade cameraroll, documentpicker, haptics feedback and image crop picker to new arch compatible version * fix: change react-native-image-crop-picker to react-native-image-picker and make it optional * docs: add migration guide * fix: make expo-image-picker optional * fix: make expo-image-picker optional * docs: apply docs changes * fix: add check for handlers in native.ts * fix: resolve conflicts from branch develop to v6 (#2621) * fix: resolve conflicts from branch develop to v6 * fix: remove cameraroll on ts messaging app * fix: remove shared folder * chore: bump vale version * chore: bump vale version * chore: update vale version * chore: resolve conflicts from develop * chore: fix vale issues * chore: fix vale issues * fix: react-native-safe-area-context ios build issue * fix: bottom sheet version * fix: remove flipper debugger * fix: issue with rn-svg on android and rn-video fabric compatibility * fix: animations usage in ImageGallery (#2627) * fix: remove rn-sqlite patch * fix: animations laginess on the ImageGallery and MessageOverlay on new architecture (#2633) * chore: resolve conflicts from develop (#2682) * fix: upgrade firebase versions to fix crash (#2646) * fix: audio recording variety bugs (#2648) * fix: variety of bugs in async audio feature * fix: upload of empty messages and console.log cleanup * fix: expo permission race conditions * fix: create pure version of stopRecording() for usage on unmount * fix: remove redundant export * fix: actually amend failing test suites * chore: remove constructors as they are not needed * fix: pr remarks * chore: write some simplistic functionality tests * chore: return class instance rather than class itself for better usability * chore: add more robust tests * fix: linter errors * fix: only display waveform whenever the mic is locked * docs: add Deep Linking guide for the chat SDK (#2651) * fix: change Block user action to Ban user action and UI cookbook for blocking users (#2649) * fix: change Block user action to Ban user action * fix: change Block user action to Ban user action * fix: add back blockUser action and deprecate it * docs: UI Cookbook for Blocking users * chore(release): 5.36.1 [skip ci] * chore(release): 1.28.1 [skip ci] * fix: issue with loading app settings when the connectUser is not called on app (#2654) * fix: issue with loading app settings when the connectUser is not called on app * fix: add comments * fix: add comments * fix: unable to upload file due to special characters in the file name (#2656) * fix: sdk size pr (#2657) * [CI] Update SDK Size (#2653) Co-authored-by: Khushal Agarwal <khushal.agarwal987@gmail.com> Co-authored-by: Stream Bot <runner@fv-az1148-731.o3ts4yn1huletmfehy03vvfvxg.dx.internal.cloudapp.net> * chore(release): 5.36.2 [skip ci] * chore(release): 1.28.2 [skip ci] * feat: add live location sharing cookbook (#2659) * feat: add live location ui cookbook * fix: prettier lint * Update docusaurus/docs/reactnative/guides/live-location-sharing.mdx Co-authored-by: Oliver Lazoroski <oliver.lazoroski@gmail.com> * lint fixes * fix lint issues * fix locks * move to ruby 3.1 and greater --------- Co-authored-by: Oliver Lazoroski <oliver.lazoroski@gmail.com> * chore(release): 5.37.0 [skip ci] * chore(release): 1.29.0 [skip ci] * fix: avoid prepending http before native supported url schemes (#2661) * fix: avoid prepending http before native supported url schemes * fix: move check to link parsing module * fix: bad memoisation in window, screen dimension listener hooks (#2664) * fix: bad memoisation in window, screen dimension listener hooks * remove unused variable * feat: add create chat client hook for easy usage (#2660) * feat: add create chat client hook for easy usage * docs: use useCreateChatClient hook for client creation * fix: bump fastlane plugin version (#2665) * fix: add theme properties for EmptyStateIndicator for message list (#2667) * fix: add theme properties for EmptyStateIndicator for message list * fix: update snapshots * fix: apply card cover theme property order * fix: pagination typescript errors and db synchronization bugs (#2669) * fix: pagination typescript errors and db synchronization bugs * chore: write test for db serialization issue * fix: linter issues * [CI] Bump max tolerance for sdk size analysis (#2674) * chore: bump sample app version to v1.30.0 * fix: remove nin and ne operator usage in the SDK and the sample app (#2672) * fix: remove and operator usage in the SDK and the sample app * fix: remove console log * fix: change console log to warn * fix: add improvemnts * fix: import of debouncefunc * fix: import of debouncefunc * fix: restructure queryMembers, queryUsers and ACItriggersettings * fix: error bubbling for suggestions in auto complete input * fix: request image access permissions for iOS only for native image picking (#2677) * fix: properly resolve sendMessage during memoization (#2675) * fix: properly resolve sendMessage during memoization * fix: remedy change so that it does not cause performance issues * chore: revert sendMessage in the dep array * fix: deprecate messageReactions prop and use isMessageActionsVisible instead for messageActions (#2676) * fix: deprecate messageReactions prop and use isMessageActionsVisible instead for messageActions * docs: fix custom message actions * fix: execution logic for showMessageOverlay * chore(release): 5.38.0 [skip ci] * chore(release): 1.29.1 [skip ci] * fix: update yarn.lock for the project (#2681) * fix: copy message action type for message actions (#2679) * chore: update sdk size (#2678) Co-authored-by: Khushal Agarwal <khushal.agarwal987@gmail.com> Co-authored-by: Stream Bot <runner@fv-az1756-392.rxb2ubmju23uthz3oztawtjyeg.dx.internal.cloudapp.net> * chore: resolve conflicts from develop * fix: vale lint issues * fix: new arch project config --------- Co-authored-by: Ivan Sekovanikj <31964049+isekovanic@users.noreply.github.com> Co-authored-by: semantic-release-bot <semantic-release-bot@martynus.net> Co-authored-by: Alexey Alter-Pesotskiy <alex@testableapple.com> Co-authored-by: Stream SDK Bot <60655709+Stream-SDK-Bot@users.noreply.github.com> Co-authored-by: Stream Bot <runner@fv-az1148-731.o3ts4yn1huletmfehy03vvfvxg.dx.internal.cloudapp.net> Co-authored-by: Santhosh Vaiyapuri <3846977+santhoshvai@users.noreply.github.com> Co-authored-by: Oliver Lazoroski <oliver.lazoroski@gmail.com> Co-authored-by: Ivan Sekovanikj <ivan.sekovanikj@getstream.io> Co-authored-by: Stream Bot <runner@fv-az1756-392.rxb2ubmju23uthz3oztawtjyeg.dx.internal.cloudapp.net> * fix: chat.test.ts * chore: cleanup v3 docs setup and e2e tests from project (#2701) * feat: add new message action list and reaction selector UI (#2686) * feat: remove StreamChatRN in favour of a global context ChatConfigContext that allows providing global values (#2703) * fix: remove deprecated code from v6 branch (#2702) * fix: remove deprecated code from v6 branch * fix: remove deprecated code from v6 branch * docs: add deprecated docs * docs: add deprecated docs * chore: resolve conflicts from base branch * docs: improve deprecated docs * chore: resolve conflicts from develop * feat: new reaction list design and improvements to MessageSimple component (#2700) * feat: add new message action list and reaction selector UI * fix: remove unnecessary props from OverlayContext * docs: add comments for the props * tests: add tests for the components * tests: add tests for the components * fix: chat.test.ts * fix: chat.test.ts * fix: add tests for the code * fix: use rn animated to create new modal and add docs * fix: add opacity for the message action list item when pressed * fix: make modal better and change component names * fix: update test snapdhots * docs: message actions customizations * docs: message actions customizations * fix: theme improvements * fix: message component render improvements * docs: update migration guide * feat: new reaction list design and improvements to MessageSimple component * tests: add tests for the components * docs: reaction list new design docs * docs: add changes to migration guide * docs: add changes to migration guide * docs: add changes to migration guide * chore: resolve conflicts from base branch * chore: resolve conflicts from base branch * fix: sample app overlay backdrop bug * fix: reaction list type * feat: add FlatList for Reaction Picker * feat: add FlatList for Reaction Picker * feat: add FlatList for Reaction Picker * fix: circular dependency issue * fix: upgrade expo to latest in expo messaging app * fix: padding for reaction picker * fix: update dependencies for native cli apps * fix: add Flatlist mvcp as optional package and peer deps versions (#2720) * fix: add Flatlist mvcp as optional package and peer deps versions * fix: add Flatlist mvcp as optional package and peer deps versions * docs: fix native handler docs * docs: fix vale issues * docs: remove native handler docs * fix: lint issues * fix: design issues with ReactionList bottom UI (#2717) * fix: design issues with ReactionList bottom UI * fix: vale issues * fix: add a log that complains for removal for mvcp package on RN version <0.72 (#2724) * fix: add a log that complains for removal for mvcp package on RN version <0.72 * fix: add a log that complains for removal for mvcp package on RN version <0.72 * fix: build issues * fix: add variable under the if block Co-authored-by: Oliver Lazoroski <oliver.lazoroski@gmail.com> * fix: log --------- Co-authored-by: Oliver Lazoroski <oliver.lazoroski@gmail.com> * fix: bottom sheet modal improvements * fix: use process reactions improvements for thread list * docs: docusaurus setup for v6 release (#2721) * docs: docusaurus setup for v6 release * docs: docusaurus setup for v6 release * docs: fix vale issues * docs: add v5 docs to v5 folder * chore: setup workflow and improve migration guide for v6 rc release (#2727) * fix: linting issues * featv6 rc release * feat!: v6 rc release * feat!: v6 rc release * BREAKING CHANGE: v6 rc release * fix: upgrade react native version in sample apps to 0.73.10 (#2728) * feat!: rc release v6 (#2729) * feat: styles changes for MessageActionList * feat: styles changes for MessageUserReactions * chore: fix noteKeywords in release config * feat: improve Message.tsx render conditional (#2733) BREAKING CHANGE: Update the Message.tsx conditional in the component to use ternary * feat: remove dry run mode from release config BREAKING CHANGE: Update the release config * fix: way of reading the value from animated shared values in the components (#2738) * fix: way of reading the value from animated shared values in the components * fix: unify styles to one hook * fix: lint issues * fix: upgrade the RN version in example apps to 0.75.4 (#2739) * fix: upgrade the RN version in example apps to 0.74.6 * fix: upgrade the RN version in example apps to 0.75.4 * fix: upgrade the RN version in example apps to 0.75.4 * fix: pod install issue * fix: pod install issue * fix: pod install issue * fix: pod install issue * fix: pod install issue * feat: move react native image resizer native module to the SDK (#2751) * feat: move react native image resizer to the native package natively * fix: android and ios native module * fix: add StreamChatReactNative module for ios * fix: add StreamChatReactNative module for ios and android * fix: add StreamChatReactNative module for ios and android * docs: update docs for the removal of the image resizer package * fix: tests for audio controller * fix: tests for audio controller * fix: update sample app * fix: update sample app * fix: update sample app * fix: attachment picker image picker icon visibility as per dependency * fix: changes after merge * fix: lint issues * fix: revalidate pod cache * chore: revert cache revalidation * fix: sender and receiver message theme colors * fix: sender and receiver message theme colors (#2767) * fix: upgrade op-sqlite version to be compatible with latest react native version (#2761) * fix: upgrade op-sqlite version to be compatible with latest react native version * fix: lint issues * docs: add new architecture guide docs * revert: "docs: add new architecture guide docs" This reverts commit be16a66e7759f5737b174777110eaef798922c0c. * docs: fix migration guide * fix: add back set initial state * chore: backport the polls docs to v5 too * fix: add versioned sidebar update as well * chore: upgrade sample apps to RN 0.76.1 and added new arch docs (#2756) * chore: upgrade sample apps to RN 0.76.1 * docs: add new architecture guide * docs: add new architecture guide * fix: vale issues * chore: update the sample apps * fix: poll offline fixes (#2772) * fix: message disallowed indicator display (#2754) * fix: native image picker poll control (#2762) * fix: check for channel validity before consuming config (#2760) * fix: receiverMessageBackgroundColor hotfix (#2763) * fix: receiverMessageBackgroundColor hotfix * fix: tests * chore(release): 5.41.3 [skip ci] * chore(release): 1.31.4 [skip ci] * fix: theme for the message bubble and replies (#2766) * fix: theme for the message bubble and replies * fix: theme for the message bubble and replies * fix: add null coleasing operator * fix: poll edge cases (#2768) * fix: poll related edge cases with offline storage * feat: offline db for polls wip * fix: reconcile own_votes properly * fix: all underlying offline store issues with polls * fix: properly resolve own_votes and latest_answers * fix: remove faulty poll check * chore: remove commented out code * chore: remove log * fix: multiple answers bug and remove logs * chore: remove index as we have primary key * chore(release): 5.41.4 [skip ci] * chore(release): 1.31.5 [skip ci] * fix: errors during resolving conflicts and yarn.locks * fix: pod cache revalidation * fix: lint issues --------- Co-authored-by: semantic-release-bot <semantic-release-bot@martynus.net> Co-authored-by: Khushal Agarwal <khushal.agarwal987@gmail.com> * fix: revert cache revalidation and introduce dummy change in docs to trigger build * fix: resolve lint issues once again * fix: remove channel constants - isAdmin, isOwner and isModerator * fix: offline mode channel hydration issues * fix: remove channel constants - isAdmin, isOwner and isModerator (#2778) * fix: sender and receiver message theme colors * fix: remove channel constants - isAdmin, isOwner and isModerator * fix: faulty build for sample apps * fix: update yarn.lock files to fix build * fix: android modal size * fix: race conditions on db open and close * fix: move dropTables into check as well * fix: crash in some instances of useIsChannelMuted hook invocation * fix: properly use hook in channel preview * fix: edge cases and test * fix: regex state machine stack depth crash * fix: update test * fix: channel hook regressions * fix: expo media library permissions race conditions * feat: enable moderation v2 on the sdk and sample apps * fix: listen to correct channel read events * fix: add FlatList default for Expo * feat: add support for membership customization * fix: modify deployment workflow of SampleApp so that we get a release * fix: try bumping firebase version * fix: revert FB changes and CODE_SIGN_STYLE regression * fix: PROVISIONING_PROFILE_SPECIFIER specific val * fix: certificate distribution settings * fix: upgrade bottom sheet and fix reanimated errors in new arch (#2806) * fix: upgrade bottom sheet to get rid of warnings * fix: add sample app yarn.lock as well * fix: all remnants of reanimated errors * fix: update peer dependencies * fix: channel.state break on going to background * fix: expo media library exceptions in new arch * chore: resolve conflicts from develop on v6 (#2813) * chore(release): 5.42.0 [skip ci] * chore(release): 1.31.6 [skip ci] * fix: android modal size (#2784) * fix: backport crash fix (#2787) * fix: crash in some instances of useIsChannelMuted hook invocation * fix: properly use hook in channel preview * fix: edge cases and test * chore(release): 5.42.1 [skip ci] * chore(release): 1.31.7 [skip ci] * fix: recursion depth on regex parse issue (#2790) * fix: channel hook regressions * fix: expo media library permissions race conditions * fix: listen to correct channel read events * chore(release): 5.42.2 [skip ci] * chore(release): 1.31.8 [skip ci] * feat: moderation v2 support (#2801) * feat: enable moderation v2 on the sdk and sample apps * chore: update yarn.lock files as well * feat: add support for membership customization (#2802) * feat: add support for membership customization * fix: lint issues * chore(release): 5.43.0 [skip ci] * chore(release): 1.32.0 [skip ci] * fix: channel.state break on going to background (#2809) * chore(release): 5.43.1 [skip ci] * chore(release): 1.32.1 [skip ci] * chore: resolve conflicts from develop on v6 --------- Co-authored-by: Ivan Sekovanikj <31964049+isekovanic@users.noreply.github.com> Co-authored-by: semantic-release-bot <semantic-release-bot@martynus.net> Co-authored-by: Ivan Sekovanikj <ivan.sekovanikj@getstream.io> * fix: camera roll issues * fix: refactor photo resolution to native level * fix: expo media library * fix: properly resolve videos too * chore: remove console.log * chore: update yarn.lock files for example apps * fix: bring back camera-roll to SampleApp * fix: also podfile.lock * fix: remove console.log * fix: issues with video preview * chore: remove console.log * chore: resolve conflicts from develop * feat: ai-bot integration poc (#2819) * feat: add StreamingMessageView to kick off ai feature * fix: issues with message view * feat: add AITypingIndicatorView * feat: make send message button react to ai state * fix: improve typewriter animation * fix: improvements in ui and typewriter * chore: add customizations to StreamingMessageView * fix: hook deps * chore: extract logic in hook * fix: custom events * fix: revert the type change in favor of changes in the LLC * feat: codeblock scrollable view * feat: table initial reimpl * feat: finish table impl * fix: horizontal scroll list performance issues * feat: add markdown parsing fixes, optimistic code capture and various improvements * fix: theme prop and theming in general * fix: remove edited lalbel for ai messages * fix: bug with stop streaming button and types * fix: colors in md rendering * fix: rename custom scrollview * chore: translations * fix: remove TODO * chore: extract indicator styles in theme * fix: safeguard if channel does not exist * fix: get rid of enum and introduce proper type * fix: allow only message overrides * chore: update event names as per the changes * fix: bump stream-chat-js version to v8.46.0 * fix: use channel method for sending events * fix: cover background mode case * fix: use type from LLC * chore: add jsdocs * fix: move check to checker fn * fix: add overrides for StreamingMessageView * chore: add override for stop streaming button * chore: upgrade expo sample app to expo 52 * fix: remove unnecessary android and ios permissions * chore: update yarn.lock files * refactor: remove stale subscriber count logic and types refactor (#2832) * refactor: remove stale subscriber count logic and types refactor (#2782) * fix: lint issues * feat: Message list pagination implementation using hasPrev and hasNext (#2799) * refactor: remove stale subscriber count logic and types refactor (#2782) * feat: new message list pagination implementation * fix: channel state initial data * fix: revert back the onStartReached change * fix: lint and tests * fix: added tests for the hooks and message pagination * fix: podlock file for sample app * fix: throttle logic for the copy message state * fix: add back channel.deleted event * fix: useeffect deps * fix: add theme for the bottom sheet styles and message user reactions item (#2827) * fix: refactor some of the buttons * fix: refactor context usage * fix: solve final cyclical dep * fix: add corrected app.json * fix: convert all poll buttons to pressables * fix: lint issues (that somehow passed without issues before) * chore: move add comment button to correct file * fix: move vote button to correct file too * fix: image gallery issues (#2835) * fix: infinite image loading issue * fix: image gallery animations issue * fix: remove unnecessary logs * fix: image gallery header and footer safe area view (#2840) * chore: remove disable if frozen channel (#2841) * chore: write tests for disallowed sending messages (#2839) * chore: write tests for disallowed sending messages * fix: make test name more concise * chore: remove redundant assertion * chore: add test for the editing state as well * fix: only disable message input ui when capabilities change (#2836) * chore: remove disableIfFrozenChannel prop * fix: lint issues * fix: old arch image resizer native module spec file name fix (#2842) * fix: image gallery header and footer safe area view * fix: old arch image resizer native module spec file name fix * chore: fix all of the GH workflow stuff related to v6 in prep for releasing (#2843) --------- Co-authored-by: Khushal Agarwal <khushal.agarwal987@gmail.com> Co-authored-by: semantic-release-bot <semantic-release-bot@martynus.net> Co-authored-by: Alexey Alter-Pesotskiy <alex@testableapple.com> Co-authored-by: Stream SDK Bot <60655709+Stream-SDK-Bot@users.noreply.github.com> Co-authored-by: Stream Bot <runner@fv-az1148-731.o3ts4yn1huletmfehy03vvfvxg.dx.internal.cloudapp.net> Co-authored-by: Santhosh Vaiyapuri <3846977+santhoshvai@users.noreply.github.com> Co-authored-by: Oliver Lazoroski <oliver.lazoroski@gmail.com> Co-authored-by: Stream Bot <runner@fv-az1756-392.rxb2ubmju23uthz3oztawtjyeg.dx.internal.cloudapp.net> | 1 年前 | |
feat: native shimmer and image loading redesign (#3467) ## 🎯 Goal In this PR, we redesign the implementation of `ImageLoadingIndicator` to present as a gradient shimmer with an activity indicator. Since we tried a couple of approaches (one with `LinearGradient` from `RNSVG`), at the end we settled for a purely native implementation for performance reasons. Having that many animated views be potentially active on the screen tanks scrolling performance of the `MessageList` (i.e a lot of images loading, perhaps with poor network conditions if they aren't cached). The shimmer is Fabric only, lives in shared native sources, and is exposed through the native handler registration flow for consistent integration across the current SDK setup. Visuals and behaviour are aligned between Android and iOS, keeping a single moving shimmer gradient, and tuning width/shape/alpha for a smoother effect closer to the previous output. For packaging and local development flow, native source sync is now driven from `shared-native` as the source of truth so local dev and release packaging stay aligned, with build/script flow updated so copies refresh automatically when running the sample app. I'm not yet sure this is the correct approach, but since this is relatively new as we didn't have that many native implementations in the SDK in the past it'll have to do for now and we'll of course refine it as we go on. Just for reference, the native shimmer implementation improves: - Scrolling on Android by about 30-40 FPS (yes, really) - Scrolling on iOS by about 10 FPS (it was fine-ish before as well) compared to a `LinearGradient` and `Animated.View` approach for rendering a shimmer. TODO: - [x] Write docs for the native side - [x] Some additional cleanup - [x] Maybe tweak/polish the shimmer/gradient a little bit more - [x] Consolidate where we copy resources from (probably one folder for the shared stuff, and we always copy from there) so that future native implementations are trivial to add and all of the tooling works - [x] Have another run at the `build.gradle` copying edge cases, I think this can be done simpler ## 🛠 Implementation details <!-- Provide a description of the implementation --> ## 🎨 UI Changes <!-- Add relevant screenshots --> <details> <summary>iOS</summary> <table> <thead> <tr> <td>Before</td> <td>After</td> </tr> </thead> <tbody> <tr> <td> <!--<img src="" /> --> </td> <td> <!--<img src="" /> --> </td> </tr> </tbody> </table> </details> <details> <summary>Android</summary> <table> <thead> <tr> <td>Before</td> <td>After</td> </tr> </thead> <tbody> <tr> <td> <!--<img src="" /> --> </td> <td> <!--<img src="" /> --> </td> </tr> </tbody> </table> </details> ## 🧪 Testing <!-- Explain how this change can be tested (or why it can't be tested) --> ## ☑️ Checklist - [ ] I have signed the [Stream CLA](https://docs.google.com/forms/d/e/1FAIpQLScFKsKkAJI7mhCr7K9rEIOpqIDThrWxuvxnwUq2XkHyG154vQ/viewform) (required) - [ ] PR targets the `develop` branch - [ ] Documentation is updated - [ ] New code is tested in main example apps, including all possible scenarios - [ ] SampleApp iOS and Android - [ ] Expo iOS and Android --------- Co-authored-by: Khushal Agarwal <khushal.agarwal987@gmail.com> | 6 个月前 | |
feat!: V6.0.0 (#2844) BREAKING CHANGE: v6 release * fix: remove netinfo from native handlers and add it as dev dependency of core (#2538) * fix: add expo-clipboard to peer deps of expo-package (#2537) * fix: remove netinfo from native handlers and add it as dev dependency of core * fix: lint issues * fix: revert back isMounted logic * fix: change peer dep * feat: remove usage of flatlist-mvcp in favour of mvcp support in RN >= 0.72 (#2539) * fix: add expo-clipboard to peer deps of expo-package (#2537) * feat: remove usage of flatlist-mvcp in favour of mvcp support in RN >= 0.72 * fix: remove flatlist-mvcp from example apps * chore: update peer dep of react native * fix: change quotedMessage type to MessageType or undefined (#2527) * fix: change quotedMessage type to MessageType or undefined * docs: fix lint issues * fix: change react-native-image-resizer to @bam.tech/react-native-image-resizer (#2534) * fix: reaction list reactions sorting order based on created_at * fix: show reactions using reactions_group * fix: tests * fix: useProcessReactions hook * fix: useProcessReactions hook and Channel message spread * fix: change react-native-image-resizer to @bam.tech/react-native-image-resizer * fix: remove reaction_counts from offline DB * chore: update yarn.lock files * fix: add reanimated and gesture handler as peer deps to package * fix: change old gesture handler useAnimatedGestureHandler to the new API (#2563) * feat: configure ReactionList reaction theme (#2561) * fix: expo sample app keyboardVerticalOffset for channel and thread screen * fix: change old gesture handler useAnimatedGestureHandler to the new API * feat: move react-native-quick-sqlite to op-sqlite (#2541) * feat: move react-native-quick-sqlite to op-sqlite * docs: update docs * fix: podfile changes * docs: add troubleshoot guide * fix: issues with import * fix: update yarn.lock * chore: update deps of expo messaging app * feat: use react-native-blob-util instead of the react-native-fs and make it optional dependency (#2578) * feat: use react-native-blob-util instead of the react-native-fs and make it optional dependency * chore: fix peerdeps and add dcos * fix: deps version on package.json * docs: add migration guide for v5 to v6 * docs: add migration guide for v5 to v6 * docs: add migration guide for v5 to v6 * fix: upgrade cameraroll, documentpicker, haptics feedback and image crop picker to new arch compatible version * fix: change react-native-image-crop-picker to react-native-image-picker and make it optional * docs: add migration guide * fix: make expo-image-picker optional * fix: make expo-image-picker optional * docs: apply docs changes * fix: add check for handlers in native.ts * fix: resolve conflicts from branch develop to v6 (#2621) * fix: resolve conflicts from branch develop to v6 * fix: remove cameraroll on ts messaging app * fix: remove shared folder * chore: bump vale version * chore: bump vale version * chore: update vale version * chore: resolve conflicts from develop * chore: fix vale issues * chore: fix vale issues * fix: react-native-safe-area-context ios build issue * fix: bottom sheet version * fix: remove flipper debugger * fix: issue with rn-svg on android and rn-video fabric compatibility * fix: animations usage in ImageGallery (#2627) * fix: remove rn-sqlite patch * fix: animations laginess on the ImageGallery and MessageOverlay on new architecture (#2633) * chore: resolve conflicts from develop (#2682) * fix: upgrade firebase versions to fix crash (#2646) * fix: audio recording variety bugs (#2648) * fix: variety of bugs in async audio feature * fix: upload of empty messages and console.log cleanup * fix: expo permission race conditions * fix: create pure version of stopRecording() for usage on unmount * fix: remove redundant export * fix: actually amend failing test suites * chore: remove constructors as they are not needed * fix: pr remarks * chore: write some simplistic functionality tests * chore: return class instance rather than class itself for better usability * chore: add more robust tests * fix: linter errors * fix: only display waveform whenever the mic is locked * docs: add Deep Linking guide for the chat SDK (#2651) * fix: change Block user action to Ban user action and UI cookbook for blocking users (#2649) * fix: change Block user action to Ban user action * fix: change Block user action to Ban user action * fix: add back blockUser action and deprecate it * docs: UI Cookbook for Blocking users * chore(release): 5.36.1 [skip ci] * chore(release): 1.28.1 [skip ci] * fix: issue with loading app settings when the connectUser is not called on app (#2654) * fix: issue with loading app settings when the connectUser is not called on app * fix: add comments * fix: add comments * fix: unable to upload file due to special characters in the file name (#2656) * fix: sdk size pr (#2657) * [CI] Update SDK Size (#2653) Co-authored-by: Khushal Agarwal <khushal.agarwal987@gmail.com> Co-authored-by: Stream Bot <runner@fv-az1148-731.o3ts4yn1huletmfehy03vvfvxg.dx.internal.cloudapp.net> * chore(release): 5.36.2 [skip ci] * chore(release): 1.28.2 [skip ci] * feat: add live location sharing cookbook (#2659) * feat: add live location ui cookbook * fix: prettier lint * Update docusaurus/docs/reactnative/guides/live-location-sharing.mdx Co-authored-by: Oliver Lazoroski <oliver.lazoroski@gmail.com> * lint fixes * fix lint issues * fix locks * move to ruby 3.1 and greater --------- Co-authored-by: Oliver Lazoroski <oliver.lazoroski@gmail.com> * chore(release): 5.37.0 [skip ci] * chore(release): 1.29.0 [skip ci] * fix: avoid prepending http before native supported url schemes (#2661) * fix: avoid prepending http before native supported url schemes * fix: move check to link parsing module * fix: bad memoisation in window, screen dimension listener hooks (#2664) * fix: bad memoisation in window, screen dimension listener hooks * remove unused variable * feat: add create chat client hook for easy usage (#2660) * feat: add create chat client hook for easy usage * docs: use useCreateChatClient hook for client creation * fix: bump fastlane plugin version (#2665) * fix: add theme properties for EmptyStateIndicator for message list (#2667) * fix: add theme properties for EmptyStateIndicator for message list * fix: update snapshots * fix: apply card cover theme property order * fix: pagination typescript errors and db synchronization bugs (#2669) * fix: pagination typescript errors and db synchronization bugs * chore: write test for db serialization issue * fix: linter issues * [CI] Bump max tolerance for sdk size analysis (#2674) * chore: bump sample app version to v1.30.0 * fix: remove nin and ne operator usage in the SDK and the sample app (#2672) * fix: remove and operator usage in the SDK and the sample app * fix: remove console log * fix: change console log to warn * fix: add improvemnts * fix: import of debouncefunc * fix: import of debouncefunc * fix: restructure queryMembers, queryUsers and ACItriggersettings * fix: error bubbling for suggestions in auto complete input * fix: request image access permissions for iOS only for native image picking (#2677) * fix: properly resolve sendMessage during memoization (#2675) * fix: properly resolve sendMessage during memoization * fix: remedy change so that it does not cause performance issues * chore: revert sendMessage in the dep array * fix: deprecate messageReactions prop and use isMessageActionsVisible instead for messageActions (#2676) * fix: deprecate messageReactions prop and use isMessageActionsVisible instead for messageActions * docs: fix custom message actions * fix: execution logic for showMessageOverlay * chore(release): 5.38.0 [skip ci] * chore(release): 1.29.1 [skip ci] * fix: update yarn.lock for the project (#2681) * fix: copy message action type for message actions (#2679) * chore: update sdk size (#2678) Co-authored-by: Khushal Agarwal <khushal.agarwal987@gmail.com> Co-authored-by: Stream Bot <runner@fv-az1756-392.rxb2ubmju23uthz3oztawtjyeg.dx.internal.cloudapp.net> * chore: resolve conflicts from develop * fix: vale lint issues * fix: new arch project config --------- Co-authored-by: Ivan Sekovanikj <31964049+isekovanic@users.noreply.github.com> Co-authored-by: semantic-release-bot <semantic-release-bot@martynus.net> Co-authored-by: Alexey Alter-Pesotskiy <alex@testableapple.com> Co-authored-by: Stream SDK Bot <60655709+Stream-SDK-Bot@users.noreply.github.com> Co-authored-by: Stream Bot <runner@fv-az1148-731.o3ts4yn1huletmfehy03vvfvxg.dx.internal.cloudapp.net> Co-authored-by: Santhosh Vaiyapuri <3846977+santhoshvai@users.noreply.github.com> Co-authored-by: Oliver Lazoroski <oliver.lazoroski@gmail.com> Co-authored-by: Ivan Sekovanikj <ivan.sekovanikj@getstream.io> Co-authored-by: Stream Bot <runner@fv-az1756-392.rxb2ubmju23uthz3oztawtjyeg.dx.internal.cloudapp.net> * fix: chat.test.ts * chore: cleanup v3 docs setup and e2e tests from project (#2701) * feat: add new message action list and reaction selector UI (#2686) * feat: remove StreamChatRN in favour of a global context ChatConfigContext that allows providing global values (#2703) * fix: remove deprecated code from v6 branch (#2702) * fix: remove deprecated code from v6 branch * fix: remove deprecated code from v6 branch * docs: add deprecated docs * docs: add deprecated docs * chore: resolve conflicts from base branch * docs: improve deprecated docs * chore: resolve conflicts from develop * feat: new reaction list design and improvements to MessageSimple component (#2700) * feat: add new message action list and reaction selector UI * fix: remove unnecessary props from OverlayContext * docs: add comments for the props * tests: add tests for the components * tests: add tests for the components * fix: chat.test.ts * fix: chat.test.ts * fix: add tests for the code * fix: use rn animated to create new modal and add docs * fix: add opacity for the message action list item when pressed * fix: make modal better and change component names * fix: update test snapdhots * docs: message actions customizations * docs: message actions customizations * fix: theme improvements * fix: message component render improvements * docs: update migration guide * feat: new reaction list design and improvements to MessageSimple component * tests: add tests for the components * docs: reaction list new design docs * docs: add changes to migration guide * docs: add changes to migration guide * docs: add changes to migration guide * chore: resolve conflicts from base branch * chore: resolve conflicts from base branch * fix: sample app overlay backdrop bug * fix: reaction list type * feat: add FlatList for Reaction Picker * feat: add FlatList for Reaction Picker * feat: add FlatList for Reaction Picker * fix: circular dependency issue * fix: upgrade expo to latest in expo messaging app * fix: padding for reaction picker * fix: update dependencies for native cli apps * fix: add Flatlist mvcp as optional package and peer deps versions (#2720) * fix: add Flatlist mvcp as optional package and peer deps versions * fix: add Flatlist mvcp as optional package and peer deps versions * docs: fix native handler docs * docs: fix vale issues * docs: remove native handler docs * fix: lint issues * fix: design issues with ReactionList bottom UI (#2717) * fix: design issues with ReactionList bottom UI * fix: vale issues * fix: add a log that complains for removal for mvcp package on RN version <0.72 (#2724) * fix: add a log that complains for removal for mvcp package on RN version <0.72 * fix: add a log that complains for removal for mvcp package on RN version <0.72 * fix: build issues * fix: add variable under the if block Co-authored-by: Oliver Lazoroski <oliver.lazoroski@gmail.com> * fix: log --------- Co-authored-by: Oliver Lazoroski <oliver.lazoroski@gmail.com> * fix: bottom sheet modal improvements * fix: use process reactions improvements for thread list * docs: docusaurus setup for v6 release (#2721) * docs: docusaurus setup for v6 release * docs: docusaurus setup for v6 release * docs: fix vale issues * docs: add v5 docs to v5 folder * chore: setup workflow and improve migration guide for v6 rc release (#2727) * fix: linting issues * featv6 rc release * feat!: v6 rc release * feat!: v6 rc release * BREAKING CHANGE: v6 rc release * fix: upgrade react native version in sample apps to 0.73.10 (#2728) * feat!: rc release v6 (#2729) * feat: styles changes for MessageActionList * feat: styles changes for MessageUserReactions * chore: fix noteKeywords in release config * feat: improve Message.tsx render conditional (#2733) BREAKING CHANGE: Update the Message.tsx conditional in the component to use ternary * feat: remove dry run mode from release config BREAKING CHANGE: Update the release config * fix: way of reading the value from animated shared values in the components (#2738) * fix: way of reading the value from animated shared values in the components * fix: unify styles to one hook * fix: lint issues * fix: upgrade the RN version in example apps to 0.75.4 (#2739) * fix: upgrade the RN version in example apps to 0.74.6 * fix: upgrade the RN version in example apps to 0.75.4 * fix: upgrade the RN version in example apps to 0.75.4 * fix: pod install issue * fix: pod install issue * fix: pod install issue * fix: pod install issue * fix: pod install issue * feat: move react native image resizer native module to the SDK (#2751) * feat: move react native image resizer to the native package natively * fix: android and ios native module * fix: add StreamChatReactNative module for ios * fix: add StreamChatReactNative module for ios and android * fix: add StreamChatReactNative module for ios and android * docs: update docs for the removal of the image resizer package * fix: tests for audio controller * fix: tests for audio controller * fix: update sample app * fix: update sample app * fix: update sample app * fix: attachment picker image picker icon visibility as per dependency * fix: changes after merge * fix: lint issues * fix: revalidate pod cache * chore: revert cache revalidation * fix: sender and receiver message theme colors * fix: sender and receiver message theme colors (#2767) * fix: upgrade op-sqlite version to be compatible with latest react native version (#2761) * fix: upgrade op-sqlite version to be compatible with latest react native version * fix: lint issues * docs: add new architecture guide docs * revert: "docs: add new architecture guide docs" This reverts commit be16a66e7759f5737b174777110eaef798922c0c. * docs: fix migration guide * fix: add back set initial state * chore: backport the polls docs to v5 too * fix: add versioned sidebar update as well * chore: upgrade sample apps to RN 0.76.1 and added new arch docs (#2756) * chore: upgrade sample apps to RN 0.76.1 * docs: add new architecture guide * docs: add new architecture guide * fix: vale issues * chore: update the sample apps * fix: poll offline fixes (#2772) * fix: message disallowed indicator display (#2754) * fix: native image picker poll control (#2762) * fix: check for channel validity before consuming config (#2760) * fix: receiverMessageBackgroundColor hotfix (#2763) * fix: receiverMessageBackgroundColor hotfix * fix: tests * chore(release): 5.41.3 [skip ci] * chore(release): 1.31.4 [skip ci] * fix: theme for the message bubble and replies (#2766) * fix: theme for the message bubble and replies * fix: theme for the message bubble and replies * fix: add null coleasing operator * fix: poll edge cases (#2768) * fix: poll related edge cases with offline storage * feat: offline db for polls wip * fix: reconcile own_votes properly * fix: all underlying offline store issues with polls * fix: properly resolve own_votes and latest_answers * fix: remove faulty poll check * chore: remove commented out code * chore: remove log * fix: multiple answers bug and remove logs * chore: remove index as we have primary key * chore(release): 5.41.4 [skip ci] * chore(release): 1.31.5 [skip ci] * fix: errors during resolving conflicts and yarn.locks * fix: pod cache revalidation * fix: lint issues --------- Co-authored-by: semantic-release-bot <semantic-release-bot@martynus.net> Co-authored-by: Khushal Agarwal <khushal.agarwal987@gmail.com> * fix: revert cache revalidation and introduce dummy change in docs to trigger build * fix: resolve lint issues once again * fix: remove channel constants - isAdmin, isOwner and isModerator * fix: offline mode channel hydration issues * fix: remove channel constants - isAdmin, isOwner and isModerator (#2778) * fix: sender and receiver message theme colors * fix: remove channel constants - isAdmin, isOwner and isModerator * fix: faulty build for sample apps * fix: update yarn.lock files to fix build * fix: android modal size * fix: race conditions on db open and close * fix: move dropTables into check as well * fix: crash in some instances of useIsChannelMuted hook invocation * fix: properly use hook in channel preview * fix: edge cases and test * fix: regex state machine stack depth crash * fix: update test * fix: channel hook regressions * fix: expo media library permissions race conditions * feat: enable moderation v2 on the sdk and sample apps * fix: listen to correct channel read events * fix: add FlatList default for Expo * feat: add support for membership customization * fix: modify deployment workflow of SampleApp so that we get a release * fix: try bumping firebase version * fix: revert FB changes and CODE_SIGN_STYLE regression * fix: PROVISIONING_PROFILE_SPECIFIER specific val * fix: certificate distribution settings * fix: upgrade bottom sheet and fix reanimated errors in new arch (#2806) * fix: upgrade bottom sheet to get rid of warnings * fix: add sample app yarn.lock as well * fix: all remnants of reanimated errors * fix: update peer dependencies * fix: channel.state break on going to background * fix: expo media library exceptions in new arch * chore: resolve conflicts from develop on v6 (#2813) * chore(release): 5.42.0 [skip ci] * chore(release): 1.31.6 [skip ci] * fix: android modal size (#2784) * fix: backport crash fix (#2787) * fix: crash in some instances of useIsChannelMuted hook invocation * fix: properly use hook in channel preview * fix: edge cases and test * chore(release): 5.42.1 [skip ci] * chore(release): 1.31.7 [skip ci] * fix: recursion depth on regex parse issue (#2790) * fix: channel hook regressions * fix: expo media library permissions race conditions * fix: listen to correct channel read events * chore(release): 5.42.2 [skip ci] * chore(release): 1.31.8 [skip ci] * feat: moderation v2 support (#2801) * feat: enable moderation v2 on the sdk and sample apps * chore: update yarn.lock files as well * feat: add support for membership customization (#2802) * feat: add support for membership customization * fix: lint issues * chore(release): 5.43.0 [skip ci] * chore(release): 1.32.0 [skip ci] * fix: channel.state break on going to background (#2809) * chore(release): 5.43.1 [skip ci] * chore(release): 1.32.1 [skip ci] * chore: resolve conflicts from develop on v6 --------- Co-authored-by: Ivan Sekovanikj <31964049+isekovanic@users.noreply.github.com> Co-authored-by: semantic-release-bot <semantic-release-bot@martynus.net> Co-authored-by: Ivan Sekovanikj <ivan.sekovanikj@getstream.io> * fix: camera roll issues * fix: refactor photo resolution to native level * fix: expo media library * fix: properly resolve videos too * chore: remove console.log * chore: update yarn.lock files for example apps * fix: bring back camera-roll to SampleApp * fix: also podfile.lock * fix: remove console.log * fix: issues with video preview * chore: remove console.log * chore: resolve conflicts from develop * feat: ai-bot integration poc (#2819) * feat: add StreamingMessageView to kick off ai feature * fix: issues with message view * feat: add AITypingIndicatorView * feat: make send message button react to ai state * fix: improve typewriter animation * fix: improvements in ui and typewriter * chore: add customizations to StreamingMessageView * fix: hook deps * chore: extract logic in hook * fix: custom events * fix: revert the type change in favor of changes in the LLC * feat: codeblock scrollable view * feat: table initial reimpl * feat: finish table impl * fix: horizontal scroll list performance issues * feat: add markdown parsing fixes, optimistic code capture and various improvements * fix: theme prop and theming in general * fix: remove edited lalbel for ai messages * fix: bug with stop streaming button and types * fix: colors in md rendering * fix: rename custom scrollview * chore: translations * fix: remove TODO * chore: extract indicator styles in theme * fix: safeguard if channel does not exist * fix: get rid of enum and introduce proper type * fix: allow only message overrides * chore: update event names as per the changes * fix: bump stream-chat-js version to v8.46.0 * fix: use channel method for sending events * fix: cover background mode case * fix: use type from LLC * chore: add jsdocs * fix: move check to checker fn * fix: add overrides for StreamingMessageView * chore: add override for stop streaming button * chore: upgrade expo sample app to expo 52 * fix: remove unnecessary android and ios permissions * chore: update yarn.lock files * refactor: remove stale subscriber count logic and types refactor (#2832) * refactor: remove stale subscriber count logic and types refactor (#2782) * fix: lint issues * feat: Message list pagination implementation using hasPrev and hasNext (#2799) * refactor: remove stale subscriber count logic and types refactor (#2782) * feat: new message list pagination implementation * fix: channel state initial data * fix: revert back the onStartReached change * fix: lint and tests * fix: added tests for the hooks and message pagination * fix: podlock file for sample app * fix: throttle logic for the copy message state * fix: add back channel.deleted event * fix: useeffect deps * fix: add theme for the bottom sheet styles and message user reactions item (#2827) * fix: refactor some of the buttons * fix: refactor context usage * fix: solve final cyclical dep * fix: add corrected app.json * fix: convert all poll buttons to pressables * fix: lint issues (that somehow passed without issues before) * chore: move add comment button to correct file * fix: move vote button to correct file too * fix: image gallery issues (#2835) * fix: infinite image loading issue * fix: image gallery animations issue * fix: remove unnecessary logs * fix: image gallery header and footer safe area view (#2840) * chore: remove disable if frozen channel (#2841) * chore: write tests for disallowed sending messages (#2839) * chore: write tests for disallowed sending messages * fix: make test name more concise * chore: remove redundant assertion * chore: add test for the editing state as well * fix: only disable message input ui when capabilities change (#2836) * chore: remove disableIfFrozenChannel prop * fix: lint issues * fix: old arch image resizer native module spec file name fix (#2842) * fix: image gallery header and footer safe area view * fix: old arch image resizer native module spec file name fix * chore: fix all of the GH workflow stuff related to v6 in prep for releasing (#2843) --------- Co-authored-by: Khushal Agarwal <khushal.agarwal987@gmail.com> Co-authored-by: semantic-release-bot <semantic-release-bot@martynus.net> Co-authored-by: Alexey Alter-Pesotskiy <alex@testableapple.com> Co-authored-by: Stream SDK Bot <60655709+Stream-SDK-Bot@users.noreply.github.com> Co-authored-by: Stream Bot <runner@fv-az1148-731.o3ts4yn1huletmfehy03vvfvxg.dx.internal.cloudapp.net> Co-authored-by: Santhosh Vaiyapuri <3846977+santhoshvai@users.noreply.github.com> Co-authored-by: Oliver Lazoroski <oliver.lazoroski@gmail.com> Co-authored-by: Stream Bot <runner@fv-az1756-392.rxb2ubmju23uthz3oztawtjyeg.dx.internal.cloudapp.net> | 1 年前 | |
feat: native multipart upload (#3566) ## 🎯 Goal This PR adds optional native multipart upload support for React Native and Expo packages, with native iOS/Android uploaders, a JS axios adapter, upload progress propagation and new attachment progress UI. Additionally, it also moves pending attachment uploads onto `client.uploadManager`, adds local attachment id tracking, improves video/document attachment handling, and updates SampleApp to exercise the new native upload path. The reason why we decided to add an opt-in native upload is related to the fact that `axios` does not always report upload progress correctly on React Native, especially Android. It will sometimes either not update the progress at all or report it badly, causing UI glitches. Additionally, native uploads are much, much faster as we take advantage of streaming directly without any intermediate ephemeral files in order to do that. Finally, `axios` can easily break if an override to the underlying RN's `fetch` implementation has been made, especially on `Android`. ## What Changed - Added a shared native multipart upload module for iOS and Android, including request parsing, file/text multipart parts, progress events, cancellation, timeouts, response handling, and bounded response body reads. - Added native package and Expo package bindings for `StreamMultipartUploader`, plus native handler registration through `stream-chat-react-native` and `stream-chat-expo` - Added core JS helpers and public types for native multipart upload requests, responses, progress events, abort handling, and uploader creation - Added `installNativeMultipartAdapter` / `wrapAxiosAdapterWithNativeMultipart` to route multipart `FormData` axios requests through the native uploader when available, while leaving non-multipart requests on the existing adapter - Added `Chat` support for enabling native multipart uploads via `useNativeMultipartUpload`; SampleApp enables this path - Reworked pending message attachment uploads to use `client.uploadManager.upload` by local attachment id instead of directly calling `channel.sendImage` / `channel.sendFile` - Added `localId` propagation from local attachments into message attachments so pending uploads can be correlated with `client.uploadManager` - Updated message sendability and upload indicator behavior to depend on `allowSendBeforeAttachmentsUpload` rather than offline support - Added upload progress UI for image, video, file, and audio attachments, including circular determinate progress, media overlays, file/audio byte progress labels, and a short completion hold to avoid UI flicker - Added new overrideable/default components for attachment upload progress: `AttachmentUploadIndicator`, `CircularProgressIndicator`, and `MediaUploadProgressOverlay` - Updated gallery/video thumbnail rendering so pending media attachments can show upload progress overlays - Updated document picking in both native and Expo packages to generate thumbnails for picked video files (this was missing from V9 initially) - Updated iOS video thumbnail URL handling to strip query and fragment data from local file URLs - Refined native iOS shimmer behavior to reduce animation restarts, handle foreground/background transitions, visibility, alpha, trait changes, and resolved color updates more reliably (this should improve shimmer performance for iOS significantly) - Updated `Android` shared native source syncing to resolve shared native sources from the canonical project path - Replaced SampleApp’s `react-native-fast-image` dependency with `@d11/react-native-fast-image` ## 🛠 Implementation details <!-- Provide a description of the implementation --> ## 🎨 UI Changes <!-- Add relevant screenshots --> <details> <summary>iOS</summary> <table> <thead> <tr> <td>Before</td> <td>After</td> </tr> </thead> <tbody> <tr> <td> <!--<img src="" /> --> </td> <td> <!--<img src="" /> --> </td> </tr> </tbody> </table> </details> <details> <summary>Android</summary> <table> <thead> <tr> <td>Before</td> <td>After</td> </tr> </thead> <tbody> <tr> <td> <!--<img src="" /> --> </td> <td> <!--<img src="" /> --> </td> </tr> </tbody> </table> </details> ## 🧪 Testing <!-- Explain how this change can be tested (or why it can't be tested) --> ## ☑️ Checklist - [ ] I have signed the [Stream CLA](https://docs.google.com/forms/d/e/1FAIpQLScFKsKkAJI7mhCr7K9rEIOpqIDThrWxuvxnwUq2XkHyG154vQ/viewform) (required) - [ ] PR targets the `develop` branch - [ ] Documentation is updated - [ ] New code is tested in main example apps, including all possible scenarios - [ ] SampleApp iOS and Android - [ ] Expo iOS and Android --------- Co-authored-by: Zita Szupera <szuperaz@gmail.com> | 5 个月前 | |
feat: on the fly thumbnail generation (#3523) ## 🎯 Goal This PR adds native video thumbnail generation for local assets and wires it into the attachment flows. The rationale' behind the PR is the fact that starting RN 0.84 and onwards, `ImageBackground` can no longer reliably render `ph:///` video assets on iOS (and probably other edge cases too). Thumbnails are now generated natively on iOS and Android for local video assets coming from the attachment picker / image picker / camera flows, cached in the app cache directory, and reused if they were already generated before. The native API is batched, so we can generate multiple thumbnails in one go instead of doing them one by one. The module only handles local assets. If thumbnail generation fails for a single video, we soft fail that item only and fall back to the existing placeholder / no thumbnail UI instead of failing the whole batch. So in other words: - added native video thumbnail generation on iOS and Android under shared-native - exposed it through a new TurboModule `StreamVideoThumbnail` API - batched thumbnail generation for `getPhotos`, `pickImage`, and `takePhoto` - added deterministic cache reuse for generated thumbnails - limited concurrent native generation to avoid decode storms - made thumbnail generation best-effort per item: - native returns `{ uri, error }` per requested asset - failed items no longer fail the whole batch - restricted `thumbnail` generation for local assets only - Android: raw path, `file://`, `content://` - iOS: raw path, `file://`, `ph://` - switched attachment picker items and image upload previews away from ImageBackground to plain Image Notes - this is new architecture only - thumbnails are written to the app cache dir, so they can survive relaunches but are still disposable cache - existing cached thumbnails from the old cache folder name will not be reused ## 🛠 Implementation details <!-- Provide a description of the implementation --> ## 🎨 UI Changes <!-- Add relevant screenshots --> <details> <summary>iOS</summary> <table> <thead> <tr> <td>Before</td> <td>After</td> </tr> </thead> <tbody> <tr> <td> <!--<img src="" /> --> </td> <td> <!--<img src="" /> --> </td> </tr> </tbody> </table> </details> <details> <summary>Android</summary> <table> <thead> <tr> <td>Before</td> <td>After</td> </tr> </thead> <tbody> <tr> <td> <!--<img src="" /> --> </td> <td> <!--<img src="" /> --> </td> </tr> </tbody> </table> </details> ## 🧪 Testing <!-- Explain how this change can be tested (or why it can't be tested) --> ## ☑️ Checklist - [ ] I have signed the [Stream CLA](https://docs.google.com/forms/d/e/1FAIpQLScFKsKkAJI7mhCr7K9rEIOpqIDThrWxuvxnwUq2XkHyG154vQ/viewform) (required) - [ ] PR targets the `develop` branch - [ ] Documentation is updated - [ ] New code is tested in main example apps, including all possible scenarios - [ ] SampleApp iOS and Android - [ ] Expo iOS and Android | 6 个月前 | |
feat!: V6.0.0 (#2844) BREAKING CHANGE: v6 release * fix: remove netinfo from native handlers and add it as dev dependency of core (#2538) * fix: add expo-clipboard to peer deps of expo-package (#2537) * fix: remove netinfo from native handlers and add it as dev dependency of core * fix: lint issues * fix: revert back isMounted logic * fix: change peer dep * feat: remove usage of flatlist-mvcp in favour of mvcp support in RN >= 0.72 (#2539) * fix: add expo-clipboard to peer deps of expo-package (#2537) * feat: remove usage of flatlist-mvcp in favour of mvcp support in RN >= 0.72 * fix: remove flatlist-mvcp from example apps * chore: update peer dep of react native * fix: change quotedMessage type to MessageType or undefined (#2527) * fix: change quotedMessage type to MessageType or undefined * docs: fix lint issues * fix: change react-native-image-resizer to @bam.tech/react-native-image-resizer (#2534) * fix: reaction list reactions sorting order based on created_at * fix: show reactions using reactions_group * fix: tests * fix: useProcessReactions hook * fix: useProcessReactions hook and Channel message spread * fix: change react-native-image-resizer to @bam.tech/react-native-image-resizer * fix: remove reaction_counts from offline DB * chore: update yarn.lock files * fix: add reanimated and gesture handler as peer deps to package * fix: change old gesture handler useAnimatedGestureHandler to the new API (#2563) * feat: configure ReactionList reaction theme (#2561) * fix: expo sample app keyboardVerticalOffset for channel and thread screen * fix: change old gesture handler useAnimatedGestureHandler to the new API * feat: move react-native-quick-sqlite to op-sqlite (#2541) * feat: move react-native-quick-sqlite to op-sqlite * docs: update docs * fix: podfile changes * docs: add troubleshoot guide * fix: issues with import * fix: update yarn.lock * chore: update deps of expo messaging app * feat: use react-native-blob-util instead of the react-native-fs and make it optional dependency (#2578) * feat: use react-native-blob-util instead of the react-native-fs and make it optional dependency * chore: fix peerdeps and add dcos * fix: deps version on package.json * docs: add migration guide for v5 to v6 * docs: add migration guide for v5 to v6 * docs: add migration guide for v5 to v6 * fix: upgrade cameraroll, documentpicker, haptics feedback and image crop picker to new arch compatible version * fix: change react-native-image-crop-picker to react-native-image-picker and make it optional * docs: add migration guide * fix: make expo-image-picker optional * fix: make expo-image-picker optional * docs: apply docs changes * fix: add check for handlers in native.ts * fix: resolve conflicts from branch develop to v6 (#2621) * fix: resolve conflicts from branch develop to v6 * fix: remove cameraroll on ts messaging app * fix: remove shared folder * chore: bump vale version * chore: bump vale version * chore: update vale version * chore: resolve conflicts from develop * chore: fix vale issues * chore: fix vale issues * fix: react-native-safe-area-context ios build issue * fix: bottom sheet version * fix: remove flipper debugger * fix: issue with rn-svg on android and rn-video fabric compatibility * fix: animations usage in ImageGallery (#2627) * fix: remove rn-sqlite patch * fix: animations laginess on the ImageGallery and MessageOverlay on new architecture (#2633) * chore: resolve conflicts from develop (#2682) * fix: upgrade firebase versions to fix crash (#2646) * fix: audio recording variety bugs (#2648) * fix: variety of bugs in async audio feature * fix: upload of empty messages and console.log cleanup * fix: expo permission race conditions * fix: create pure version of stopRecording() for usage on unmount * fix: remove redundant export * fix: actually amend failing test suites * chore: remove constructors as they are not needed * fix: pr remarks * chore: write some simplistic functionality tests * chore: return class instance rather than class itself for better usability * chore: add more robust tests * fix: linter errors * fix: only display waveform whenever the mic is locked * docs: add Deep Linking guide for the chat SDK (#2651) * fix: change Block user action to Ban user action and UI cookbook for blocking users (#2649) * fix: change Block user action to Ban user action * fix: change Block user action to Ban user action * fix: add back blockUser action and deprecate it * docs: UI Cookbook for Blocking users * chore(release): 5.36.1 [skip ci] * chore(release): 1.28.1 [skip ci] * fix: issue with loading app settings when the connectUser is not called on app (#2654) * fix: issue with loading app settings when the connectUser is not called on app * fix: add comments * fix: add comments * fix: unable to upload file due to special characters in the file name (#2656) * fix: sdk size pr (#2657) * [CI] Update SDK Size (#2653) Co-authored-by: Khushal Agarwal <khushal.agarwal987@gmail.com> Co-authored-by: Stream Bot <runner@fv-az1148-731.o3ts4yn1huletmfehy03vvfvxg.dx.internal.cloudapp.net> * chore(release): 5.36.2 [skip ci] * chore(release): 1.28.2 [skip ci] * feat: add live location sharing cookbook (#2659) * feat: add live location ui cookbook * fix: prettier lint * Update docusaurus/docs/reactnative/guides/live-location-sharing.mdx Co-authored-by: Oliver Lazoroski <oliver.lazoroski@gmail.com> * lint fixes * fix lint issues * fix locks * move to ruby 3.1 and greater --------- Co-authored-by: Oliver Lazoroski <oliver.lazoroski@gmail.com> * chore(release): 5.37.0 [skip ci] * chore(release): 1.29.0 [skip ci] * fix: avoid prepending http before native supported url schemes (#2661) * fix: avoid prepending http before native supported url schemes * fix: move check to link parsing module * fix: bad memoisation in window, screen dimension listener hooks (#2664) * fix: bad memoisation in window, screen dimension listener hooks * remove unused variable * feat: add create chat client hook for easy usage (#2660) * feat: add create chat client hook for easy usage * docs: use useCreateChatClient hook for client creation * fix: bump fastlane plugin version (#2665) * fix: add theme properties for EmptyStateIndicator for message list (#2667) * fix: add theme properties for EmptyStateIndicator for message list * fix: update snapshots * fix: apply card cover theme property order * fix: pagination typescript errors and db synchronization bugs (#2669) * fix: pagination typescript errors and db synchronization bugs * chore: write test for db serialization issue * fix: linter issues * [CI] Bump max tolerance for sdk size analysis (#2674) * chore: bump sample app version to v1.30.0 * fix: remove nin and ne operator usage in the SDK and the sample app (#2672) * fix: remove and operator usage in the SDK and the sample app * fix: remove console log * fix: change console log to warn * fix: add improvemnts * fix: import of debouncefunc * fix: import of debouncefunc * fix: restructure queryMembers, queryUsers and ACItriggersettings * fix: error bubbling for suggestions in auto complete input * fix: request image access permissions for iOS only for native image picking (#2677) * fix: properly resolve sendMessage during memoization (#2675) * fix: properly resolve sendMessage during memoization * fix: remedy change so that it does not cause performance issues * chore: revert sendMessage in the dep array * fix: deprecate messageReactions prop and use isMessageActionsVisible instead for messageActions (#2676) * fix: deprecate messageReactions prop and use isMessageActionsVisible instead for messageActions * docs: fix custom message actions * fix: execution logic for showMessageOverlay * chore(release): 5.38.0 [skip ci] * chore(release): 1.29.1 [skip ci] * fix: update yarn.lock for the project (#2681) * fix: copy message action type for message actions (#2679) * chore: update sdk size (#2678) Co-authored-by: Khushal Agarwal <khushal.agarwal987@gmail.com> Co-authored-by: Stream Bot <runner@fv-az1756-392.rxb2ubmju23uthz3oztawtjyeg.dx.internal.cloudapp.net> * chore: resolve conflicts from develop * fix: vale lint issues * fix: new arch project config --------- Co-authored-by: Ivan Sekovanikj <31964049+isekovanic@users.noreply.github.com> Co-authored-by: semantic-release-bot <semantic-release-bot@martynus.net> Co-authored-by: Alexey Alter-Pesotskiy <alex@testableapple.com> Co-authored-by: Stream SDK Bot <60655709+Stream-SDK-Bot@users.noreply.github.com> Co-authored-by: Stream Bot <runner@fv-az1148-731.o3ts4yn1huletmfehy03vvfvxg.dx.internal.cloudapp.net> Co-authored-by: Santhosh Vaiyapuri <3846977+santhoshvai@users.noreply.github.com> Co-authored-by: Oliver Lazoroski <oliver.lazoroski@gmail.com> Co-authored-by: Ivan Sekovanikj <ivan.sekovanikj@getstream.io> Co-authored-by: Stream Bot <runner@fv-az1756-392.rxb2ubmju23uthz3oztawtjyeg.dx.internal.cloudapp.net> * fix: chat.test.ts * chore: cleanup v3 docs setup and e2e tests from project (#2701) * feat: add new message action list and reaction selector UI (#2686) * feat: remove StreamChatRN in favour of a global context ChatConfigContext that allows providing global values (#2703) * fix: remove deprecated code from v6 branch (#2702) * fix: remove deprecated code from v6 branch * fix: remove deprecated code from v6 branch * docs: add deprecated docs * docs: add deprecated docs * chore: resolve conflicts from base branch * docs: improve deprecated docs * chore: resolve conflicts from develop * feat: new reaction list design and improvements to MessageSimple component (#2700) * feat: add new message action list and reaction selector UI * fix: remove unnecessary props from OverlayContext * docs: add comments for the props * tests: add tests for the components * tests: add tests for the components * fix: chat.test.ts * fix: chat.test.ts * fix: add tests for the code * fix: use rn animated to create new modal and add docs * fix: add opacity for the message action list item when pressed * fix: make modal better and change component names * fix: update test snapdhots * docs: message actions customizations * docs: message actions customizations * fix: theme improvements * fix: message component render improvements * docs: update migration guide * feat: new reaction list design and improvements to MessageSimple component * tests: add tests for the components * docs: reaction list new design docs * docs: add changes to migration guide * docs: add changes to migration guide * docs: add changes to migration guide * chore: resolve conflicts from base branch * chore: resolve conflicts from base branch * fix: sample app overlay backdrop bug * fix: reaction list type * feat: add FlatList for Reaction Picker * feat: add FlatList for Reaction Picker * feat: add FlatList for Reaction Picker * fix: circular dependency issue * fix: upgrade expo to latest in expo messaging app * fix: padding for reaction picker * fix: update dependencies for native cli apps * fix: add Flatlist mvcp as optional package and peer deps versions (#2720) * fix: add Flatlist mvcp as optional package and peer deps versions * fix: add Flatlist mvcp as optional package and peer deps versions * docs: fix native handler docs * docs: fix vale issues * docs: remove native handler docs * fix: lint issues * fix: design issues with ReactionList bottom UI (#2717) * fix: design issues with ReactionList bottom UI * fix: vale issues * fix: add a log that complains for removal for mvcp package on RN version <0.72 (#2724) * fix: add a log that complains for removal for mvcp package on RN version <0.72 * fix: add a log that complains for removal for mvcp package on RN version <0.72 * fix: build issues * fix: add variable under the if block Co-authored-by: Oliver Lazoroski <oliver.lazoroski@gmail.com> * fix: log --------- Co-authored-by: Oliver Lazoroski <oliver.lazoroski@gmail.com> * fix: bottom sheet modal improvements * fix: use process reactions improvements for thread list * docs: docusaurus setup for v6 release (#2721) * docs: docusaurus setup for v6 release * docs: docusaurus setup for v6 release * docs: fix vale issues * docs: add v5 docs to v5 folder * chore: setup workflow and improve migration guide for v6 rc release (#2727) * fix: linting issues * featv6 rc release * feat!: v6 rc release * feat!: v6 rc release * BREAKING CHANGE: v6 rc release * fix: upgrade react native version in sample apps to 0.73.10 (#2728) * feat!: rc release v6 (#2729) * feat: styles changes for MessageActionList * feat: styles changes for MessageUserReactions * chore: fix noteKeywords in release config * feat: improve Message.tsx render conditional (#2733) BREAKING CHANGE: Update the Message.tsx conditional in the component to use ternary * feat: remove dry run mode from release config BREAKING CHANGE: Update the release config * fix: way of reading the value from animated shared values in the components (#2738) * fix: way of reading the value from animated shared values in the components * fix: unify styles to one hook * fix: lint issues * fix: upgrade the RN version in example apps to 0.75.4 (#2739) * fix: upgrade the RN version in example apps to 0.74.6 * fix: upgrade the RN version in example apps to 0.75.4 * fix: upgrade the RN version in example apps to 0.75.4 * fix: pod install issue * fix: pod install issue * fix: pod install issue * fix: pod install issue * fix: pod install issue * feat: move react native image resizer native module to the SDK (#2751) * feat: move react native image resizer to the native package natively * fix: android and ios native module * fix: add StreamChatReactNative module for ios * fix: add StreamChatReactNative module for ios and android * fix: add StreamChatReactNative module for ios and android * docs: update docs for the removal of the image resizer package * fix: tests for audio controller * fix: tests for audio controller * fix: update sample app * fix: update sample app * fix: update sample app * fix: attachment picker image picker icon visibility as per dependency * fix: changes after merge * fix: lint issues * fix: revalidate pod cache * chore: revert cache revalidation * fix: sender and receiver message theme colors * fix: sender and receiver message theme colors (#2767) * fix: upgrade op-sqlite version to be compatible with latest react native version (#2761) * fix: upgrade op-sqlite version to be compatible with latest react native version * fix: lint issues * docs: add new architecture guide docs * revert: "docs: add new architecture guide docs" This reverts commit be16a66e7759f5737b174777110eaef798922c0c. * docs: fix migration guide * fix: add back set initial state * chore: backport the polls docs to v5 too * fix: add versioned sidebar update as well * chore: upgrade sample apps to RN 0.76.1 and added new arch docs (#2756) * chore: upgrade sample apps to RN 0.76.1 * docs: add new architecture guide * docs: add new architecture guide * fix: vale issues * chore: update the sample apps * fix: poll offline fixes (#2772) * fix: message disallowed indicator display (#2754) * fix: native image picker poll control (#2762) * fix: check for channel validity before consuming config (#2760) * fix: receiverMessageBackgroundColor hotfix (#2763) * fix: receiverMessageBackgroundColor hotfix * fix: tests * chore(release): 5.41.3 [skip ci] * chore(release): 1.31.4 [skip ci] * fix: theme for the message bubble and replies (#2766) * fix: theme for the message bubble and replies * fix: theme for the message bubble and replies * fix: add null coleasing operator * fix: poll edge cases (#2768) * fix: poll related edge cases with offline storage * feat: offline db for polls wip * fix: reconcile own_votes properly * fix: all underlying offline store issues with polls * fix: properly resolve own_votes and latest_answers * fix: remove faulty poll check * chore: remove commented out code * chore: remove log * fix: multiple answers bug and remove logs * chore: remove index as we have primary key * chore(release): 5.41.4 [skip ci] * chore(release): 1.31.5 [skip ci] * fix: errors during resolving conflicts and yarn.locks * fix: pod cache revalidation * fix: lint issues --------- Co-authored-by: semantic-release-bot <semantic-release-bot@martynus.net> Co-authored-by: Khushal Agarwal <khushal.agarwal987@gmail.com> * fix: revert cache revalidation and introduce dummy change in docs to trigger build * fix: resolve lint issues once again * fix: remove channel constants - isAdmin, isOwner and isModerator * fix: offline mode channel hydration issues * fix: remove channel constants - isAdmin, isOwner and isModerator (#2778) * fix: sender and receiver message theme colors * fix: remove channel constants - isAdmin, isOwner and isModerator * fix: faulty build for sample apps * fix: update yarn.lock files to fix build * fix: android modal size * fix: race conditions on db open and close * fix: move dropTables into check as well * fix: crash in some instances of useIsChannelMuted hook invocation * fix: properly use hook in channel preview * fix: edge cases and test * fix: regex state machine stack depth crash * fix: update test * fix: channel hook regressions * fix: expo media library permissions race conditions * feat: enable moderation v2 on the sdk and sample apps * fix: listen to correct channel read events * fix: add FlatList default for Expo * feat: add support for membership customization * fix: modify deployment workflow of SampleApp so that we get a release * fix: try bumping firebase version * fix: revert FB changes and CODE_SIGN_STYLE regression * fix: PROVISIONING_PROFILE_SPECIFIER specific val * fix: certificate distribution settings * fix: upgrade bottom sheet and fix reanimated errors in new arch (#2806) * fix: upgrade bottom sheet to get rid of warnings * fix: add sample app yarn.lock as well * fix: all remnants of reanimated errors * fix: update peer dependencies * fix: channel.state break on going to background * fix: expo media library exceptions in new arch * chore: resolve conflicts from develop on v6 (#2813) * chore(release): 5.42.0 [skip ci] * chore(release): 1.31.6 [skip ci] * fix: android modal size (#2784) * fix: backport crash fix (#2787) * fix: crash in some instances of useIsChannelMuted hook invocation * fix: properly use hook in channel preview * fix: edge cases and test * chore(release): 5.42.1 [skip ci] * chore(release): 1.31.7 [skip ci] * fix: recursion depth on regex parse issue (#2790) * fix: channel hook regressions * fix: expo media library permissions race conditions * fix: listen to correct channel read events * chore(release): 5.42.2 [skip ci] * chore(release): 1.31.8 [skip ci] * feat: moderation v2 support (#2801) * feat: enable moderation v2 on the sdk and sample apps * chore: update yarn.lock files as well * feat: add support for membership customization (#2802) * feat: add support for membership customization * fix: lint issues * chore(release): 5.43.0 [skip ci] * chore(release): 1.32.0 [skip ci] * fix: channel.state break on going to background (#2809) * chore(release): 5.43.1 [skip ci] * chore(release): 1.32.1 [skip ci] * chore: resolve conflicts from develop on v6 --------- Co-authored-by: Ivan Sekovanikj <31964049+isekovanic@users.noreply.github.com> Co-authored-by: semantic-release-bot <semantic-release-bot@martynus.net> Co-authored-by: Ivan Sekovanikj <ivan.sekovanikj@getstream.io> * fix: camera roll issues * fix: refactor photo resolution to native level * fix: expo media library * fix: properly resolve videos too * chore: remove console.log * chore: update yarn.lock files for example apps * fix: bring back camera-roll to SampleApp * fix: also podfile.lock * fix: remove console.log * fix: issues with video preview * chore: remove console.log * chore: resolve conflicts from develop * feat: ai-bot integration poc (#2819) * feat: add StreamingMessageView to kick off ai feature * fix: issues with message view * feat: add AITypingIndicatorView * feat: make send message button react to ai state * fix: improve typewriter animation * fix: improvements in ui and typewriter * chore: add customizations to StreamingMessageView * fix: hook deps * chore: extract logic in hook * fix: custom events * fix: revert the type change in favor of changes in the LLC * feat: codeblock scrollable view * feat: table initial reimpl * feat: finish table impl * fix: horizontal scroll list performance issues * feat: add markdown parsing fixes, optimistic code capture and various improvements * fix: theme prop and theming in general * fix: remove edited lalbel for ai messages * fix: bug with stop streaming button and types * fix: colors in md rendering * fix: rename custom scrollview * chore: translations * fix: remove TODO * chore: extract indicator styles in theme * fix: safeguard if channel does not exist * fix: get rid of enum and introduce proper type * fix: allow only message overrides * chore: update event names as per the changes * fix: bump stream-chat-js version to v8.46.0 * fix: use channel method for sending events * fix: cover background mode case * fix: use type from LLC * chore: add jsdocs * fix: move check to checker fn * fix: add overrides for StreamingMessageView * chore: add override for stop streaming button * chore: upgrade expo sample app to expo 52 * fix: remove unnecessary android and ios permissions * chore: update yarn.lock files * refactor: remove stale subscriber count logic and types refactor (#2832) * refactor: remove stale subscriber count logic and types refactor (#2782) * fix: lint issues * feat: Message list pagination implementation using hasPrev and hasNext (#2799) * refactor: remove stale subscriber count logic and types refactor (#2782) * feat: new message list pagination implementation * fix: channel state initial data * fix: revert back the onStartReached change * fix: lint and tests * fix: added tests for the hooks and message pagination * fix: podlock file for sample app * fix: throttle logic for the copy message state * fix: add back channel.deleted event * fix: useeffect deps * fix: add theme for the bottom sheet styles and message user reactions item (#2827) * fix: refactor some of the buttons * fix: refactor context usage * fix: solve final cyclical dep * fix: add corrected app.json * fix: convert all poll buttons to pressables * fix: lint issues (that somehow passed without issues before) * chore: move add comment button to correct file * fix: move vote button to correct file too * fix: image gallery issues (#2835) * fix: infinite image loading issue * fix: image gallery animations issue * fix: remove unnecessary logs * fix: image gallery header and footer safe area view (#2840) * chore: remove disable if frozen channel (#2841) * chore: write tests for disallowed sending messages (#2839) * chore: write tests for disallowed sending messages * fix: make test name more concise * chore: remove redundant assertion * chore: add test for the editing state as well * fix: only disable message input ui when capabilities change (#2836) * chore: remove disableIfFrozenChannel prop * fix: lint issues * fix: old arch image resizer native module spec file name fix (#2842) * fix: image gallery header and footer safe area view * fix: old arch image resizer native module spec file name fix * chore: fix all of the GH workflow stuff related to v6 in prep for releasing (#2843) --------- Co-authored-by: Khushal Agarwal <khushal.agarwal987@gmail.com> Co-authored-by: semantic-release-bot <semantic-release-bot@martynus.net> Co-authored-by: Alexey Alter-Pesotskiy <alex@testableapple.com> Co-authored-by: Stream SDK Bot <60655709+Stream-SDK-Bot@users.noreply.github.com> Co-authored-by: Stream Bot <runner@fv-az1148-731.o3ts4yn1huletmfehy03vvfvxg.dx.internal.cloudapp.net> Co-authored-by: Santhosh Vaiyapuri <3846977+santhoshvai@users.noreply.github.com> Co-authored-by: Oliver Lazoroski <oliver.lazoroski@gmail.com> Co-authored-by: Stream Bot <runner@fv-az1756-392.rxb2ubmju23uthz3oztawtjyeg.dx.internal.cloudapp.net> | 1 年前 | |
fix: expo clipboard and extend with cb api (#3758) ## 🎯 Goal Resolves [this Zendesk ticket](https://getstream.zendesk.com/agent/tickets/82587). ## 🛠 Implementation details `expo-clipboard` has changed their API from the synchronous `setString` to the asynchronous `setStringAsync`. Our optional dependency for this exact purpose was never really updated and so copying messages did not work whenever using `stream-chat-expo`. In this PR we address that. Additionally, I noticed that a confirmation/failure snackbar was missing from the clipboard feature and so we add one as well. Since changing to an async API is technically breaking, we'll rely on the success/failure callbacks for now and update this in the next major. We anyway want to get rid of the dependencies to these super small libraries and keep them inhouse. Will be backported to V8 as well. ## 🎨 UI Changes <!-- Add relevant screenshots --> <details> <summary>iOS</summary> <table> <thead> <tr> <td>Before</td> <td>After</td> </tr> </thead> <tbody> <tr> <td> <!--<img src="" /> --> </td> <td> <!--<img src="" /> --> </td> </tr> </tbody> </table> </details> <details> <summary>Android</summary> <table> <thead> <tr> <td>Before</td> <td>After</td> </tr> </thead> <tbody> <tr> <td> <!--<img src="" /> --> </td> <td> <!--<img src="" /> --> </td> </tr> </tbody> </table> </details> ## 🧪 Testing <!-- Explain how this change can be tested (or why it can't be tested) --> ## ☑️ Checklist - [ ] I have signed the [Stream CLA](https://docs.google.com/forms/d/e/1FAIpQLScFKsKkAJI7mhCr7K9rEIOpqIDThrWxuvxnwUq2XkHyG154vQ/viewform) (required) - [ ] PR targets the `develop` branch - [ ] Documentation is updated - [ ] New code is tested in main example apps, including all possible scenarios - [ ] SampleApp iOS and Android - [ ] Expo iOS and Android | 1 个月前 | |
chore: upgrade to TypeScript 6.0.3, ES2022 target, and shared ts-config presets (#3663) ## What & why Upgrades every workspace to **TypeScript 6.0.3** with **`target: ES2022`**, and removes tsconfig duplication via a new shared preset package. Enabling type-checking across the previously-unchecked packages also surfaced (and this PR fixes) a pre-existing bug in the core package's published type resolution plus a batch of latent type errors. ## Changes ### Shared config - New **private** `@stream-io/typescript-config` workspace (`configs/typescript-config/`): - `base.json` — cross-cutting policy (ES2022 target, strict, interop, …) - `library.json` — full React Native library config (extends `base`) - Core, the native/expo wrappers, and all 3 example apps extend these instead of duplicating compiler options. Example apps array-extend `["<framework base>", "@stream-io/typescript-config/base.json"]`. ### TypeScript 6.0.3 / ES2022 - TS `6.0.3` in all 7 manifests; `target: ES2022` everywhere. - `lib` kept at `ESNext` — the SDK uses the ES2023 `Array.prototype.toReversed()`. - TS 6.0 no longer auto-includes `@types/jest`, so it's referenced explicitly from a test-only `package/src/__tests__/jest-globals.d.ts` (excluded from the published build). ### Core publishing fix (consumer-facing) - `react-native-builder-bob` emitted declarations under `lib/typescript/src/` while `package.json#types` pointed at `lib/typescript/index.d.ts` — so TS consumers couldn't resolve the SDK's types via `types`. Added `rootDir: "./src"` so declarations emit flat to match `types`. This was also the root cause that blocked the wrappers/examples from resolving core's types. - Exported `PickImageOptions` from the core entrypoint (defined+exported in `native.ts` but never surfaced from `index`). ### Wrappers (`stream-chat-react-native`, `stream-chat-expo`) - Added a `typecheck` script + tsconfig (they had neither). The dynamic optional-`require` shims relax `noImplicitAny`/`strictNullChecks`/unused checks (kept `noImplicitReturns`). - Fixed real bugs: missing `return`s in `shareImage`, missing `resizeMode`/`rate` on the video shim, an inconsistent `startRecording` return shape. ### Example apps - Fixed ~60 pre-existing latent type errors unmasked by enabling typecheck: theme palette typing (the legacy flat `colors` palette, read via a local `AppTheme` cast — behavior-preserving), null-safety guards, and several SDK-API-drift fixes. ### CI - `check-pr.yml` now runs `yarn typecheck` across the whole workspace (core + 2 wrappers + 3 examples) instead of only the core package; the root `typecheck` aggregate includes the wrappers. ## Verification - `yarn build` ✅ - `yarn typecheck` (core + 2 wrappers + 3 examples) ✅ **0 errors** - `yarn lint` ✅ ## Notes for reviewers - **Commit type**: filed as `chore:` (release-neutral). The core changes (flat `types` path + `PickImageOptions` export) are genuinely consumer-facing — if you want them shipped, retype as `fix:` to cut a patch. - **Wrapper strictness**: `strictNullChecks`/`noImplicitAny` are relaxed **only** for the two wrapper packages (dynamic optional-dep shims), not for core. - **Example theming**: the apps' custom `colors` palette was already inert for SDK theming (the SDK reads semantics/primitives, not `theme.colors`); this PR preserves that behavior. Migrating the palette to the token model to restore custom branding would be a separate enhancement. - Did not run the full unit suite locally (the only core source change is the additive `PickImageOptions` export); CI runs `test:coverage`. --------- Co-authored-by: Ivan Sekovanikj <ivan.sekovanikj@getstream.io> | 2 个月前 | |
feat: on the fly thumbnail generation (#3523) ## 🎯 Goal This PR adds native video thumbnail generation for local assets and wires it into the attachment flows. The rationale' behind the PR is the fact that starting RN 0.84 and onwards, `ImageBackground` can no longer reliably render `ph:///` video assets on iOS (and probably other edge cases too). Thumbnails are now generated natively on iOS and Android for local video assets coming from the attachment picker / image picker / camera flows, cached in the app cache directory, and reused if they were already generated before. The native API is batched, so we can generate multiple thumbnails in one go instead of doing them one by one. The module only handles local assets. If thumbnail generation fails for a single video, we soft fail that item only and fall back to the existing placeholder / no thumbnail UI instead of failing the whole batch. So in other words: - added native video thumbnail generation on iOS and Android under shared-native - exposed it through a new TurboModule `StreamVideoThumbnail` API - batched thumbnail generation for `getPhotos`, `pickImage`, and `takePhoto` - added deterministic cache reuse for generated thumbnails - limited concurrent native generation to avoid decode storms - made thumbnail generation best-effort per item: - native returns `{ uri, error }` per requested asset - failed items no longer fail the whole batch - restricted `thumbnail` generation for local assets only - Android: raw path, `file://`, `content://` - iOS: raw path, `file://`, `ph://` - switched attachment picker items and image upload previews away from ImageBackground to plain Image Notes - this is new architecture only - thumbnails are written to the app cache dir, so they can survive relaunches but are still disposable cache - existing cached thumbnails from the old cache folder name will not be reused ## 🛠 Implementation details <!-- Provide a description of the implementation --> ## 🎨 UI Changes <!-- Add relevant screenshots --> <details> <summary>iOS</summary> <table> <thead> <tr> <td>Before</td> <td>After</td> </tr> </thead> <tbody> <tr> <td> <!--<img src="" /> --> </td> <td> <!--<img src="" /> --> </td> </tr> </tbody> </table> </details> <details> <summary>Android</summary> <table> <thead> <tr> <td>Before</td> <td>After</td> </tr> </thead> <tbody> <tr> <td> <!--<img src="" /> --> </td> <td> <!--<img src="" /> --> </td> </tr> </tbody> </table> </details> ## 🧪 Testing <!-- Explain how this change can be tested (or why it can't be tested) --> ## ☑️ Checklist - [ ] I have signed the [Stream CLA](https://docs.google.com/forms/d/e/1FAIpQLScFKsKkAJI7mhCr7K9rEIOpqIDThrWxuvxnwUq2XkHyG154vQ/viewform) (required) - [ ] PR targets the `develop` branch - [ ] Documentation is updated - [ ] New code is tested in main example apps, including all possible scenarios - [ ] SampleApp iOS and Android - [ ] Expo iOS and Android | 6 个月前 | |
refactor: optional dependency resturcture in native-package (#1983) | 3 年前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 5 个月前 | ||
| 2 个月前 | ||
| 2 个月前 | ||
| 1 年前 | ||
| 6 个月前 | ||
| 6 个月前 | ||
| 3 个月前 | ||
| 1 年前 | ||
| 6 个月前 | ||
| 1 年前 | ||
| 6 个月前 | ||
| 1 年前 | ||
| 6 个月前 | ||
| 1 年前 | ||
| 5 个月前 | ||
| 6 个月前 | ||
| 1 年前 | ||
| 1 个月前 | ||
| 2 个月前 | ||
| 6 个月前 | ||
| 3 年前 |