-
Notifications
You must be signed in to change notification settings - Fork 279
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: new MessageActions component #2543
Conversation
Size Change: +23.7 kB (+2.25%) Total Size: 1.08 MB
ℹ️ View Unchanged
|
6ff40f6
to
b2363e3
Compare
70db932
to
f154cd4
Compare
import { defaultMessageActionSet } from './defaults'; | ||
|
||
export type MessageActionSetItem = { | ||
Component: React.ComponentType; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if there's a good way to enforce non-null return type - any suggestions are welcome.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2543 +/- ##
==========================================
+ Coverage 84.78% 84.79% +0.01%
==========================================
Files 392 392
Lines 8197 8196 -1
Branches 2040 2041 +1
==========================================
Hits 6950 6950
+ Misses 960 959 -1
Partials 287 287 ☔ View full report in Codecov by Sentry. |
300da96
to
44ca88c
Compare
## [12.4.0](v12.3.0...v12.4.0) (2024-10-29) ### Features * new MessageActions component ([#2543](#2543)) ([17a1160](17a1160))
🎉 This PR is included in version 12.4.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
The Problem(s)
MessageActions
/MessageOptions
/MessageActionsBox
are a poorly designed set of components which we were trying to patch over the time with things likeCustomMessageActionsList
but with each new patchy addition, the component set got heavier and worse to navigate in when it came to customization.messageActions
prop onMessageList
andVirtualizedMessageList
components allow for key/handler customization:MessageContext
or use translations for different languages (the key is used as button text).CustomMessageActionsList
which allows to render custom buttons within actions dropdown but... when buttons are rendered conditionally, the "..." is still rendered and upon clicking on it, it opens up an empty actions dropdown. This solution also does not allow to adjust "quick actions" (like reply or react).Steps Taken
From Integrator's POV
Next Steps
MessageActions_UNSTABLE