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
## Breaking Changes
### Removed deprecated `sortReactionDetails` prop and
`ReactionDetailsComparator` type
The `sortReactionDetails` prop has been removed from the following
components and contexts:
- `MessageProps` (and by extension `Message` component)
- `MessageContextValue` (and by extension `MessageContext`)
- `MessageReactionsProps` (and by extension `MessageReactions`
component)
- `MessageReactionsDetailProps` (and by extension
`MessageReactionsDetail` component)
- `MessageListProps` (and by extension `MessageList` component)
- `VirtualizedMessageListProps` (and by extension
`VirtualizedMessageList` component)
The `ReactionDetailsComparator` type export has been removed from
`src/components/Reactions/types.ts`.
**Migration:** Replace all usages of `sortReactionDetails` with the
`reactionDetailsSort` prop, which accepts a `ReactionSort` object
(server-side sort) instead of a client-side comparator function.
### Removed deprecated `reaction_counts` prop from
`MessageReactionsProps`
The `reaction_counts` prop on `MessageReactions` has been removed. It
was previously ignored at runtime.
**Migration:** Use `reaction_groups` instead, which provides richer
per-reaction-type summary data (including `count`).
### Removed deprecated `reactionOptions` prop from
`MessageReactionsProps`
The `reactionOptions` prop on `MessageReactions` has been removed. The
component now reads `reactionOptions` exclusively from
`ComponentContext`.
**Migration:** Pass `reactionOptions` via `<WithComponents overrides={{
reactionOptions }}>...</WithComponents>` instead of directly on
`<MessageReactions>`.
### `UseProcessReactionsParams` no longer accepts `reaction_counts` or
`reactionOptions`
The `UseProcessReactionsParams` type (used by the `useProcessReactions`
hook) no longer includes `reaction_counts` or `reactionOptions` fields,
consistent with the prop removals above.
## New Features
### `capLimit` prop on `MessageReactions`
A new optional `capLimit` prop allows configuring how many reaction
types are displayed before overflow in each visual style:
```ts
capLimit?: {
clustered?: number; // default: 5
segmented?: number; // default: 4
};
```
Previously, only the `segmented` style (in `top` position) capped
reactions at a hardcoded limit of 4. Now the `clustered` style also caps
displayed reaction types (default: 5), and both limits are configurable.
### `reactionGroups` added to `useProcessReactions` return value
The `useProcessReactions` hook now returns `reactionGroups` (the
resolved `Record<string, ReactionGroupResponse> | undefined`) alongside
the existing return fields.
### `reactionGroups` prop on `MessageReactionsDetail`
`MessageReactionsDetail` now accepts a `reactionGroups` prop used to
determine reaction counts when removing a reaction. This enables the
component to switch to the "all reactions" view when the last reaction
of a given type is removed, instead of attempting to refetch an empty
list.
### `UseProcessReactionsParams` type is now exported
The `UseProcessReactionsParams` type is now exported from
`src/components/Reactions/hooks/useProcessReactions.tsx`, making it
available for consumers who build custom reaction processing logic.
0 commit comments