Repository navigation
4.20.0: chat topic actions and an optional tsyringe peer - #365
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Chat topic lists can offer per-topic actions, and applications no longer need to install
tsyringethemselves.Added
ChatTopicListandChatSidebaraccepttopicActions: labeled buttons next to each topic, such as Rename, Pin or Archive, with an optionalisAvailablecheck 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 existingactionsprop still means message actions. Topics without actions render as before. TheChatTopicActiontype is exported. (ChatTopicList offers no per-topic actions #206)Changed
tsyringeis now an optional peer. Components never imports it, and Arc React installs it as its own dependency, so you no longer need to install it yourself.reflect-metadatastays a required peer: keep installing it and importing it at your entry point. The package check now fails if a published file imports either package. (components peerDependencies require reflect-metadata and tsyringe for every consumer #248)Closes #206, closes #248.