Skip to content

4.20.0: chat topic actions and an optional tsyringe peer - #365

Merged
woksin merged 9 commits into
mainfrom
feature/release-4200
Sep 28, 2026
Merged

woksin merged 9 commits into
mainfrom
feature/release-4200

Conversation

@woksin

@woksin woksin commented Sep 28, 2026

Copy link
Copy Markdown
Contributor

Chat topic lists can offer per-topic actions, and applications no longer need to install tsyringe themselves.

Added

  • ChatTopicList and ChatSidebar accept topicActions: labeled buttons next to each topic, such as Rename, Pin or Archive, with an optional isAvailable check per topic. Each button's accessible name includes its topic, the buttons can be reached with the keyboard, and activating one does not open the topic. When an action hides itself or removes its topic, focus moves to that topic, to the topic that took its place, or to New topic, unless your handler already moved focus. ChatSidebar's existing actions prop still means message actions. Topics without actions render as before. The ChatTopicAction type is exported. (ChatTopicList offers no per-topic actions #206)

Changed

Closes #206, closes #248.

Expose topicActions on the standalone list and sidebar without changing action-free markup or message actions. Reuse the existing hover/focus action styling to keep packed CSS within its budget. Closes #206.
Arc React already installs tsyringe, and Arc initializes Fundamentals reflection without reflect-metadata. Keep both peer ranges but mark them optional, and exercise the packed root, Display, and an Arc query in absent-peer consumers across CI installers. Closes #248.
…mports

Making reflect-metadata optional would stop npm from installing it for applications
that relied on the documented single-package install and still import it at their
entry point. Only tsyringe, which Components never imports and Arc React installs,
becomes optional. The package archive check now fails if a published file imports
tsyringe or reflect-metadata, and one npm consumer leg installs peers as npm does.
Invoking an action that hides itself or removes its topic returned focus to the
document body. Focus now moves to the same topic, the topic that took its place,
or the New topic button, unless the host already moved it. Topic rows no longer
carry the chat message class; row-specific rules center the reused action overlay.
Focus recovery only applies when the focused action unmounts. An action that
lost focus normally no longer pulls focus back into the list when a later
update removes it. Specs also cover a re-sorted topic and the only topic.
A topic that re-sorted after its action gained focus sent recovery to the wrong
row. The fallback position now comes from the order last rendered. The focus
recovery moves into useTopicActionFocusRecovery and the action buttons into
ChatTopicActions, with no behavior change beyond that fix.
@woksin woksin added the minor label Sep 28, 2026
@woksin woksin self-assigned this Sep 28, 2026
@woksin
woksin merged commit e54484e into main Sep 28, 2026
50 of 51 checks passed
@woksin
woksin deleted the feature/release-4200 branch September 28, 2026 21:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

components peerDependencies require reflect-metadata and tsyringe for every consumer ChatTopicList offers no per-topic actions

1 participant