From 74fa6a954429e0e68a94e79fd3926cc20597d347 Mon Sep 17 00:00:00 2001 From: nicolasschneider Date: Fri, 11 Apr 2025 08:29:06 +0200 Subject: [PATCH 1/2] fix typo in comment --- plugins/view/src/types.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/view/src/types.ts b/plugins/view/src/types.ts index a16efc331eb..555685ba17f 100644 --- a/plugins/view/src/types.ts +++ b/plugins/view/src/types.ts @@ -533,7 +533,7 @@ export interface Action> extends Do // If defined, types should be matched to proposed list inputProps?: Record>> - // Kayboard bindings + // Keyboard bindings keyBinding?: KeyBinding[] // short description for action. From ff8f9536b52ec2abb01ee70d9cbb6df13d752a97 Mon Sep 17 00:00:00 2001 From: nicolasschneider Date: Mon, 14 Apr 2025 17:57:31 +0200 Subject: [PATCH 2/2] add ArrowUp shortcut to edit user's last message --- packages/ui/src/components/Component.svelte | 4 ++ .../src/components/ActivityExtension.svelte | 1 + .../ActivityMessagePresenter.svelte | 5 ++- .../src/components/AttachmentRefInput.svelte | 1 + .../src/components/ChannelInput.svelte | 1 + .../ReverseChannelScrollView.svelte | 41 ++++++++++++++++++- .../chat-message/ChatMessageInput.svelte | 1 + .../chat-message/ChatMessagePresenter.svelte | 6 ++- .../threads/ThreadMessagePresenter.svelte | 2 + .../src/components/ReferenceInput.svelte | 1 + .../src/components/TextEditor.svelte | 2 +- 11 files changed, 60 insertions(+), 5 deletions(-) diff --git a/packages/ui/src/components/Component.svelte b/packages/ui/src/components/Component.svelte index 4ea4888512d..6e121965919 100644 --- a/packages/ui/src/components/Component.svelte +++ b/packages/ui/src/components/Component.svelte @@ -120,6 +120,8 @@ on:validate on:submit on:select + on:keydown + on:editingEnded > @@ -140,6 +142,8 @@ on:validate on:submit on:select + on:keydown + on:editingEnded /> {/if} diff --git a/plugins/activity-resources/src/components/ActivityExtension.svelte b/plugins/activity-resources/src/components/ActivityExtension.svelte index 908bd5a16d9..a1fcaca87e6 100644 --- a/plugins/activity-resources/src/components/ActivityExtension.svelte +++ b/plugins/activity-resources/src/components/ActivityExtension.svelte @@ -30,5 +30,6 @@ on:close on:open on:submit + on:keydown /> {/if} diff --git a/plugins/activity-resources/src/components/activity-message/ActivityMessagePresenter.svelte b/plugins/activity-resources/src/components/activity-message/ActivityMessagePresenter.svelte index a940950f32c..45ad9c484af 100644 --- a/plugins/activity-resources/src/components/activity-message/ActivityMessagePresenter.svelte +++ b/plugins/activity-resources/src/components/activity-message/ActivityMessagePresenter.svelte @@ -42,6 +42,7 @@ export let readonly = false export let onClick: (() => void) | undefined = undefined export let onReply: ((message: ActivityMessage) => void) | undefined = undefined + export let isEditing = false const client = getClient() const hierarchy = client.getHierarchy() @@ -76,7 +77,9 @@ compact, readonly, onClick, - onReply + onReply, + isEditing }} + on:editingEnded /> {/if} diff --git a/plugins/attachment-resources/src/components/AttachmentRefInput.svelte b/plugins/attachment-resources/src/components/AttachmentRefInput.svelte index 68d0376ed6f..4a8ef4eaa17 100644 --- a/plugins/attachment-resources/src/components/AttachmentRefInput.svelte +++ b/plugins/attachment-resources/src/components/AttachmentRefInput.svelte @@ -462,6 +462,7 @@ on:message={onMessage} on:update={onUpdate} onPaste={pasteAction} + on:keydown {placeholder} >
diff --git a/plugins/chunter-resources/src/components/ChannelInput.svelte b/plugins/chunter-resources/src/components/ChannelInput.svelte index ccc9c02594c..e850989641b 100644 --- a/plugins/chunter-resources/src/components/ChannelInput.svelte +++ b/plugins/chunter-resources/src/components/ChannelInput.svelte @@ -87,6 +87,7 @@ kind="input" {extensions} props={{ object, boundary, collection, autofocus, withTypingInfo: true }} + on:keydown />
{:else} diff --git a/plugins/chunter-resources/src/components/ReverseChannelScrollView.svelte b/plugins/chunter-resources/src/components/ReverseChannelScrollView.svelte index 9518f748dd7..aa57d6bef64 100644 --- a/plugins/chunter-resources/src/components/ReverseChannelScrollView.svelte +++ b/plugins/chunter-resources/src/components/ReverseChannelScrollView.svelte @@ -13,6 +13,8 @@ // limitations under the License. --> @@ -76,5 +77,6 @@ {videoPreload} {onClick} {readonly} + {isEditing} /> {/if} diff --git a/plugins/text-editor-resources/src/components/ReferenceInput.svelte b/plugins/text-editor-resources/src/components/ReferenceInput.svelte index 1467ad9db93..0437a57b8fa 100644 --- a/plugins/text-editor-resources/src/components/ReferenceInput.svelte +++ b/plugins/text-editor-resources/src/components/ReferenceInput.svelte @@ -178,6 +178,7 @@ updateFocus() dispatch('focus') }} + on:keydown extensions={[ completionPlugin, EmojiExtension.configure(), diff --git a/plugins/text-editor-resources/src/components/TextEditor.svelte b/plugins/text-editor-resources/src/components/TextEditor.svelte index 6beb9511de8..19c9a83d360 100644 --- a/plugins/text-editor-resources/src/components/TextEditor.svelte +++ b/plugins/text-editor-resources/src/components/TextEditor.svelte @@ -235,4 +235,4 @@ {/if} -
+