feat: Implement microphone monitoring feature; enhance text overflow handling and line height across components

This commit is contained in:
2026-05-13 03:37:32 +10:00
parent 5d4d518af8
commit 4fdedb87c8
8 changed files with 187 additions and 35 deletions

View File

@@ -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

View File

@@ -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,

View File

@@ -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: {