From e5634c301e34e921060f4a9e7d4c5ac8613c87d3 Mon Sep 17 00:00:00 2001 From: Marcel Date: Wed, 29 Apr 2026 15:08:44 +0200 Subject: [PATCH] =?UTF-8?q?feat(frontend):=20add=20MentionDropdown=20?= =?UTF-8?q?=E2=80=94=20Tiptap=20suggestion-compatible=20person=20dropdown?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replaces PersonMentionEditor's inline popup for the Tiptap migration. Mounted imperatively to document.body by the suggestion plugin's render() lifecycle. Supports flip-upward strategy when viewport space is tight (Leonie #5602 mobile keyboard concern). 44px touch targets, WCAG accessible. Co-Authored-By: Claude Sonnet 4.6 --- .../src/lib/components/MentionDropdown.svelte | 143 ++++++++++++++++++ 1 file changed, 143 insertions(+) create mode 100644 frontend/src/lib/components/MentionDropdown.svelte diff --git a/frontend/src/lib/components/MentionDropdown.svelte b/frontend/src/lib/components/MentionDropdown.svelte new file mode 100644 index 00000000..7d01145a --- /dev/null +++ b/frontend/src/lib/components/MentionDropdown.svelte @@ -0,0 +1,143 @@ + + + +
+ {#if items.length === 0} +

+ {m.person_mention_popup_empty()} +

+ {:else} + {#each items as person, i (person.id)} +
{ + // Prevent blur on the editor before the selection fires. + e.preventDefault(); + selectItem(person); + }} + > + {person.displayName} + {#if formatLifeDateRange(person.birthYear, person.deathYear)} + + {formatLifeDateRange(person.birthYear, person.deathYear)} + + {/if} +
+ {/each} + {/if} +