UX: remove chat and message buttons on currentUser profile (#34513)

Remove the rendering of the chat and message CTA when viewing your own
profile.
They serve little purpose, add to confusion, and take up valuable above
the fold space on mobile.

| Before | After |
|--------|--------|
| <img width="690" height="1490" alt="CleanShot 2025-08-25 at 11 47
24@2x"
src="https://github.com/user-attachments/assets/7d3539b6-5599-448b-b610-00adcacaf28b"
/> | <img width="690" height="1490" alt="CleanShot 2025-08-25 at 11 46
47@2x"
src="https://github.com/user-attachments/assets/1c0b4512-693d-4e39-b1ae-3ee30375e127"
/> |
This commit is contained in:
chapoi
2025-08-25 12:04:29 +02:00
committed by GitHub
parent 9c429cd00e
commit c6b2949d64
2 changed files with 11 additions and 2 deletions
@@ -2,6 +2,7 @@ import { array, concat, fn, hash } from "@ember/helper";
import { LinkTo } from "@ember/routing";
import { htmlSafe } from "@ember/template";
import RouteTemplate from "ember-route-template";
import { and, not } from "truth-helpers";
import DButton from "discourse/components/d-button";
import HtmlWithLinks from "discourse/components/html-with-links";
import PluginOutlet from "discourse/components/plugin-outlet";
@@ -403,7 +404,12 @@ export default RouteTemplate(
<section class="controls">
<ul>
{{#if @controller.model.can_send_private_message_to_user}}
{{#if
(and
@controller.model.can_send_private_message_to_user
(not @controller.viewingSelf)
)
}}
<li>
<DButton
@action={{fn
@@ -1,7 +1,10 @@
import { and, not } from "truth-helpers";
import ChatDirectMessageButton from "../../components/chat/direct-message-button";
const ChatButton = <template>
{{#if @outletArgs.model.can_chat_user}}
{{#if
(and @outletArgs.model.can_chat_user (not @outletArgs.model.isCurrent))
}}
<li class="user-card-below-message-button chat-button">
<ChatDirectMessageButton @user={{@outletArgs.model}} />
</li>