Skip to content

feat: pinned message banner below chat header - #1398

Open
deepak0x wants to merge 1 commit into
RocketChat:developfrom
deepak0x:feat/1383-pinned-message-banner
Open

deepak0x wants to merge 1 commit into
RocketChat:developfrom
deepak0x:feat/1383-pinned-message-banner

Conversation

@deepak0x

Copy link
Copy Markdown
Contributor

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:

  • Shows pin icon, author username, and truncated text (80 chars) for
    the current pinned message
  • Left/right arrow buttons cycle through all pinned messages with a
    N / M counter
  • Clicking the banner body scrolls to the message in the chat with a
    short highlight animation
  • The dismiss button (x) hides the banner for the session using
    sessionStorage keyed by room ID; reappears on room change or page
    reload
  • ECOptions.showPinnedBanner flag (defaults to true) lets embedders
    disable the banner entirely
  • Pinned messages are now fetched on auth rather than only when the
    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)

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

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] feat: Pinned Message Banner below chat header

1 participant