CI / Build & Quality Checks (pull_request) Successful in 1m47s
CI / Trigger Desktop Build (pull_request) Skipped
CI / Docker image build & smoke test (pull_request) Skipped
CI / Secret scan (gitleaks) (pull_request) Successful in 7s
CI / Playwright smoke (e2e) (pull_request) Successful in 12m18s
- Modal500 takes a label: Room/Space Settings ("<name> settings") and
Settings dialogs have accessible names.
- aria-selected on plain buttons (inbox filter chips, date/time picker
chips, verification/usage/notification menu items) -> aria-pressed; the
Permissions power chips open a menu -> aria-haspopup + aria-expanded.
- Labels tied to the room pack name input and the Export From/To dates.
- UserAvatar defaults to alt="" (decorative next to a name / in a
labelled button) unless a caller passes one.
- Composer placeholder: Slate's inline opacity 0.333 overrode the #222
AA-contrast class (2.66:1); it is dropped so the class (0.75) applies.
- e2e/a11y.spec.ts also audits Room Settings → Permissions, Emojis &
Stickers and Export, checks the dialog name, and audits the inbox.
Fixes #278
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017PCb59uY3UKqDqt7B6hzd5
40 lines
1.4 KiB
TypeScript
40 lines
1.4 KiB
TypeScript
import React from 'react';
|
|
import { SpaceSettings } from './SpaceSettings';
|
|
import { Modal500 } from '../../components/Modal500';
|
|
import { useCloseSpaceSettings, useSpaceSettingsState } from '../../state/hooks/spaceSettings';
|
|
import { useAllJoinedRoomsSet, useGetRoom } from '../../hooks/useGetRoom';
|
|
import { SpaceSettingsState } from '../../state/spaceSettings';
|
|
import { RoomProvider } from '../../hooks/useRoom';
|
|
import { SpaceProvider } from '../../hooks/useSpace';
|
|
|
|
type RenderSettingsProps = {
|
|
state: SpaceSettingsState;
|
|
};
|
|
function RenderSettings({ state }: RenderSettingsProps) {
|
|
const { roomId, spaceId, page } = state;
|
|
const closeSettings = useCloseSpaceSettings();
|
|
const allJoinedRooms = useAllJoinedRoomsSet();
|
|
const getRoom = useGetRoom(allJoinedRooms);
|
|
const room = getRoom(roomId);
|
|
const space = spaceId && spaceId !== roomId ? getRoom(spaceId) : undefined;
|
|
|
|
if (!room) return null;
|
|
|
|
return (
|
|
<Modal500 requestClose={closeSettings} label={`${room.name} space settings`}>
|
|
<SpaceProvider value={space ?? null}>
|
|
<RoomProvider value={room}>
|
|
<SpaceSettings initialPage={page} requestClose={closeSettings} />
|
|
</RoomProvider>
|
|
</SpaceProvider>
|
|
</Modal500>
|
|
);
|
|
}
|
|
|
|
export function SpaceSettingsRenderer() {
|
|
const state = useSpaceSettingsState();
|
|
|
|
if (!state) return null;
|
|
return <RenderSettings state={state} />;
|
|
}
|