Add keyboard activation to the interactive elements and use stable keys. [skip build]
Checks / checks (push) Successful in 2m8s
Trigger cinny-mobile / dispatch (push) Successful in 1s

This commit is contained in:
2026-11-01 21:32:32 +11:00
parent 664b7eb739
commit eaa9ac00dd
8 changed files with 54 additions and 30 deletions
@@ -3,7 +3,6 @@ import { isKeyHotkey } from 'is-hotkey';
import { Editor } from 'slate';
import { IconButton, Line, PopOut } from 'folds';
import { useAtomValue } from 'jotai';
import { Room } from 'matrix-js-sdk';
import { Icon, Icons } from '../../components/icons';
import {
CustomEditor,
@@ -28,7 +27,6 @@ import { PluginButtonSlot } from '../settings/plugins/PluginButtonSlot';
type ForumChatComposerProps = {
editor: Editor;
roomId: string;
room: Room;
placeholder?: string;
onSend?: () => void;
showAttachButton?: boolean;
@@ -39,7 +37,6 @@ type ForumChatComposerProps = {
export function ForumChatComposer({
editor,
roomId,
room,
placeholder = 'Send a message…',
onSend,
showAttachButton = false,
+3 -12
View File
@@ -1,4 +1,4 @@
import React, { ChangeEvent, useCallback, useEffect, useMemo, useRef, useState } from 'react';
import React, { ChangeEvent, useCallback, useEffect, useMemo, useState } from 'react';
import classNames from 'classnames';
import { Box, Text, Input, Avatar, Button, config, Spinner, color, toRem } from 'folds';
import { HexColorPicker } from 'react-colorful';
@@ -38,13 +38,7 @@ import {
/**
* Banner upload component for user's profile banner (MSC4427 via MSC4133).
*/
function ProfileBanner({
avatarRef,
nameRef,
}: {
avatarRef: React.RefObject<HTMLDivElement>;
nameRef: React.RefObject<HTMLDivElement>;
}) {
function ProfileBanner() {
const mx = useMatrixClient();
const useAuthentication = useMediaAuthentication();
const userId = mx.getUserId()!;
@@ -1207,8 +1201,5 @@ function ProfileBanner({
}
export function Profile() {
const avatarRef = useRef<HTMLDivElement>(null);
const nameRef = useRef<HTMLDivElement>(null);
return <ProfileBanner avatarRef={avatarRef} nameRef={nameRef} />;
return <ProfileBanner />;
}