diff --git a/frontend/src/lib/components/AccessDrawer.svelte b/frontend/src/lib/components/AccessDrawer.svelte
index 1d5302a1cb..0c91dbf08d 100644
--- a/frontend/src/lib/components/AccessDrawer.svelte
+++ b/frontend/src/lib/components/AccessDrawer.svelte
@@ -224,13 +224,29 @@
return `${principal} is a member of ${node.key}, so ${principal} can write every item under ${node.key}/, including items added later.`
}
- /** Grants on the item itself. What its folder or space gives is said once, on that row. */
+ /** Grants on the item itself, which decide whether its level reads as its own. */
function itemGrants(item: AccessItem): string[] {
return item.reasons.flatMap((r) =>
r.type === 'user' ? ['Shared directly'] : r.type === 'group' ? [viaLabel(`g/${r.group}`)] : []
)
}
+ /** Every reason the item is held: its own grants, then its folder or space. */
+ function itemReasons(item: AccessItem): string[] {
+ const labels = item.reasons.map((r) =>
+ r.type === 'user'
+ ? 'Shared directly'
+ : r.type === 'group'
+ ? viaLabel(`g/${r.group}`)
+ : r.type === 'folder'
+ ? `Through f/${r.folder}`
+ : r.type === 'group_path'
+ ? `Through g/${r.group}`
+ : 'Own path'
+ )
+ return [...new Set(labels)]
+ }
+
function levelClass(item: AccessItem, grants: string[], owner: AccessOwnerNode): string {
if (!grants.length) return 'text-hint'
return item.write && owner.whole && !owner.write ? 'font-semibold text-emphasis' : ''
@@ -364,7 +380,7 @@
{/snippet}
{#snippet content()}
{#if access}
-
+
{/if}
{/snippet}
@@ -526,7 +542,7 @@
>{item.write ? 'Write' : 'Read'}
- {grants.join(', ')}
+ {itemReasons(item).join(', ')}
{@const own = ownItemGrant(item)}
{#if own !== undefined}
diff --git a/frontend/src/lib/components/DrillPicker.svelte b/frontend/src/lib/components/DrillPicker.svelte
index ad55f4e042..4f6ac6fc6d 100644
--- a/frontend/src/lib/components/DrillPicker.svelte
+++ b/frontend/src/lib/components/DrillPicker.svelte
@@ -13,7 +13,8 @@ level *up*. Filter (internal or `externalFilter`) is global across all
leaves and ignores the current scope.
-->
@@ -534,99 +607,166 @@ leaves and ignores the current scope.
+
{
setHoverHighlight(key)
tooltipEnter(e.currentTarget as HTMLElement, leaf)
}}
+ onmousemove={leafActions && !isHl ? () => setHoverHighlight(key) : undefined}
onmouseleave={tooltipLeave}
>
- e.preventDefault()}
- onclickcapture={(e: MouseEvent) => {
- // Capture, not a delegated onclick: the picker is portalled outside the app root,
- // where a delegated handler runs after SvelteKit's link handler has already
- // followed the href, too late for preventDefault to keep a plain click on `pick`.
- if (href && isNewTabClick(e)) return
- e.preventDefault()
- pick(leaf, e.metaKey || e.ctrlKey)
- }}
+
+
- {@render defaultLeafIcon(leaf)}
-
-
e.preventDefault()}
+ onclickcapture={inert
+ ? undefined
+ : (e: MouseEvent) => {
+ // Capture, not a delegated onclick: the picker is portalled outside the app root,
+ // where a delegated handler runs after SvelteKit's link handler has already
+ // followed the href, too late for preventDefault to keep a plain click on `pick`.
+ if (href && isNewTabClick(e)) return
+ e.preventDefault()
+ pick(leaf, e.metaKey || e.ctrlKey)
+ }}
>
- {#if leaf.secondary}
-
diff --git a/frontend/src/lib/components/access/GrantNavigator.svelte b/frontend/src/lib/components/access/GrantNavigator.svelte
index 75899c09ab..1010aed63e 100644
--- a/frontend/src/lib/components/access/GrantNavigator.svelte
+++ b/frontend/src/lib/components/access/GrantNavigator.svelte
@@ -1,18 +1,21 @@
@@ -245,20 +459,41 @@ Picking a row grants the principal read on it; the "All of f/x" row grants the w
{/snippet}
-