You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs(ai-migration): orient agents on the v14 notification and gallery models
Add two short orienting subsections that name the replacement primitives
for pieces scattered across Phase 2 / Phase 5 / Phase 7:
- Notification system (end of Phase 2): useNotificationApi(),
NotificationList, useSystemNotifications() /
useReportLostConnectionSystemNotification(). Consolidates the mental
model behind MessageListNotifications / ConnectionStatus / get*Notification
removals.
- Gallery model (mid Phase 7): ModalGallery vs. Gallery vs. GalleryUI as
three distinct primitives, with a migration shortcut for the common
<Gallery images={...}/> v13 usage.
No teaching content — just enough to point consumers at the right
primitives. Feature docs own the full usage.
-`InfiniteScroll` / `LoadMoreButton` / `LoadMorePaginator`: `hasMoreNewer`, `loadMoreNewer` → no alias; use `hasNextPage` / `loadNextPage` where appropriate
180
180
181
+
### About the v14 notification system
182
+
183
+
The removed pieces above (`MessageListNotifications`, `ConnectionStatus`, `get*Notification` callbacks) were parts of ad-hoc flows. v14 consolidates them into three primitives:
184
+
185
+
-**`useNotificationApi()`** — publish app-owned notifications (toasts, inline feedback). Replaces the old `get*Notification` callback props on `Message` / `MessageList` / `VirtualizedMessageList`.
186
+
-**`NotificationList`** — renders client-emitted notifications inside a panel. Replaces the removed `MessageListNotifications` wrapper. `MessageList`, `VirtualizedMessageList`, `ChannelList`, and `ThreadList` render it by default.
For custom notification text, prefer overriding `Streami18n` translation keys under the `notification` namespace over wrapping `useNotificationApi()` yourself.
190
+
181
191
---
182
192
183
193
## Phase 3 — Move UI Overrides to `WithComponents`
@@ -383,6 +393,19 @@ To preserve the old blank pane, override `EmptyStateIndicator` with a `null`-ret
383
393
- **`Gallery` / `ModalGallery`.** `ModalGallery` API went from `{images, index}` to `{items}` (also accepts `className`, `modalClassName`, `closeOnBackgroundClick`). `Gallery` alone no longer renders a thumbnail grid — supply `GalleryUI` or use `ModalGallery` for the old behavior.
- **`AttachmentProps.Gallery` → `AttachmentProps.ModalGallery`.** `Media` now uses `VideoPlayerProps`, not `ReactPlayerProps`.
396
+
397
+
### About the v14 gallery model
398
+
399
+
`Gallery`, `ModalGallery`, and `GalleryUI` are three distinct primitives in v14, not interchangeable:
400
+
401
+
- **`ModalGallery`** — full replacement for the v13 "thumbnail grid that opens a lightbox" component. Takes `{items}`. Use this when migrating direct `<Galleryimages={...}>` usage.
402
+
- **`Gallery`** — provider-only. Exposes gallery state (active item, close handler) via `GalleryContext` but renders nothing visible unless a `GalleryUI` is supplied.
403
+
- **`GalleryUI`** — the visual layer consumed by `Gallery` / `GalleryContext`. Supply a custom one for a custom carousel / viewer.
404
+
405
+
Migration shortcut: if the v13 usage was `<Galleryimages={...} />`, change the import to `ModalGallery` and pass `items`. Only reach for the provider-style `Gallery` + custom `GalleryUI` if the app genuinely needs carousel customization.
406
+
407
+
Remaining Phase 7 behavior bullets:
408
+
386
409
- **`PinIndicator`** no longer receives `t` as prop — use `useTranslationContext()` inside.
0 commit comments