From 22967357df51c3c0a709f22dd3b68a841e6a8a06 Mon Sep 17 00:00:00 2001 From: Awais Ansari <79941147+awais-ansari@users.noreply.github.com> Date: Fri, 12 Aug 2022 16:35:35 +0500 Subject: [PATCH] fix: response and comment UI (#244) * fix: response and comment UI * fix: revert inIframe conidition --- src/discussions/comments/comment/Reply.jsx | 2 +- src/discussions/comments/messages.js | 5 + .../common/EndorsedAlertBanner.jsx | 4 +- src/discussions/posts/post/PostLink.jsx | 135 +++++++++--------- 4 files changed, 77 insertions(+), 69 deletions(-) diff --git a/src/discussions/comments/comment/Reply.jsx b/src/discussions/comments/comment/Reply.jsx index 65f5b296..a5a589cc 100644 --- a/src/discussions/comments/comment/Reply.jsx +++ b/src/discussions/comments/comment/Reply.jsx @@ -75,7 +75,7 @@ function Reply({ }} /> -
+
- {timeago.format(content.endorsedAt, intl.locale)} + {intl.formatMessage(messages.time, { time: timeago.format(content.endorsedAt, 'time-locale') })}
diff --git a/src/discussions/posts/post/PostLink.jsx b/src/discussions/posts/post/PostLink.jsx index 1c0057ef..3474c179 100644 --- a/src/discussions/posts/post/PostLink.jsx +++ b/src/discussions/posts/post/PostLink.jsx @@ -45,83 +45,84 @@ function PostLink({ const postReported = post.abuseFlagged || post.abuseFlaggedCount; return ( - - isSelected(post.id)} - style={{ lineHeight: '21px' }} - aria-current={isSelected(post.id) ? 'page' : undefined} - role="option" - tabindex={(isSelected(post.id) || idx === 0) ? 0 : -1} - > - {showDivider &&
} -
+ {showDivider &&
} + isSelected(post.id)} + style={{ lineHeight: '21px' }} + aria-current={isSelected(post.id) ? 'page' : undefined} + role="option" + tabindex={(isSelected(post.id) || idx === 0) ? 0 : -1} + > +
- -
-
-
-
+ +
+
+
+
- {post.title} + > + {post.title} +
+ + {showAnsweredBadge && ( + + {intl.formatMessage(messages.answered)} + {' '}answered + + )} + + {postReported && ( + + {intl.formatMessage(messages.contentReported)} + {' '}reported + + )} + + {post.pinned && ( + + )}
- - {showAnsweredBadge && ( - - {intl.formatMessage(messages.answered)} - {' '}answered - - )} - - {postReported && ( - - {intl.formatMessage(messages.contentReported)} - {' '}reported - - )} - - {post.pinned && ( - - )} +
+ +
+ {isPostPreviewAvailable(post.previewBody) + ? post.previewBody + : intl.formatMessage(messages.postWithoutPreview)} +
+
+
- -
- {isPostPreviewAvailable(post.previewBody) - ? post.previewBody - : intl.formatMessage(messages.postWithoutPreview)} -
-
- -
-
- + + ); }