Repository navigation
Conversation
Adds PinnedMessageBanner component that shows below ChatHeader when a room has pinned messages. Banner displays pin icon, author, truncated message text (80 chars), prev/next navigation with counter, and a dismiss button that uses sessionStorage per room. Clicking the banner body scrolls to the message in the chat with a brief highlight animation. Banner respects ECOptions.showPinnedBanner (default true). Fetching pinned messages now happens unconditionally on auth rather than only when the pinned sidebar is open. Closes RocketChat#1383
This branch has not been deployed
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.
Closes #1383
Adds a pinned message banner that renders between the chat header and
the message list when a room has pinned messages.
What it does:
the current pinned message
N / M counter
short highlight animation
sessionStorage keyed by room ID; reappears on room change or page
reload
ECOptions.showPinnedBannerflag (defaults to true) lets embeddersdisable the banner entirely
pinned sidebar panel is opened, so the banner has data immediately
Files changed:
packages/react/src/views/PinnedMessageBanner/(new component)packages/react/src/views/EmbeddedChat.js(mount banner)packages/react/src/views/ChatLayout/ChatLayout.js(fetch unconditionally)