Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3756850
D9481.id32105.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D9481.id32105.diff
View Options
diff --git a/web/chat/chat-message-list.css b/web/chat/chat-message-list.css
--- a/web/chat/chat-message-list.css
+++ b/web/chat/chat-message-list.css
@@ -87,7 +87,12 @@
span.authorName {
color: #777777;
font-size: 14px;
- padding: 4px 56px;
+ margin: 4px 56px;
+ align-self: baseline;
+}
+
+span.authorName:hover {
+ cursor: pointer;
}
div.darkTextMessage {
@@ -221,11 +226,14 @@
div.avatarContainer {
display: flex;
- height: 100%;
- align-items: flex-end;
+ align-self: flex-end;
margin: 0 4px 0 12px;
}
+div.avatarContainer:hover {
+ cursor: pointer;
+}
+
div.avatarOffset {
width: 40px;
}
diff --git a/web/chat/composed-message.react.js b/web/chat/composed-message.react.js
--- a/web/chat/composed-message.react.js
+++ b/web/chat/composed-message.react.js
@@ -21,6 +21,7 @@
import UserAvatar from '../avatars/user-avatar.react.js';
import CommIcon from '../CommIcon.react.js';
import { type InputState, InputStateContext } from '../input/input-state.js';
+import { usePushUserProfileModal } from '../modals/user-profile/user-profile-utils.js';
import { useMessageTooltip } from '../utils/tooltip-action-utils.js';
import { tooltipPositions } from '../utils/tooltip-utils.js';
@@ -65,6 +66,7 @@
+onMouseEnter: (event: SyntheticEvent<HTMLDivElement>) => mixed,
+containsInlineEngagement: boolean,
+stringForUser: ?string,
+ +onClickUser: () => mixed,
};
class ComposedMessage extends React.PureComponent<Props> {
static defaultProps: { +borderRadius: number } = {
@@ -103,7 +105,11 @@
let authorName = null;
const { stringForUser } = this.props;
if (stringForUser) {
- authorName = <span className={css.authorName}>{stringForUser}</span>;
+ authorName = (
+ <span className={css.authorName} onClick={this.props.onClickUser}>
+ {stringForUser}
+ </span>
+ );
}
let deliveryIcon = null;
@@ -155,7 +161,7 @@
let avatar;
if (!isViewer && item.endsCluster) {
avatar = (
- <div className={css.avatarContainer}>
+ <div className={css.avatarContainer} onClick={this.props.onClickUser}>
<UserAvatar size="S" userID={creator.id} />
</div>
);
@@ -234,6 +240,8 @@
const shouldShowUsername = !isViewer && item.startsCluster;
const stringForUser = useStringForUser(shouldShowUsername ? creator : null);
+ const pushUserProfileModal = usePushUserProfileModal(creator.id);
+
return (
<ComposedMessage
{...props}
@@ -242,6 +250,7 @@
onMouseEnter={onMouseEnter}
containsInlineEngagement={containsInlineEngagement}
stringForUser={stringForUser}
+ onClickUser={pushUserProfileModal}
/>
);
});
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Jan 11, 6:12 AM (20 h, 52 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2858335
Default Alt Text
D9481.id32105.diff (2 KB)
Attached To
Mode
D9481: [web] make user profile accessible from message author avatar + name
Attached
Detach File
Event Timeline
Log In to Comment