From 9f5c496130e51d358d5469596891670f402cfe6e Mon Sep 17 00:00:00 2001 From: RayBB Date: Wed, 14 Jun 2023 10:12:32 +0200 Subject: [PATCH 01/14] add checkboxes to issue template --- .github/ISSUE_TEMPLATE/BUG_REPORT.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.github/ISSUE_TEMPLATE/BUG_REPORT.yml b/.github/ISSUE_TEMPLATE/BUG_REPORT.yml index 64579090..6ee32dea 100644 --- a/.github/ISSUE_TEMPLATE/BUG_REPORT.yml +++ b/.github/ISSUE_TEMPLATE/BUG_REPORT.yml @@ -9,6 +9,22 @@ body: Found a bug? Please fill out the sections below. 👍 Thanks for taking the time to fill out this bug report! For backend issues, use [lemmy](https://github.com/LemmyNet/lemmy) + - type: checkboxes + attributes: + label: Requirements + description: Before you create a bug report please do the following. + options: + - label: Did you check to see if this issue already exists? + required: true + options: + - label: Is this only a single bug. Do not put multiple bugs in one issue. + required: true + options: + - label: Is this a question or discussion? Don't use this, use https://lemmy.ml/c/lemmy_support + required: true + options: + - label: Is this a server side (not related to the UI) issue? Use the [Lemmy back end](https://github.com/LemmyNet/lemmy) repo. + required: true - type: textarea id: summary attributes: From 9f337ecdeff9c651f6f23f4bd12d039e10e5babc Mon Sep 17 00:00:00 2001 From: RayBB Date: Wed, 14 Jun 2023 10:15:24 +0200 Subject: [PATCH 02/14] label array --- .github/ISSUE_TEMPLATE/BUG_REPORT.yml | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/BUG_REPORT.yml b/.github/ISSUE_TEMPLATE/BUG_REPORT.yml index 6ee32dea..81a8e941 100644 --- a/.github/ISSUE_TEMPLATE/BUG_REPORT.yml +++ b/.github/ISSUE_TEMPLATE/BUG_REPORT.yml @@ -15,16 +15,11 @@ body: description: Before you create a bug report please do the following. options: - label: Did you check to see if this issue already exists? - required: true - options: - label: Is this only a single bug. Do not put multiple bugs in one issue. - required: true - options: - label: Is this a question or discussion? Don't use this, use https://lemmy.ml/c/lemmy_support - required: true - options: - label: Is this a server side (not related to the UI) issue? Use the [Lemmy back end](https://github.com/LemmyNet/lemmy) repo. - required: true + validations: + required: true - type: textarea id: summary attributes: From 040d56a1a2122835f314efde1d223090265a485c Mon Sep 17 00:00:00 2001 From: RayBB Date: Wed, 14 Jun 2023 10:16:45 +0200 Subject: [PATCH 03/14] indent validations --- .github/ISSUE_TEMPLATE/BUG_REPORT.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/BUG_REPORT.yml b/.github/ISSUE_TEMPLATE/BUG_REPORT.yml index 81a8e941..67e3b765 100644 --- a/.github/ISSUE_TEMPLATE/BUG_REPORT.yml +++ b/.github/ISSUE_TEMPLATE/BUG_REPORT.yml @@ -18,8 +18,8 @@ body: - label: Is this only a single bug. Do not put multiple bugs in one issue. - label: Is this a question or discussion? Don't use this, use https://lemmy.ml/c/lemmy_support - label: Is this a server side (not related to the UI) issue? Use the [Lemmy back end](https://github.com/LemmyNet/lemmy) repo. - validations: - required: true + validations: + required: true - type: textarea id: summary attributes: From 152aaf77b0e86b24c2d1d29d07732e7f054d7ec3 Mon Sep 17 00:00:00 2001 From: RayBB Date: Wed, 14 Jun 2023 10:19:04 +0200 Subject: [PATCH 04/14] required under label --- .github/ISSUE_TEMPLATE/BUG_REPORT.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/BUG_REPORT.yml b/.github/ISSUE_TEMPLATE/BUG_REPORT.yml index 67e3b765..5bb68ebc 100644 --- a/.github/ISSUE_TEMPLATE/BUG_REPORT.yml +++ b/.github/ISSUE_TEMPLATE/BUG_REPORT.yml @@ -15,11 +15,13 @@ body: description: Before you create a bug report please do the following. options: - label: Did you check to see if this issue already exists? + required: true - label: Is this only a single bug. Do not put multiple bugs in one issue. + required: true - label: Is this a question or discussion? Don't use this, use https://lemmy.ml/c/lemmy_support + required: true - label: Is this a server side (not related to the UI) issue? Use the [Lemmy back end](https://github.com/LemmyNet/lemmy) repo. - validations: - required: true + required: true - type: textarea id: summary attributes: From fd123d4f48b1c713fd6627c9fc43044c58a83f67 Mon Sep 17 00:00:00 2001 From: RayBB Date: Wed, 14 Jun 2023 10:22:46 +0200 Subject: [PATCH 05/14] add checkboxes to feature requests --- .github/ISSUE_TEMPLATE/FEATURE_REQUEST.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.yml b/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.yml index 375d06d3..fa026019 100644 --- a/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.yml +++ b/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.yml @@ -7,6 +7,19 @@ body: value: | Have a suggestion about Lemmy's UI? For backend issues, use [lemmy](https://github.com/LemmyNet/lemmy) + - type: checkboxes + attributes: + label: Requirements + description: Before you create a bug report please do the following. + options: + - label: Did you check to see if this issue already exists? + required: true + - label: Is this only a feature request. Do not put multiple feature requests in one issue. + required: true + - label: Is this a question or discussion? Don't use this, use https://lemmy.ml/c/lemmy_support + required: true + - label: Is this a server side (not related to the UI) issue? Use the [Lemmy back end](https://github.com/LemmyNet/lemmy) repo. + required: true - type: textarea id: problem attributes: From 6517d99bfb890a0883de1466d85ca2ab768810a6 Mon Sep 17 00:00:00 2001 From: RayBB Date: Wed, 14 Jun 2023 10:31:11 +0200 Subject: [PATCH 06/14] prettier --- .github/ISSUE_TEMPLATE/BUG_REPORT.yml | 2 +- .github/ISSUE_TEMPLATE/QUESTION.yml | 2 +- .github/ISSUE_TEMPLATE/hexbear.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/BUG_REPORT.yml b/.github/ISSUE_TEMPLATE/BUG_REPORT.yml index 5bb68ebc..2611bf90 100644 --- a/.github/ISSUE_TEMPLATE/BUG_REPORT.yml +++ b/.github/ISSUE_TEMPLATE/BUG_REPORT.yml @@ -35,7 +35,7 @@ body: label: Steps to Reproduce description: | Describe the steps to reproduce the bug. - The better your description is _(go 'here', click 'there'...)_ the fastest you'll get an _(accurate)_ resolution. + The better your description is _(go 'here', click 'there'...)_ the fastest you'll get an _(accurate)_ resolution. value: | 1. 2. diff --git a/.github/ISSUE_TEMPLATE/QUESTION.yml b/.github/ISSUE_TEMPLATE/QUESTION.yml index 460d9a44..734937e9 100644 --- a/.github/ISSUE_TEMPLATE/QUESTION.yml +++ b/.github/ISSUE_TEMPLATE/QUESTION.yml @@ -14,4 +14,4 @@ body: label: Question description: What's the question you have about Lemmy's UI? validations: - required: true \ No newline at end of file + required: true diff --git a/.github/ISSUE_TEMPLATE/hexbear.yml b/.github/ISSUE_TEMPLATE/hexbear.yml index 199b97e9..73ef5482 100644 --- a/.github/ISSUE_TEMPLATE/hexbear.yml +++ b/.github/ISSUE_TEMPLATE/hexbear.yml @@ -8,4 +8,4 @@ body: label: Question description: What's the question you have about hexbear? validations: - required: true \ No newline at end of file + required: true From 2d91d31517fceedc127f308bfca06fd0e3f80c83 Mon Sep 17 00:00:00 2001 From: Raymond Berger Date: Wed, 14 Jun 2023 11:18:43 +0200 Subject: [PATCH 07/14] Update BUG_REPORT.yml --- .github/ISSUE_TEMPLATE/BUG_REPORT.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/BUG_REPORT.yml b/.github/ISSUE_TEMPLATE/BUG_REPORT.yml index 2611bf90..c311da4b 100644 --- a/.github/ISSUE_TEMPLATE/BUG_REPORT.yml +++ b/.github/ISSUE_TEMPLATE/BUG_REPORT.yml @@ -16,7 +16,7 @@ body: options: - label: Did you check to see if this issue already exists? required: true - - label: Is this only a single bug. Do not put multiple bugs in one issue. + - label: Is this only a single bug? Do not put multiple bugs in one issue. required: true - label: Is this a question or discussion? Don't use this, use https://lemmy.ml/c/lemmy_support required: true From eed88764845719945062c4d1da9662358fce6001 Mon Sep 17 00:00:00 2001 From: Raymond Berger Date: Wed, 14 Jun 2023 11:24:17 +0200 Subject: [PATCH 08/14] make question clearer --- .github/ISSUE_TEMPLATE/BUG_REPORT.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/BUG_REPORT.yml b/.github/ISSUE_TEMPLATE/BUG_REPORT.yml index c311da4b..0594a03f 100644 --- a/.github/ISSUE_TEMPLATE/BUG_REPORT.yml +++ b/.github/ISSUE_TEMPLATE/BUG_REPORT.yml @@ -18,7 +18,7 @@ body: required: true - label: Is this only a single bug? Do not put multiple bugs in one issue. required: true - - label: Is this a question or discussion? Don't use this, use https://lemmy.ml/c/lemmy_support + - label: Is this a bug report? For questions or discussions, use https://lemmy.ml/c/lemmy_support required: true - label: Is this a server side (not related to the UI) issue? Use the [Lemmy back end](https://github.com/LemmyNet/lemmy) repo. required: true From 58954e5bee7c9b4656ea705a2a63a8cef434f0ce Mon Sep 17 00:00:00 2001 From: Raymond Berger Date: Wed, 14 Jun 2023 11:25:49 +0200 Subject: [PATCH 09/14] improve q for feature request --- .github/ISSUE_TEMPLATE/FEATURE_REQUEST.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.yml b/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.yml index fa026019..343a7df9 100644 --- a/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.yml +++ b/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.yml @@ -14,9 +14,9 @@ body: options: - label: Did you check to see if this issue already exists? required: true - - label: Is this only a feature request. Do not put multiple feature requests in one issue. + - label: Is this only a feature request? Do not put multiple feature requests in one issue. required: true - - label: Is this a question or discussion? Don't use this, use https://lemmy.ml/c/lemmy_support + - label: Is this a feature request? For questions or discussions, use https://lemmy.ml/c/lemmy_support required: true - label: Is this a server side (not related to the UI) issue? Use the [Lemmy back end](https://github.com/LemmyNet/lemmy) repo. required: true From 1f04febd11bb778b2f0046c78a53785f5324ce04 Mon Sep 17 00:00:00 2001 From: RayBB Date: Wed, 14 Jun 2023 11:39:18 +0200 Subject: [PATCH 10/14] reorder questions --- .github/ISSUE_TEMPLATE/BUG_REPORT.yml | 4 ++-- .github/ISSUE_TEMPLATE/FEATURE_REQUEST.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/BUG_REPORT.yml b/.github/ISSUE_TEMPLATE/BUG_REPORT.yml index 0594a03f..0000138e 100644 --- a/.github/ISSUE_TEMPLATE/BUG_REPORT.yml +++ b/.github/ISSUE_TEMPLATE/BUG_REPORT.yml @@ -14,12 +14,12 @@ body: label: Requirements description: Before you create a bug report please do the following. options: + - label: Is this a bug report? For questions or discussions, use https://lemmy.ml/c/lemmy_support + required: true - label: Did you check to see if this issue already exists? required: true - label: Is this only a single bug? Do not put multiple bugs in one issue. required: true - - label: Is this a bug report? For questions or discussions, use https://lemmy.ml/c/lemmy_support - required: true - label: Is this a server side (not related to the UI) issue? Use the [Lemmy back end](https://github.com/LemmyNet/lemmy) repo. required: true - type: textarea diff --git a/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.yml b/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.yml index 343a7df9..848b819c 100644 --- a/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.yml +++ b/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.yml @@ -12,12 +12,12 @@ body: label: Requirements description: Before you create a bug report please do the following. options: + - label: Is this a feature request? For questions or discussions, use https://lemmy.ml/c/lemmy_support + required: true - label: Did you check to see if this issue already exists? required: true - label: Is this only a feature request? Do not put multiple feature requests in one issue. required: true - - label: Is this a feature request? For questions or discussions, use https://lemmy.ml/c/lemmy_support - required: true - label: Is this a server side (not related to the UI) issue? Use the [Lemmy back end](https://github.com/LemmyNet/lemmy) repo. required: true - type: textarea From 97ef46a256e7a6d7e33b9b5f8144661c1036ff80 Mon Sep 17 00:00:00 2001 From: RayBB Date: Wed, 14 Jun 2023 11:41:56 +0200 Subject: [PATCH 11/14] no comma --- .github/ISSUE_TEMPLATE/BUG_REPORT.yml | 2 +- .github/ISSUE_TEMPLATE/FEATURE_REQUEST.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/BUG_REPORT.yml b/.github/ISSUE_TEMPLATE/BUG_REPORT.yml index 0000138e..a07b80a5 100644 --- a/.github/ISSUE_TEMPLATE/BUG_REPORT.yml +++ b/.github/ISSUE_TEMPLATE/BUG_REPORT.yml @@ -14,7 +14,7 @@ body: label: Requirements description: Before you create a bug report please do the following. options: - - label: Is this a bug report? For questions or discussions, use https://lemmy.ml/c/lemmy_support + - label: Is this a bug report? For questions or discussions use https://lemmy.ml/c/lemmy_support required: true - label: Did you check to see if this issue already exists? required: true diff --git a/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.yml b/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.yml index 848b819c..2f6f3fc1 100644 --- a/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.yml +++ b/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.yml @@ -12,7 +12,7 @@ body: label: Requirements description: Before you create a bug report please do the following. options: - - label: Is this a feature request? For questions or discussions, use https://lemmy.ml/c/lemmy_support + - label: Is this a feature request? For questions or discussions use https://lemmy.ml/c/lemmy_support required: true - label: Did you check to see if this issue already exists? required: true From 374629f689e782a320c01774db8376dfbf320ea2 Mon Sep 17 00:00:00 2001 From: RayBB Date: Wed, 14 Jun 2023 12:06:26 +0200 Subject: [PATCH 12/14] add instance url --- .github/ISSUE_TEMPLATE/BUG_REPORT.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/ISSUE_TEMPLATE/BUG_REPORT.yml b/.github/ISSUE_TEMPLATE/BUG_REPORT.yml index a07b80a5..2273a138 100644 --- a/.github/ISSUE_TEMPLATE/BUG_REPORT.yml +++ b/.github/ISSUE_TEMPLATE/BUG_REPORT.yml @@ -58,3 +58,9 @@ body: placeholder: ex. 0.17.4-rc.4 validations: required: true + - type: input + id: lemmy-instance + attributes: + label: Lemmy Instance URL + description: Which Lemmy instance do you use? The address + placeholder: lemmy.ml, lemmy.world, etc From d75e4365c4ff79568d2c4b38f208e6b2b5a549d5 Mon Sep 17 00:00:00 2001 From: Alec Armbruster Date: Wed, 14 Jun 2023 16:29:04 -0400 Subject: [PATCH 13/14] remove pictrsDeleteToast usage from PostForm, add delete image button, fix infinite loading bug if upload error occured --- src/shared/components/post/post-form.tsx | 45 +++++++++++++++++++++--- 1 file changed, 41 insertions(+), 4 deletions(-) diff --git a/src/shared/components/post/post-form.tsx b/src/shared/components/post/post-form.tsx index 3ce96bb0..cef8e294 100644 --- a/src/shared/components/post/post-form.tsx +++ b/src/shared/components/post/post-form.tsx @@ -25,7 +25,6 @@ import { isImage, myAuth, myAuthRequired, - pictrsDeleteToast, relTags, setupTippy, toast, @@ -73,6 +72,7 @@ interface PostFormState { suggestedPostsRes: RequestState; metadataRes: RequestState; imageLoading: boolean; + imageDeleteUrl: string; communitySearchLoading: boolean; communitySearchOptions: Choice[]; previewMode: boolean; @@ -86,6 +86,7 @@ export class PostForm extends Component { form: {}, loading: false, imageLoading: false, + imageDeleteUrl: "", communitySearchLoading: false, previewMode: false, communitySearchOptions: [], @@ -269,6 +270,17 @@ export class PostForm extends Component { {url && isImage(url) && ( )} + {this.state.imageDeleteUrl && ( + + )} {this.props.crossPosts && this.props.crossPosts.length > 0 && ( <>
@@ -553,7 +565,15 @@ export class PostForm extends Component { } handlePostUrlChange(i: PostForm, event: any) { - i.setState(s => ((s.form.url = event.target.value), s)); + const url = event.target.value; + + i.setState({ + form: { + url, + }, + imageDeleteUrl: "", + }); + i.fetchPageTitle(); } @@ -644,18 +664,35 @@ export class PostForm extends Component { if (res.state === "success") { if (res.data.msg === "ok") { i.state.form.url = res.data.url; - pictrsDeleteToast(file.name, res.data.delete_url as string); - i.setState({ imageLoading: false }); + i.setState({ + imageLoading: false, + imageDeleteUrl: res.data.delete_url as string, + }); } else { toast(JSON.stringify(res), "danger"); } } else if (res.state === "failed") { console.error(res.msg); toast(res.msg, "danger"); + i.setState({ imageLoading: false }); } }); } + handleImageDelete(i: PostForm) { + const { imageDeleteUrl } = i.state; + + fetch(imageDeleteUrl); + + i.setState({ + imageDeleteUrl: "", + imageLoading: false, + form: { + url: "", + }, + }); + } + handleCommunitySearch = debounce(async (text: string) => { const { selectedCommunityChoice } = this.props; this.setState({ communitySearchLoading: true }); From 44e45bb84da4651f1a775d909503d9e8f8b9627f Mon Sep 17 00:00:00 2001 From: Alec Armbruster Date: Wed, 14 Jun 2023 16:45:56 -0400 Subject: [PATCH 14/14] make button a tad smaller --- src/shared/components/post/post-form.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/components/post/post-form.tsx b/src/shared/components/post/post-form.tsx index cef8e294..4640922d 100644 --- a/src/shared/components/post/post-form.tsx +++ b/src/shared/components/post/post-form.tsx @@ -272,7 +272,7 @@ export class PostForm extends Component { )} {this.state.imageDeleteUrl && (