From 7baf38b64756c4bac099d4ed0e7d4a34f5095b95 Mon Sep 17 00:00:00 2001 From: vladislavkeblysh Date: Mon, 16 Oct 2023 12:13:23 +0300 Subject: [PATCH 1/4] feat: fixed editor bar visibility --- src/index.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.scss b/src/index.scss index 8fdbb139f..f8a6406e6 100755 --- a/src/index.scss +++ b/src/index.scss @@ -338,7 +338,7 @@ header { .header-action-bar { background-color: #fff; - z-index: 3; + z-index: 9999 !important; box-shadow: 0px 2px 4px rgb(0 0 0 / 15%), 0px 2px 8px rgb(0 0 0 / 15%); position: sticky; top: 0; From d73d52e1bf0043c6d3ca3c5d1c2cf40fc1654f9b Mon Sep 17 00:00:00 2001 From: vladislavkeblysh Date: Mon, 16 Oct 2023 12:13:23 +0300 Subject: [PATCH 2/4] feat: fixed editor bar visibility --- src/index.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.scss b/src/index.scss index 645fb2984..4d388da24 100755 --- a/src/index.scss +++ b/src/index.scss @@ -331,7 +331,7 @@ header { .header-action-bar { background-color: #fff; - z-index: 3; + z-index: 9999 !important; box-shadow: 0px 2px 4px rgb(0 0 0 / 15%), 0px 2px 8px rgb(0 0 0 / 15%); position: sticky; top: 0; From 657fbae48737d4473d7332b68237c0f4644ef108 Mon Sep 17 00:00:00 2001 From: vladislavkeblysh Date: Fri, 29 Dec 2023 14:42:35 +0200 Subject: [PATCH 3/4] feat: fixed z index --- src/index.scss | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/index.scss b/src/index.scss index 4d388da24..9572f4850 100755 --- a/src/index.scss +++ b/src/index.scss @@ -331,7 +331,7 @@ header { .header-action-bar { background-color: #fff; - z-index: 9999 !important; + z-index: 2 !important; box-shadow: 0px 2px 4px rgb(0 0 0 / 15%), 0px 2px 8px rgb(0 0 0 / 15%); position: sticky; top: 0; @@ -345,6 +345,10 @@ header { } } +.tox-tinymce-aux { + z-index: 1 !important; +} + .breadcrumb-menu { z-index: 1; } From c913f2f6d1ceb6a016e30bbc02a7e9e1a9545cc6 Mon Sep 17 00:00:00 2001 From: vladislavkeblysh Date: Thu, 12 Oct 2023 13:46:58 +0300 Subject: [PATCH 4/4] feat: add profile image to avatar --- .../post-comments/comments/comment/Comment.jsx | 3 ++- .../post-comments/comments/comment/CommentHeader.jsx | 5 +++++ src/discussions/posts/post/Post.jsx | 3 ++- src/discussions/posts/post/PostHeader.jsx | 10 ++++++++-- src/discussions/posts/post/PostLink.jsx | 2 ++ 5 files changed, 19 insertions(+), 4 deletions(-) diff --git a/src/discussions/post-comments/comments/comment/Comment.jsx b/src/discussions/post-comments/comments/comment/Comment.jsx index 7429b4514..0b36bc683 100644 --- a/src/discussions/post-comments/comments/comment/Comment.jsx +++ b/src/discussions/post-comments/comments/comment/Comment.jsx @@ -43,7 +43,7 @@ const Comment = ({ const { id, parentId, childCount, abuseFlagged, endorsed, threadId, endorsedAt, endorsedBy, endorsedByLabel, renderedBody, voted, following, voteCount, authorLabel, author, createdAt, lastEdit, rawBody, closed, closedBy, closeReason, - editByLabel, closedByLabel, + editByLabel, closedByLabel, users: postUsers, } = comment; const intl = useIntl(); const hasChildren = childCount > 0; @@ -203,6 +203,7 @@ const Comment = ({ closed={closed} createdAt={createdAt} lastEdit={lastEdit} + postUsers={postUsers} /> {isEditing ? ( { const colorClass = AvatarOutlineAndLabelColors[authorLabel]; const hasAnyAlert = useAlertBannerVisible({ @@ -25,6 +26,8 @@ const CommentHeader = ({ closed, }); + const profileImage = postUsers && Object.values(postUsers)[0].profile.image; + return (
{ const { topicId, abuseFlagged, closed, pinned, voted, hasEndorsed, following, closedBy, voteCount, groupId, groupName, closeReason, authorLabel, type: postType, author, title, createdAt, renderedBody, lastEdit, editByLabel, - closedByLabel, + closedByLabel, users: postUsers, } = useSelector(selectThread(postId)); const intl = useIntl(); const location = useLocation(); @@ -182,6 +182,7 @@ const Post = ({ handleAddResponseButton }) => { lastEdit={lastEdit} postType={postType} title={title} + postUsers={postUsers} />
diff --git a/src/discussions/posts/post/PostHeader.jsx b/src/discussions/posts/post/PostHeader.jsx index 5708dc51e..eaa3ae8ae 100644 --- a/src/discussions/posts/post/PostHeader.jsx +++ b/src/discussions/posts/post/PostHeader.jsx @@ -13,7 +13,7 @@ import { useAlertBannerVisible } from '../../data/hooks'; import messages from './messages'; export const PostAvatar = React.memo(({ - author, postType, authorLabel, fromPostLink, read, + author, postType, authorLabel, fromPostLink, read, postUsers, }) => { const outlineColor = AvatarOutlineAndLabelColors[authorLabel]; @@ -37,6 +37,8 @@ export const PostAvatar = React.memo(({ return spacing; }, [postType]); + const profileImage = postUsers && Object.values(postUsers)[0].profile.image; + return (
{postType === ThreadType.QUESTION && ( @@ -58,6 +60,7 @@ export const PostAvatar = React.memo(({ height: avatarSize, width: avatarSize, }} + src={profileImage?.hasImage ? profileImage?.imageUrlSmall : undefined} alt={author} />
@@ -70,6 +73,7 @@ PostAvatar.propTypes = { authorLabel: PropTypes.string, fromPostLink: PropTypes.bool, read: PropTypes.bool, + postUsers: PropTypes.shape({}).isRequired, }; PostAvatar.defaultProps = { @@ -89,6 +93,7 @@ const PostHeader = ({ title, postType, preview, + postUsers, }) => { const intl = useIntl(); const showAnsweredBadge = preview && hasEndorsed && postType === ThreadType.QUESTION; @@ -100,7 +105,7 @@ const PostHeader = ({ return (
- +
@@ -150,6 +155,7 @@ PostHeader.propTypes = { reason: PropTypes.string, }), closed: PropTypes.bool, + postUsers: PropTypes.shape({}).isRequired, }; PostHeader.defaultProps = { diff --git a/src/discussions/posts/post/PostLink.jsx b/src/discussions/posts/post/PostLink.jsx index 5035c35fa..89e349ec6 100644 --- a/src/discussions/posts/post/PostLink.jsx +++ b/src/discussions/posts/post/PostLink.jsx @@ -37,6 +37,7 @@ const PostLink = ({ const { topicId, hasEndorsed, type, author, authorLabel, abuseFlagged, abuseFlaggedCount, read, commentCount, unreadCommentCount, id, pinned, previewBody, title, voted, voteCount, following, groupId, groupName, createdAt, + users: postUsers, } = useSelector(selectThread(postId)); const { pathname } = discussionsPath(Routes.COMMENTS.PAGES[page], { 0: enableInContextSidebar ? 'in-context' : undefined, @@ -84,6 +85,7 @@ const PostLink = ({ authorLabel={authorLabel} fromPostLink read={isPostRead} + postUsers={postUsers} />