@poolse/react-ui 3.7.1 → 3.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -4,6 +4,33 @@ All notable changes to `@poolse/react-ui` are documented here. Format follows
4
4
  [Keep a Changelog](https://keepachangelog.com/en/1.1.0/); versions follow
5
5
  [semver](https://semver.org).
6
6
 
7
+ ## [3.8.0] - 2026-11-21
8
+
9
+ ### Added
10
+
11
+ - Keyboard shortcuts scoped to the focused view, overridable: `keymap`,
12
+ `sendOn`, `keyboardShortcuts`, `confirmDelete` on `ConversationView`;
13
+ `keymap` / `onEditLast` on `MessageComposer` and `MentionInput`;
14
+ `DEFAULT_KEYMAP`, `resolveKeymap`, `matchesKey`.
15
+ - Unsent rows (`<SendStatus>`): "Waiting for network…" or "Not sent" with
16
+ Retry / Delete.
17
+ - `<EmptyState>` defaults for an empty channel, conversation list, thread
18
+ and `ConversationList query` with no results (`noResultsState`);
19
+ `emptyState` on `ConversationView` may be a function of `{ readOnly }`.
20
+ - Automated accessibility check (axe-core in vitest).
21
+
22
+ ### Changed
23
+
24
+ - Drafts are per client (`draftsOf(chat)`), keyed by its namespace; the
25
+ pre-3.8 key is moved on first read, and `destroy({ clearStorage: true })`
26
+ removes them.
27
+ - `ThreadView` closes on Esc only while it has focus (it listened on the
28
+ document), so views side by side don't close each other.
29
+ - Message rows are focusable `article`s named "Message from …"; the mention
30
+ textarea drops the invalid `combobox` role; the hidden file input is
31
+ labelled; list sections use valid group markup. Reduced motion disables
32
+ animation and smooth scrolling.
33
+
7
34
  ## [3.7.1] - 2026-11-21
8
35
 
9
36
  ### Fixed
package/README.md CHANGED
@@ -114,6 +114,39 @@ preview>` draws one on its own.
114
114
  link; quotes of them read "Original message deleted". A send refused with
115
115
  `quoted_message_deleted` shows a notice and puts the text back.
116
116
 
117
+ ## Keyboard, offline, empty states, accessibility
118
+
119
+ - **Shortcuts**, scoped to the focused component so an app's own (Cmd+K,
120
+ Cmd+[ …) never collide and two views side by side don't hear each other.
121
+ Composer: Enter sends (`sendOn="mod+enter"`: Enter is a new line,
122
+ Cmd/Ctrl+Enter sends), Shift+Enter new line, ↑ in an empty composer edits
123
+ your last message, Esc cancels the reply. Message list (Tab into it): j / k
124
+ or ↓ / ↑, Home / End, r reply, t thread, e edit, Delete (yours, after
125
+ `confirmDelete`, default `window.confirm`), Esc back to the composer.
126
+ `keymap={{ messageList: { reply: ['q'] }, composer: { editLast: [] } }}`
127
+ overrides (`[]` turns one off); `keyboardShortcuts={false}` turns the list
128
+ ones off. `DEFAULT_KEYMAP`, `resolveKeymap`, `matchesKey` are exported for
129
+ a shortcut sheet. `MessageComposer` / `MentionInput` take `keymap` and
130
+ `onEditLast`.
131
+ - **Unsent messages**: queued (offline) rows read "Waiting for network…" with
132
+ "Send now"; refused ones "Not sent: …" with Retry and Delete
133
+ (`<SendStatus>`). The composer clears either way.
134
+ - **Empty states** that say what to do next (`<EmptyState title hint action>`):
135
+ empty channel (`emptyState` — a node, or `({ readOnly }) => node`),
136
+ conversation list (`emptyState`), `ConversationList query="…"` with no
137
+ matches (`noResultsState`), an empty thread.
138
+ - **Drafts** are per client (server + user): key
139
+ `<client.namespace>:draft:<conversationId>` (the pre-3.8
140
+ `poolse:draft:<user>:<conversation>` is moved on first read);
141
+ `client.destroy({ clearStorage: true })` removes them.
142
+ - **Accessibility**: message rows are `article`s named "Message from …" and
143
+ focusable for the list shortcuts; the composer textarea is labelled and
144
+ announces mention suggestions (`aria-autocomplete`, `aria-activedescendant`);
145
+ reduced motion turns off animation and smooth scrolling. `test/a11y.test.tsx`
146
+ runs axe-core over ConversationView (full and empty), ConversationList
147
+ (rows, sections, empty), ThreadView, MemberList and a failed send; colour
148
+ contrast is covered by the theme's own contrast tests.
149
+
117
150
  ## Components
118
151
 
119
152
  - Composed: `PoolseInbox` (with a ref: `open`, `openDirect`, `openGroup`,