Skip to content

feat: quick dropdown toggle and cleanup#3054

Merged
arnautov-anton merged 6 commits intomasterfrom
feat/quick-dropdown-toggle-and-cleanup
Mar 25, 2026
Merged

feat: quick dropdown toggle and cleanup#3054
arnautov-anton merged 6 commits intomasterfrom
feat/quick-dropdown-toggle-and-cleanup

Conversation

@arnautov-anton
Copy link
Contributor

@arnautov-anton arnautov-anton commented Mar 24, 2026

Breaking Changes

MessageActionSetItem union expanded

MessageActionSetItem now includes a third variant, QuickDropdownToggleActionSetItem. Exhaustive switch/if blocks over the placement field that do not handle 'quick-dropdown-toggle' will produce TypeScript errors.

Dropdown toggle button for MessageActions and ChannelListItemActionButtons is no longer hardcoded

The three-dot dropdown toggle button is no longer rendered inline by MessageActions and ChannelListItemActionButtons. It is now sourced from the action set as a quick-dropdown-toggle placement item. Custom messageActionSet or channelActionSet arrays that previously relied on the built-in toggle button being rendered automatically must now include a quick-dropdown-toggle entry to retain the toggle. Omitting it will suppress the dropdown entirely (quick actions still render).

Before (toggle rendered automatically when dropdown items exist):

const customSet = [{ Component: MyAction, placement: 'dropdown', type: 'my-action' }];
<MessageActions messageActionSet={customSet} />;
// ✅ toggle button appeared automatically

After (toggle must be provided explicitly):

import { defaultMessageActionSet } from 'stream-chat-react';

const customSet = [
  defaultMessageActionSet.find(({ placement }) => placement === 'quick-dropdown-toggle'), // or provide custom button using the source of the default as a reference
  { Component: MyAction, placement: 'dropdown', type: 'my-action' },
];
<MessageActions messageActionSet={customSet} />;
// ✅ toggle button now appears because quick-dropdown-toggle item is included

New Features

New quick-dropdown-toggle action placement

A new 'quick-dropdown-toggle' placement is available for both message and channel action sets. This allows full customization of the button that opens the dropdown context menu. The component receives a forwarded ref (used for dropdown positioning) and must render a <button>.

New exported type:

export type QuickDropdownToggleActionSetItem = {
  Component: React.ComponentType<ComponentPropsWithRef<'button'>>;
  placement: 'quick-dropdown-toggle';
};

Bug Fixes

Avatar CSS variable fix

The Avatar component's border CSS variable was corrected from --border-core-inverted (nonexistent) to --border-core-inverse.

Minor Changes

QuickMessageActionsButton now renders at size='sm'

The QuickMessageActionsButton component now passes size='sm' to the underlying Button, making quick action buttons visually smaller and consistent with the dropdown toggle.

defaultMessageActionSet and defaultChannelActionSet include a quick-dropdown-toggle entry

Both default action sets now ship with a quick-dropdown-toggle item at the beginning of the array. The default toggle renders the three-dot icon (IconDotGrid1x3Horizontal) and manages dialog open/close state.

@github-actions
Copy link

github-actions bot commented Mar 24, 2026

Size Change: +52 B (+0.01%)

Total Size: 769 kB

Filename Size Change
./dist/audioProcessing-js 0 B -1.32 kB (removed) 🏆
./dist/audioProcessing-mjs 0 B -1.31 kB (removed) 🏆
./dist/cjs/audioProcessing.js 1.32 kB +1.32 kB (new file) 🆕
./dist/cjs/emojis.js 2.96 kB +1 B (+0.03%)
./dist/cjs/index.js 236 kB +20 B (+0.01%)
./dist/cjs/mp3-encoder.js 1.27 kB -1 B (-0.08%)
./dist/cjs/WithAudioPlayback.js 89.1 kB +89.1 kB (new file) 🆕
./dist/css/index.css 46.9 kB -3 B (-0.01%)
./dist/es/audioProcessing.mjs 1.31 kB +1.31 kB (new file) 🆕
./dist/es/emojis.mjs 2.48 kB +3 B (+0.12%)
./dist/es/index.mjs 234 kB +29 B (+0.01%)
./dist/es/mp3-encoder.mjs 756 B -2 B (-0.26%)
./dist/es/WithAudioPlayback.mjs 88.8 kB +88.8 kB (new file) 🆕
./dist/WithAudioPlayback-js 0 B -89.1 kB (removed) 🏆
./dist/WithAudioPlayback-mjs 0 B -88.8 kB (removed) 🏆
ℹ️ View Unchanged
Filename Size
./dist/css/v2/emoji-mart.css 1.84 kB
./dist/css/v2/emoji-replacement.css 300 B
./dist/css/v2/index.css 39.4 kB
./dist/css/v2/index.layout.css 22.8 kB

compressed-size-action

@arnautov-anton arnautov-anton force-pushed the feat/quick-dropdown-toggle-and-cleanup branch from 14c2d13 to dca4fac Compare March 24, 2026 18:38
@codecov
Copy link

codecov bot commented Mar 24, 2026

Codecov Report

❌ Patch coverage is 71.21212% with 19 lines in your changes missing coverage. Please review.
✅ Project coverage is 78.92%. Comparing base (c7c1e73) to head (90fa3a2).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
...ListItem/ChannelListItemActionButtons.defaults.tsx 48.48% 17 Missing ⚠️
...s/ChannelListItem/ChannelListItemActionButtons.tsx 66.66% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3054      +/-   ##
==========================================
+ Coverage   78.78%   78.92%   +0.14%     
==========================================
  Files         426      426              
  Lines       12113    12064      -49     
  Branches     3929     3853      -76     
==========================================
- Hits         9543     9522      -21     
+ Misses       2549     2542       -7     
+ Partials       21        0      -21     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@arnautov-anton arnautov-anton marked this pull request as ready for review March 25, 2026 11:41
@arnautov-anton arnautov-anton force-pushed the feat/quick-dropdown-toggle-and-cleanup branch from dca4fac to c0ce2a2 Compare March 25, 2026 11:41
@arnautov-anton arnautov-anton force-pushed the feat/quick-dropdown-toggle-and-cleanup branch from c0ce2a2 to ed806ac Compare March 25, 2026 11:44
@arnautov-anton arnautov-anton force-pushed the feat/quick-dropdown-toggle-and-cleanup branch 8 times, most recently from def406a to 756615b Compare March 25, 2026 14:03
@arnautov-anton arnautov-anton force-pushed the feat/quick-dropdown-toggle-and-cleanup branch 4 times, most recently from 63e4a5f to 2c2129e Compare March 25, 2026 14:30
@arnautov-anton arnautov-anton force-pushed the feat/quick-dropdown-toggle-and-cleanup branch 2 times, most recently from 7440c17 to 90fa3a2 Compare March 25, 2026 14:38
@arnautov-anton arnautov-anton merged commit 30ddab0 into master Mar 25, 2026
14 checks passed
@arnautov-anton arnautov-anton deleted the feat/quick-dropdown-toggle-and-cleanup branch March 25, 2026 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants