feat: Implement microphone monitoring feature; enhance text overflow handling and line height across components
This commit is contained in:
@@ -159,6 +159,24 @@ export function RenderMessageContent({
|
||||
</>
|
||||
);
|
||||
|
||||
// Check for custom renderer from plugins BEFORE standard type handling
|
||||
// so plugins can intercept any msgtype including custom ones.
|
||||
const customRendererEarly = pluginRegistry.getRenderer('message');
|
||||
if (customRendererEarly) {
|
||||
try {
|
||||
const messageDataEarly = {
|
||||
msgtype: msgType,
|
||||
...getContent(),
|
||||
};
|
||||
const customContentEarly = customRendererEarly(messageDataEarly, () => null);
|
||||
if (customContentEarly) {
|
||||
return customContentEarly as React.ReactElement;
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('[RenderMessageContent] Custom renderer error (early):', error);
|
||||
}
|
||||
}
|
||||
|
||||
if (msgType === MsgType.Text) {
|
||||
return (
|
||||
<MText
|
||||
|
||||
@@ -32,7 +32,9 @@ export const Reply = style({
|
||||
|
||||
export const ReplyContent = style({
|
||||
opacity: config.opacity.P300,
|
||||
|
||||
overflow: 'clip',
|
||||
overflowY: 'clip',
|
||||
lineHeight: '1.5',
|
||||
selectors: {
|
||||
[`${Reply}:hover &`]: {
|
||||
opacity: config.opacity.P500,
|
||||
|
||||
@@ -188,8 +188,10 @@ export const BubbleLeftArrow = style({
|
||||
|
||||
export const Username = style({
|
||||
overflow: 'hidden',
|
||||
overflowY: 'clip',
|
||||
whiteSpace: 'nowrap',
|
||||
textOverflow: 'ellipsis',
|
||||
lineHeight: '1.5',
|
||||
// Allow text selection while keeping button clickable
|
||||
userSelect: 'text',
|
||||
WebkitUserSelect: 'text',
|
||||
@@ -210,6 +212,9 @@ export const UsernameBold = style({
|
||||
export const MessageTextBody = recipe({
|
||||
base: {
|
||||
wordBreak: 'break-word',
|
||||
overflow: 'clip',
|
||||
overflowY: 'clip',
|
||||
lineHeight: '1.5',
|
||||
},
|
||||
variants: {
|
||||
preWrap: {
|
||||
|
||||
Reference in New Issue
Block a user