Skip to content

Commit bb8a379

Browse files
committed
Fix install path overflowing the tooltip
1 parent 37beff3 commit bb8a379

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

frontend/src/lib/components/left-bar/LeftBar.svelte

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,13 @@
124124
target: installOptionPopupId(i),
125125
middleware: {
126126
offset: 4,
127+
size: {
128+
apply: ({ availableWidth, elements }: { availableWidth: number, elements: { floating: HTMLElement } }) => {
129+
Object.assign(elements.floating.style, {
130+
maxWidth: `${Math.max(0, availableWidth)}px`,
131+
});
132+
},
133+
},
127134
},
128135
placement: 'right',
129136
} as PopupSettings]).reduce((acc, [k, v]) => ({ ...acc, [k as string]: v as PopupSettings }), {} as Record<string, PopupSettings>);
@@ -199,7 +206,7 @@
199206
<svelte:fragment slot="itemTrail" let:item>
200207
<Tooltip fixed popupId={installOptionPopupId(item)}>
201208
<div class="flex flex-col">
202-
<span>{item}</span>
209+
<span class="break-words">{item}</span>
203210
{#if $installsMetadata[item]?.state === ficsitcli.InstallState.VALID}
204211
<!-- nothing extra -->
205212
{:else if $installsMetadata[item]?.state === ficsitcli.InstallState.LOADING}

0 commit comments

Comments
 (0)