@alliance-droid/status-feedback-system 1.3.3 → 1.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -69,6 +69,16 @@
|
|
|
69
69
|
let clickedElement = $state<HTMLElement | null>(null);
|
|
70
70
|
|
|
71
71
|
let formOpen = $state(false);
|
|
72
|
+
let formPopoverEl: HTMLDivElement | undefined = $state();
|
|
73
|
+
|
|
74
|
+
// Promote form modal to the browser's top layer when opened
|
|
75
|
+
$effect(() => {
|
|
76
|
+
if (formOpen && formPopoverEl && typeof formPopoverEl.showPopover === 'function') {
|
|
77
|
+
try { formPopoverEl.showPopover(); } catch { /* fallback to z-index */ }
|
|
78
|
+
} else if (!formOpen && formPopoverEl && typeof formPopoverEl.hidePopover === 'function') {
|
|
79
|
+
try { formPopoverEl.hidePopover(); } catch { /* already hidden */ }
|
|
80
|
+
}
|
|
81
|
+
});
|
|
72
82
|
let formType = $state<'bug' | 'feature'>('bug');
|
|
73
83
|
let formTitle = $state('');
|
|
74
84
|
let formMessage = $state('');
|
|
@@ -284,7 +294,9 @@
|
|
|
284
294
|
<!-- Form modal -->
|
|
285
295
|
{#if formOpen}
|
|
286
296
|
<div
|
|
287
|
-
|
|
297
|
+
bind:this={formPopoverEl}
|
|
298
|
+
popover="manual"
|
|
299
|
+
class="sf-modal sf-feedback-popover w-full max-w-lg flex flex-col"
|
|
288
300
|
style={modalPositioned
|
|
289
301
|
? `left: ${modalX}px; top: ${modalY}px;`
|
|
290
302
|
: 'left: 50%; top: 50%; transform: translate(-50%, -50%);'
|
|
@@ -451,6 +463,18 @@
|
|
|
451
463
|
{/if}
|
|
452
464
|
|
|
453
465
|
<style>
|
|
466
|
+
/* Override popover defaults — remove browser default styles */
|
|
467
|
+
.sf-feedback-popover {
|
|
468
|
+
position: fixed;
|
|
469
|
+
margin: 0;
|
|
470
|
+
padding: 0;
|
|
471
|
+
border: none;
|
|
472
|
+
background: transparent;
|
|
473
|
+
overflow: visible;
|
|
474
|
+
/* Fallback for browsers without popover support */
|
|
475
|
+
z-index: 99998;
|
|
476
|
+
}
|
|
477
|
+
|
|
454
478
|
/* Floating modal shadow — no backdrop so needs strong depth cue */
|
|
455
479
|
.sf-modal :global(.card) {
|
|
456
480
|
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05);
|
|
@@ -8,11 +8,26 @@
|
|
|
8
8
|
onViewBoard?: () => void;
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
+
import { onMount } from 'svelte';
|
|
12
|
+
|
|
11
13
|
let { x, y, boardUrl, onReportBug, onRequestFeature, onViewBoard }: Props = $props();
|
|
12
14
|
|
|
15
|
+
let popoverEl: HTMLDivElement | undefined = $state();
|
|
16
|
+
|
|
13
17
|
let adjustedX = $derived(Math.min(x, (typeof window !== 'undefined' ? window.innerWidth : 800) - 200));
|
|
14
18
|
let adjustedY = $derived(Math.min(y, (typeof window !== 'undefined' ? window.innerHeight : 600) - 160));
|
|
15
19
|
|
|
20
|
+
// Show the popover on mount to promote it to the top layer
|
|
21
|
+
onMount(() => {
|
|
22
|
+
if (popoverEl && typeof popoverEl.showPopover === 'function') {
|
|
23
|
+
try {
|
|
24
|
+
popoverEl.showPopover();
|
|
25
|
+
} catch {
|
|
26
|
+
// Fallback: popover API not supported, z-index inline style still applies
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
|
|
16
31
|
function handleKeydown(e: KeyboardEvent) {
|
|
17
32
|
const menu = (e.currentTarget as HTMLElement);
|
|
18
33
|
const items = menu.querySelectorAll<HTMLElement>('[role="menuitem"]');
|
|
@@ -31,8 +46,11 @@
|
|
|
31
46
|
</script>
|
|
32
47
|
|
|
33
48
|
<!-- svelte-ignore a11y_no_static_element_interactions — context menu positioned at cursor -->
|
|
49
|
+
<!-- popover="manual" promotes to browser top layer (above <dialog> modals) -->
|
|
34
50
|
<div
|
|
35
|
-
|
|
51
|
+
bind:this={popoverEl}
|
|
52
|
+
popover="manual"
|
|
53
|
+
class="sf-ctx-popover"
|
|
36
54
|
style="left: {adjustedX}px; top: {adjustedY}px;"
|
|
37
55
|
onmousedown={(e) => e.stopPropagation()}
|
|
38
56
|
>
|
|
@@ -59,6 +77,18 @@
|
|
|
59
77
|
</div>
|
|
60
78
|
|
|
61
79
|
<style>
|
|
80
|
+
/* Override popover defaults — remove browser default styles */
|
|
81
|
+
.sf-ctx-popover {
|
|
82
|
+
position: fixed;
|
|
83
|
+
margin: 0;
|
|
84
|
+
padding: 0;
|
|
85
|
+
border: none;
|
|
86
|
+
background: transparent;
|
|
87
|
+
overflow: visible;
|
|
88
|
+
/* Fallback for browsers without popover support */
|
|
89
|
+
z-index: 99999;
|
|
90
|
+
}
|
|
91
|
+
|
|
62
92
|
.sf-ctx-menu {
|
|
63
93
|
background: var(--sf-surface, var(--color-surface, #1e293b));
|
|
64
94
|
border: 1px solid var(--sf-border, var(--color-border, #334155));
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
let { onDismiss }: Props = $props();
|
|
7
7
|
</script>
|
|
8
8
|
|
|
9
|
-
<div class="fixed bottom-4 right-4
|
|
9
|
+
<div class="fixed bottom-4 right-4 animate-fade-in" style="z-index: 99997;">
|
|
10
10
|
<div class="sf-toast">
|
|
11
11
|
<i class="fa-solid fa-computer-mouse sf-toast-icon"></i>
|
|
12
12
|
<div>
|
package/package.json
CHANGED