From b69ad1264ddcd315b178fdd3e88902e5d97e1708 Mon Sep 17 00:00:00 2001 From: Alec Armbruster <35377827+alectrocute@users.noreply.github.com> Date: Mon, 26 Jun 2023 16:41:14 -0400 Subject: [PATCH 01/18] make post creator badge stand out more --- src/shared/components/comment/comment-node.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/shared/components/comment/comment-node.tsx b/src/shared/components/comment/comment-node.tsx index 4ad15383..70369c70 100644 --- a/src/shared/components/comment/comment-node.tsx +++ b/src/shared/components/comment/comment-node.tsx @@ -315,8 +315,8 @@ export class CommentNode extends Component { )} {this.isPostCreator && ( -
- {I18NextService.i18n.t("creator")} +
+ {I18NextService.i18n.t("op").toUpperCase()}
)} {isMod_ && ( From 1faa9f354bc1429d14ff6437ff46b1eee1249cca Mon Sep 17 00:00:00 2001 From: Alec Armbruster <35377827+alectrocute@users.noreply.github.com> Date: Mon, 26 Jun 2023 16:49:09 -0400 Subject: [PATCH 02/18] add tooltip --- src/shared/components/comment/comment-node.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/shared/components/comment/comment-node.tsx b/src/shared/components/comment/comment-node.tsx index 70369c70..d7cda869 100644 --- a/src/shared/components/comment/comment-node.tsx +++ b/src/shared/components/comment/comment-node.tsx @@ -315,7 +315,11 @@ export class CommentNode extends Component { )} {this.isPostCreator && ( -
+
{I18NextService.i18n.t("op").toUpperCase()}
)} From 03a4bfad467fab50e3f5fb8fc669da7084a54596 Mon Sep 17 00:00:00 2001 From: Alec Armbruster <35377827+alectrocute@users.noreply.github.com> Date: Mon, 26 Jun 2023 17:19:34 -0400 Subject: [PATCH 03/18] remove toUpperCase since the translation is uppercase --- src/shared/components/comment/comment-node.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/components/comment/comment-node.tsx b/src/shared/components/comment/comment-node.tsx index d7cda869..4c0e8b67 100644 --- a/src/shared/components/comment/comment-node.tsx +++ b/src/shared/components/comment/comment-node.tsx @@ -320,7 +320,7 @@ export class CommentNode extends Component { aria-label={I18NextService.i18n.t("creator")} data-tippy-content={I18NextService.i18n.t("creator")} > - {I18NextService.i18n.t("op").toUpperCase()} + {I18NextService.i18n.t("op")}
)} {isMod_ && ( From ee84634a73e2904f39bc7bb1b46fc102778ca156 Mon Sep 17 00:00:00 2001 From: Jay Sitter Date: Mon, 26 Jun 2023 21:05:50 -0400 Subject: [PATCH 04/18] fix: Fix alignment of preview mini-overlay buttons on thumbs --- src/shared/components/post/post-listing.tsx | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/src/shared/components/post/post-listing.tsx b/src/shared/components/post/post-listing.tsx index f80cb970..3d373ee0 100644 --- a/src/shared/components/post/post-listing.tsx +++ b/src/shared/components/post/post-listing.tsx @@ -49,7 +49,7 @@ import { PurgeType, VoteContentType, } from "../../interfaces"; -import { mdNoImages, mdToHtml, mdToHtmlInline } from "../../markdown"; +import { mdToHtml, mdToHtmlInline } from "../../markdown"; import { I18NextService, UserService } from "../../services"; import { setupTippy } from "../../tippy"; import { Icon, PurgeWarning, Spinner } from "../common/icon"; @@ -328,16 +328,19 @@ export class PostListing extends Component { if (!this.props.hideImage && url && isImage(url) && this.imageSrc) { return ( - {this.imgThumb(this.imageSrc)} - - + + ); } else if (!this.props.hideImage && url && thumbnail && this.imageSrc) { return ( @@ -348,7 +351,10 @@ export class PostListing extends Component { title={url} > {this.imgThumb(this.imageSrc)} - + ); } else if (url) { From 3439512a1cd1eba7db5a8b9e7e718d3b3b414869 Mon Sep 17 00:00:00 2001 From: Jay Sitter Date: Mon, 26 Jun 2023 21:12:43 -0400 Subject: [PATCH 05/18] fix: Restore mdNoImages import --- src/shared/components/post/post-listing.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/components/post/post-listing.tsx b/src/shared/components/post/post-listing.tsx index 3d373ee0..f1d0dcab 100644 --- a/src/shared/components/post/post-listing.tsx +++ b/src/shared/components/post/post-listing.tsx @@ -49,7 +49,7 @@ import { PurgeType, VoteContentType, } from "../../interfaces"; -import { mdToHtml, mdToHtmlInline } from "../../markdown"; +import { mdNoImages, mdToHtml, mdToHtmlInline } from "../../markdown"; import { I18NextService, UserService } from "../../services"; import { setupTippy } from "../../tippy"; import { Icon, PurgeWarning, Spinner } from "../common/icon"; From 9e1eb5fe19584264677ac5a1ed448fadee63beb9 Mon Sep 17 00:00:00 2001 From: Alec Armbruster <35377827+alectrocute@users.noreply.github.com> Date: Tue, 27 Jun 2023 11:42:00 -0400 Subject: [PATCH 06/18] always show badge on mobile --- src/shared/components/comment/comment-node.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/components/comment/comment-node.tsx b/src/shared/components/comment/comment-node.tsx index 4c0e8b67..0fe43e26 100644 --- a/src/shared/components/comment/comment-node.tsx +++ b/src/shared/components/comment/comment-node.tsx @@ -316,7 +316,7 @@ export class CommentNode extends Component { )} {this.isPostCreator && (
From c020debf6d34fdd07da9346eccde6fe22da0b513 Mon Sep 17 00:00:00 2001 From: Alec Armbruster <35377827+alectrocute@users.noreply.github.com> Date: Tue, 27 Jun 2023 11:44:17 -0400 Subject: [PATCH 07/18] use span --- src/shared/components/comment/comment-node.tsx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/shared/components/comment/comment-node.tsx b/src/shared/components/comment/comment-node.tsx index 0fe43e26..c0d9d319 100644 --- a/src/shared/components/comment/comment-node.tsx +++ b/src/shared/components/comment/comment-node.tsx @@ -315,28 +315,28 @@ export class CommentNode extends Component { )} {this.isPostCreator && ( -
{I18NextService.i18n.t("op")} -
+ )} {isMod_ && ( -
+ {I18NextService.i18n.t("mod")} -
+ )} {isAdmin_ && ( -
+ {I18NextService.i18n.t("admin")} -
+ )} {cv.creator.bot_account && ( -
+ {I18NextService.i18n.t("bot_account").toLowerCase()} -
+ )} {this.props.showCommunity && ( <> From 9cf3c33823ab5dfd002c4813c06cc93a38272e59 Mon Sep 17 00:00:00 2001 From: Alec Armbruster <35377827+alectrocute@users.noreply.github.com> Date: Tue, 27 Jun 2023 12:59:06 -0400 Subject: [PATCH 08/18] fix weird borders when markdown textarea is disabled --- src/shared/components/common/markdown-textarea.tsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/shared/components/common/markdown-textarea.tsx b/src/shared/components/common/markdown-textarea.tsx index 8963d5e9..3f5b6e1e 100644 --- a/src/shared/components/common/markdown-textarea.tsx +++ b/src/shared/components/common/markdown-textarea.tsx @@ -159,13 +159,16 @@ export class MarkdownTextArea extends Component<
-
+
{this.getFormatButton("bold", this.handleInsertBold)} {this.getFormatButton("italic", this.handleInsertItalic)} {this.getFormatButton("link", this.handleInsertLink)} this.handleEmoji(this, e)} - disabled={this.isDisabled} >