Skip to content

Commit 1ea33af

Browse files
committed
🎨 Three point leader is shown at the end, if the title is long (#1901)
1 parent 6999677 commit 1ea33af

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/lib/components/ExternalLinkWrapper.svelte

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
textColorInDarkMode?: string;
99
textOverflow?: string;
1010
iconSize?: number;
11+
useInlineFlex?: boolean;
1112
}
1213
1314
let {
@@ -17,12 +18,13 @@
1718
textColorInDarkMode = 'dark:text-primary-500',
1819
textOverflow = '',
1920
iconSize = 4,
21+
useInlineFlex = true,
2022
}: Props = $props();
2123
</script>
2224

2325
<a
2426
href={url}
25-
class={`inline-flex items-center font-medium ${textSize} text-primary-600 hover:underline ${textColorInDarkMode}`}
27+
class={`${useInlineFlex ? 'inline-flex' : ''} items-center font-medium ${textSize} text-primary-600 hover:underline ${textColorInDarkMode}`}
2628
target="_blank"
2729
rel="noreferrer"
2830
>

src/lib/components/TaskTables/TaskTableBodyCell.svelte

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,14 @@
4343
{/snippet}
4444

4545
{#snippet taskTitleAndExternalLink(taskResult: TaskResult)}
46-
<div class="max-w-[calc(100%-2rem)] truncate">
46+
<div class="max-w-[calc(100%-1rem)] truncate">
4747
<ExternalLinkWrapper
4848
url={getTaskUrl(taskResult.contest_id, taskResult.task_id)}
4949
description={removeTaskIndexFromTitle(taskResult.title, taskResult.task_table_index)}
5050
textSize="xs:text-md"
5151
textColorInDarkMode="dark:text-gray-300"
5252
iconSize={0}
53+
useInlineFlex={false}
5354
/>
5455
</div>
5556
{/snippet}

0 commit comments

Comments
 (0)