feat: emoji reactions for tasks and comments #2196

Merged
konrad merged 19 commits from feature/reactions into main 2024-03-12 19:26:01 +00:00
4 changed files with 40 additions and 3 deletions
Showing only changes of commit 3ab92c0585 - Show all commits

View File

@ -185,7 +185,8 @@
},
"pnpm": {
"patchedDependencies": {
"flexsearch@0.7.31": "patches/flexsearch@0.7.31.patch"
"flexsearch@0.7.31": "patches/flexsearch@0.7.31.patch",
"@github/hotkey@3.1.0": "patches/@github__hotkey@3.1.0.patch"
}
}
}

View File

@ -0,0 +1,28 @@
diff --git a/dist/index.js b/dist/index.js
index b6e6e0a6864cb00bc085b8d4503a705cb3bc8404..0466ef46406b0df41c8d0bb9a5bac9eabf4a50de 100644
--- a/dist/index.js
+++ b/dist/index.js
@@ -368,10 +368,12 @@ const sequenceTracker = new SequenceTracker({
function keyDownHandler(event) {
if (event.defaultPrevented)
return;
- if (!(event.target instanceof Node))
+ const target = event.explicitOriginalTarget || event.target;
+ if (target.shadowRoot)
return;
- if (isFormField(event.target)) {
- const target = event.target;
+ if (!(target instanceof Node))
+ return;
+ if (isFormField(target)) {
if (!target.id)
return;
if (!target.ownerDocument.querySelector(`[data-hotkey-scope="${target.id}"]`))
@@ -385,7 +387,6 @@ function keyDownHandler(event) {
sequenceTracker.registerKeypress(event);
currentTriePosition = newTriePosition;
if (newTriePosition instanceof Leaf) {
- const target = event.target;
let shouldFire = false;
let elementToFire;
const formField = isFormField(target);

View File

@ -5,6 +5,9 @@ settings:
excludeLinksFromLockfile: false
patchedDependencies:
'@github/hotkey@3.1.0':
hash: c67tdk7qpd5grxd2zj6lsxfbou
path: patches/@github__hotkey@3.1.0.patch
flexsearch@0.7.31:
hash: bfn3sngfuhktmdj7jgl3ejl35y
path: patches/flexsearch@0.7.31.patch
@ -24,7 +27,7 @@ dependencies:
version: 3.0.6(@fortawesome/fontawesome-svg-core@6.5.1)(vue@3.4.21)
'@github/hotkey':
specifier: 3.1.0
version: 3.1.0
version: 3.1.0(patch_hash=c67tdk7qpd5grxd2zj6lsxfbou)
'@infectoone/vue-ganttastic':
specifier: 2.2.0
version: 2.2.0(dayjs@1.11.10)(vue@3.4.21)
@ -2690,9 +2693,10 @@ packages:
vue: 3.4.21(typescript@5.4.2)
dev: false
/@github/hotkey@3.1.0:
/@github/hotkey@3.1.0(patch_hash=c67tdk7qpd5grxd2zj6lsxfbou):
resolution: {integrity: sha512-Lj9QjYa+b+Nk5U1nZtlXLdx3HI8/EeM6ZNwBjpYcGVYqpwHdM2ScRH0p7+5zh28JG6SPbTM9+Rb1dFd742qMTw==}
dev: false
patched: true
/@hapi/hoek@9.2.1:
resolution: {integrity: sha512-gfta+H8aziZsm8pZa0vj04KO6biEiisppNgA1kbJvFrrWu9Vm7eaUEy76DIxsuTaWvti5fkJVhllWc6ZTE+Mdw==}

View File

@ -558,6 +558,10 @@ function handleImagePaste(event) {
// See https://github.com/github/hotkey/discussions/85#discussioncomment-5214660
function setFocusToEditor(event) {
if(event.target.shadowRoot) {
return
}
const hotkeyString = eventToHotkeyString(event)
if (!hotkeyString) return
if (hotkeyString !== editShortcut ||