From a545d0b9f6869e64b1ada9afa20a76503ffe7c17 Mon Sep 17 00:00:00 2001 From: ayesha waris <73840786+ayesha-waris@users.noreply.github.com> Date: Mon, 27 May 2024 16:48:53 +0500 Subject: [PATCH] fix: responsiveness of MFE discussions (#697) * fix: fixed sidebar xl screen width * fix: fixed failing test runs * refactor: removed unused css classes --- src/discussions/common/ActionsDropdown.jsx | 2 +- src/discussions/common/AuthorLabel.jsx | 4 +- .../ContentUnavailable.jsx | 2 +- .../discussions-home/DiscussionsHome.jsx | 2 +- .../learners/learner/LearnerCard.jsx | 2 +- .../post-comments/comments/CommentsView.jsx | 4 +- .../comments/comment/Comment.jsx | 4 +- .../posts/post-editor/PostEditor.jsx | 6 +- .../posts/post-filter-bar/PostFilterBar.jsx | 2 +- src/discussions/posts/post/Post.jsx | 10 +- src/discussions/posts/post/PostLink.jsx | 4 +- src/index.scss | 102 ++++++++++++++++-- 12 files changed, 112 insertions(+), 32 deletions(-) diff --git a/src/discussions/common/ActionsDropdown.jsx b/src/discussions/common/ActionsDropdown.jsx index d5601f269..279b4066a 100644 --- a/src/discussions/common/ActionsDropdown.jsx +++ b/src/discussions/common/ActionsDropdown.jsx @@ -99,7 +99,7 @@ const ActionsDropdown = ({ src={action.icon} className="icon-size-24" /> - + {intl.formatMessage(action.label)} diff --git a/src/discussions/common/AuthorLabel.jsx b/src/discussions/common/AuthorLabel.jsx index c771d365c..86bf0e54b 100644 --- a/src/discussions/common/AuthorLabel.jsx +++ b/src/discussions/common/AuthorLabel.jsx @@ -38,7 +38,7 @@ const AuthorLabel = ({ const authorName = useMemo(() => ( {authorLabelMessage && ( { {intl.formatMessage(messages.contentUnavailableTitle)}

{intl.formatMessage(subTitleMessage)}

- diff --git a/src/discussions/discussions-home/DiscussionsHome.jsx b/src/discussions/discussions-home/DiscussionsHome.jsx index db19a8fab..c46247ddc 100644 --- a/src/discussions/discussions-home/DiscussionsHome.jsx +++ b/src/discussions/discussions-home/DiscussionsHome.jsx @@ -82,7 +82,7 @@ const DiscussionsHome = () => { )}> {!enableInContextSidebar && (
)} -
+
{!enableInContextSidebar && } {(isEnrolled || !isUserLearner) && (
{
{username}
diff --git a/src/discussions/post-comments/comments/CommentsView.jsx b/src/discussions/post-comments/comments/CommentsView.jsx index b8cd3afb9..fd82fe75a 100644 --- a/src/discussions/post-comments/comments/CommentsView.jsx +++ b/src/discussions/post-comments/comments/CommentsView.jsx @@ -73,7 +73,7 @@ const CommentsView = ({ threadType }) => { onClick={handleLoadMoreResponses} variant="link" block="true" - className="px-4 mt-3 border-0 line-height-24 py-0 mb-2 font-style font-weight-500 font-size-14" + className="px-4 mt-3 border-0 line-height-24 py-0 mb-2 font-style font-weight-500" data-testid="load-more-comments" > {intl.formatMessage(messages.loadMoreResponses)} @@ -92,7 +92,7 @@ const CommentsView = ({ threadType }) => { variant="plain" block="true" className="card mb-4 px-0 border-0 py-10px mt-2 font-style font-weight-500 - line-height-24 font-size-14 text-primary-500" + line-height-24 text-primary-500" onClick={handleAddResponse} data-testid="add-response" > diff --git a/src/discussions/post-comments/comments/comment/Comment.jsx b/src/discussions/post-comments/comments/comment/Comment.jsx index c2c5a879b..3e24f0d35 100644 --- a/src/discussions/post-comments/comments/comment/Comment.jsx +++ b/src/discussions/post-comments/comments/comment/Comment.jsx @@ -249,7 +249,7 @@ const Comment = ({ onClick={handleLoadMoreComments} variant="link" block="true" - className="font-size-14 line-height-24 font-style pt-10px border-0 font-weight-500 pb-0" + className="line-height-24 font-style pt-10px border-0 font-weight-500 pb-0" data-testid="load-more-comments-responses" > {intl.formatMessage(messages.loadMoreComments)} @@ -267,7 +267,7 @@ const Comment = ({ ) : ( !isClosed && isUserPrivilegedInPostingRestriction && (inlineReplies.length >= 5) && (