Skip to content

Ability to hide pinned messages (#28183) #29604

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

marekjm
Copy link

@marekjm marekjm commented Mar 27, 2025

Currently, when a room has pinned messages an annoying, impossible to dismiss bar will be displayed over the message area. This patch introduces the following changes:

  • add a setting to control whether the PinnedMessageBanner is displayed or not (keep current behaviour as default)
  • add a pin icon to the room header

Why allow hiding pinned messages? Because the banner is annoying. I, and judging by the +1s on #28183 a few other users, found it unnecessary to always have it in front of our eyes. The new setting allows us to make it go away.

Why add an icon for pinned messages if you can view pinned messages from room info? I will answer this by posing another question: why display the banner when pinned messages can be viewed from room info? Jokes aside, the icon makes the access quicker--the UX is exactly the same as for threads: you can see then from room info, or by clicking their icon.

Fixes #28183

Checklist

  • I have licensed the changes to Element by completing the Contributor License Agreement (CLA)
  • Tests written for new code (and old code if feasible).
  • New or updated public/exported symbols have accurate TSDoc documentation.
  • Linter and other CI checks pass.

@marekjm marekjm requested a review from a team as a code owner March 27, 2025 14:21
@CLAassistant
Copy link

CLAassistant commented Mar 27, 2025

CLA assistant check
All committers have signed the CLA.

@github-actions github-actions bot added the Z-Community-PR Issue is solved by a community member's PR label Mar 27, 2025
@t3chguy t3chguy requested a review from a team March 27, 2025 14:24
@marekjm marekjm force-pushed the marekjm/ability-to-hide-pinned-messages branch from d17604a to 150de3d Compare March 27, 2025 14:25
@@ -345,6 +346,22 @@ export default function RoomHeader({

{showChatButton && <VideoRoomChatButton room={room} />}

<Tooltip label={_t("right_panel|pinned_messages_button")}>
<IconButton
indicator={notificationLevelToIndicator(threadNotifications)}
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The indicator here is obviously incorrect. I would appreciate some help on what exactly should be used here.

onClick={(evt) => {
evt.stopPropagation();
RightPanelStore.instance.showOrHidePhase(RightPanelPhases.PinnedMessages);
// FIXME Track interaction with PinnedMessages
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This FIXME is another point on which I would appreciate some guidance. Is this tracking needed?

@marekjm marekjm force-pushed the marekjm/ability-to-hide-pinned-messages branch from 150de3d to 15e4470 Compare March 27, 2025 14:44
@florianduros
Copy link
Member

Hi, thanks for contribution!

Before doing the review, we will wait for product point of view on the feature

@marekjm
Copy link
Author

marekjm commented Mar 27, 2025

No problem.

I will give my €0.02 for any deliberations. In a pre-patch discussion I had, an idea was floated that the pins were supposed to always stay on top of the room to inform members of important messages eg, rules or some such (I do not actually know if that was really the idea behind pins), but this is already better addressed using room topic I would say. If necessary, the topic may include "See pinned messages" to direct people to further information--which can now be easily accessed using the pin icon in room header.

@marekjm marekjm force-pushed the marekjm/ability-to-hide-pinned-messages branch 2 times, most recently from 31623bd to c75e5b2 Compare April 1, 2025 22:00
dbkr and others added 2 commits April 15, 2025 23:00
jitsi.md was linked both here and in the 'setup' section and I think
it's more relevant to setup. The duplicate links are now breaking the
deploy for some reason. We probably shouldn't have both.
Currently, when a room has pinned messages an annoying, impossible to
dismiss bar will be displayed over the message area. This patch
introduces the following changes:

 - add a setting to control whether the PinnedMessageBanner is displayed
   or not (keep current behaviour as default)
 - add a pin icon to the room header

Why allow hiding pinned messages? Because the banner is annoying. I, and
judging by the +1s on element-hq#28183 a few other users, found it unnecessary to
always have it in front of our eyes. The new setting allows us to make
it go away.

Why add an icon for pinned messages if you can view pinned messages from
room info? I will answer this by posing another question: why display
the banner when pinned messages can be viewed from room info? Jokes
aside, the icon makes the access quicker--the UX is exactly the same as
for threads: you can see then from room info, or by clicking their icon.

Fixes element-hq#28183
@marekjm marekjm force-pushed the marekjm/ability-to-hide-pinned-messages branch from c75e5b2 to f6459d0 Compare April 15, 2025 21:00
@florianduros florianduros added the X-Needs-Product More input needed from the Product team label Apr 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
X-Needs-Product More input needed from the Product team Z-Community-PR Issue is solved by a community member's PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ability to hide pinned messages.
4 participants