Skip to content

Commit 987679e

Browse files
committed
handle long names
1 parent 1f4faa0 commit 987679e

File tree

3 files changed

+20
-13
lines changed

3 files changed

+20
-13
lines changed

frontend/src/features/crawls/crawl-list/crawl-list-item.ts

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -206,15 +206,16 @@ export class CrawlListItem extends BtrixElement {
206206
)}
207207
</btrix-table-cell>
208208
<btrix-table-cell>
209-
<div class="max-w-sm truncate">
210-
${this.safeRender(
211-
(crawl) =>
212-
html`<btrix-user-chip
209+
${this.safeRender(
210+
(crawl) =>
211+
html`<sl-tooltip content=${crawl.userName}
212+
><btrix-user-chip
213+
class="max-w-full"
213214
userId=${crawl.userid}
214215
userName=${crawl.userName}
215-
></btrix-user-chip>`,
216-
)}
217-
</div>
216+
></btrix-user-chip
217+
></sl-tooltip>`,
218+
)}
218219
</btrix-table-cell>
219220
<btrix-table-cell class="pl-1 pr-1">
220221
${this.renderActions()}

frontend/src/features/crawls/crawl-list/crawl-list.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,11 @@ export class CrawlList extends TailwindElement {
6464
this.workflowId ? undefined : "36ch", // Name
6565
"22ch", // Started
6666
"22ch", // Finished
67-
"15ch", // Execution time
68-
"10ch", // Pages
69-
"12ch", // Size
70-
"auto", // Run by
71-
"[clickable-end] min-content",
67+
"auto", // Execution time
68+
"auto", // Pages
69+
"auto", // Size
70+
"[clickable-end] 20ch", // Run by
71+
"min-content",
7272
]
7373
.filter((v) => v)
7474
.join(" ");

frontend/src/features/users/user-chip.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,13 @@ export class UserChip extends BtrixElement {
1616
render() {
1717
if (!this.userName) return;
1818

19-
return html`<btrix-badge pill outline size="large" .role=${null}>
19+
return html`<btrix-badge
20+
class="max-w-full part-[base]:justify-start part-[base]:truncate"
21+
pill
22+
outline
23+
size="large"
24+
.role=${null}
25+
>
2026
${this.userName}
2127
</btrix-badge>`;
2228
}

0 commit comments

Comments
 (0)