From ab99a0cde2fefd64d8fb227247ef31e5db402b70 Mon Sep 17 00:00:00 2001 From: Oneric Date: Thu, 3 Oct 2024 19:09:28 +0200 Subject: [PATCH] Add some QoL patches from upstream PRs --- patches/pr414_sync-flush.patch | 36 ++++++ patches/pr416_01_fix-enter-in-subject.patch | 85 +++++++++++++ .../pr416_02_default-to-recent-emoji.patch | 23 ++++ patches/pr416_03_more-emoji-suggestions.patch | 62 +++++++++ .../pr416_04_reset-post-form-on-send.patch | 54 ++++++++ ..._05_post-form-default-to-parent-lang.patch | 119 ++++++++++++++++++ ...6_06_fix-conversation-collapse-focus.patch | 56 +++++++++ patches/pr420_logout-redirect.patch | 30 +++++ patches/pr421_custom-source-urls.patch | 75 +++++++++++ patches/series | 11 ++ 10 files changed, 551 insertions(+) create mode 100644 patches/pr414_sync-flush.patch create mode 100644 patches/pr416_01_fix-enter-in-subject.patch create mode 100644 patches/pr416_02_default-to-recent-emoji.patch create mode 100644 patches/pr416_03_more-emoji-suggestions.patch create mode 100644 patches/pr416_04_reset-post-form-on-send.patch create mode 100644 patches/pr416_05_post-form-default-to-parent-lang.patch create mode 100644 patches/pr416_06_fix-conversation-collapse-focus.patch create mode 100644 patches/pr420_logout-redirect.patch create mode 100644 patches/pr421_custom-source-urls.patch diff --git a/patches/pr414_sync-flush.patch b/patches/pr414_sync-flush.patch new file mode 100644 index 0000000..5f7d3fa --- /dev/null +++ b/patches/pr414_sync-flush.patch @@ -0,0 +1,36 @@ +From 13383982bce4a2db54585ee2cac93f8b91941094 Mon Sep 17 00:00:00 2001 +From: novenary +Date: Mon, 16 Sep 2024 22:40:33 +0300 +Subject: [PATCH] post_status_form: enable sync flush for watcher + +This fixes drafts not clearing after posting a reply. + +Vue 3.3.11 changed watchers to stop firing after component unmount. +After posting a reply, the post form is removed, now causing the queued +event to be discarded. +Synchronous flush causes the handler to be called immediately when +changes happen, solving the problem. + +See: https://github.com/vuejs/core/pull/7181 +See: https://github.com/vuejs/docs/commit/80e2128d52603856a26a8bb7258606cfe80561e9 +Fixes: a7dea2f70f2beba781068a7ff7d8a2a9ef8a9478 +Fixes: #413 +--- + src/components/post_status_form/post_status_form.js | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/components/post_status_form/post_status_form.js b/src/components/post_status_form/post_status_form.js +index 6eee23ce..0c77199b 100644 +--- a/src/components/post_status_form/post_status_form.js ++++ b/src/components/post_status_form/post_status_form.js +@@ -329,6 +329,7 @@ const PostStatusForm = { + watch: { + 'newStatus': { + deep: true, ++ flush: 'sync', + handler () { + this.statusChanged() + } +-- +2.34.1 + diff --git a/patches/pr416_01_fix-enter-in-subject.patch b/patches/pr416_01_fix-enter-in-subject.patch new file mode 100644 index 0000000..f07da72 --- /dev/null +++ b/patches/pr416_01_fix-enter-in-subject.patch @@ -0,0 +1,85 @@ +From 5886765d8904de98db84b93d23b536fefd31373f Mon Sep 17 00:00:00 2001 +From: novenary +Date: Tue, 17 Sep 2024 00:36:48 +0300 +Subject: [PATCH] post_status_form: fix enter key in subject field + +This fixes random actions being triggered by the enter key while the +subject field is focused. + +When pressing enter, the browser simulates a click on the first "submit" +button it finds in the form. +A submit button is a button without `type="button"` set. +Remediate this by setting the type attribute on all but the "Post" +button. + +Additionally, inhibit the enter key in the subject field (ctrl+enter +still works). +--- + src/components/poll/poll_form.vue | 2 ++ + src/components/post_status_form/post_status_form.vue | 5 +++++ + 2 files changed, 7 insertions(+) + +diff --git a/src/components/poll/poll_form.vue b/src/components/poll/poll_form.vue +index 146754db..a67115b6 100644 +--- a/src/components/poll/poll_form.vue ++++ b/src/components/poll/poll_form.vue +@@ -24,6 +24,7 @@ +