Fix fileitem path truncation (#5397)

* Update Textarea.svelte

* fix file path and name strings truncation

* add tooltip

* fix tooltip word break

* update tooltip name
This commit is contained in:
Pavel Laptev 2024-11-01 16:34:52 +01:00 committed by GitHub
parent 0560feedeb
commit ad2a37113d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 20 additions and 14 deletions

View File

@ -101,6 +101,7 @@
max-width: 240px; max-width: 240px;
padding: 4px 8px; padding: 4px 8px;
z-index: var(--z-blocker); z-index: var(--z-blocker);
word-break: break-word;
text-align: left; text-align: left;
box-shadow: var(--fx-shadow-s); box-shadow: var(--fx-shadow-s);
} }

View File

@ -91,12 +91,15 @@
{/if} {/if}
<div class="info"> <div class="info">
<FileIcon fileName={fileInfo.filename} /> <FileIcon fileName={fileInfo.filename} />
<span class="text-12 name"> <span class="text-12 name truncate">
{fileInfo.filename} {fileInfo.filename}
</span> </span>
<span class="text-12 path">
<Tooltip text={filePath} delay={1500}>
<span class="text-12 path truncate">
{fileInfo.path} {fileInfo.path}
</span> </span>
</Tooltip>
</div> </div>
<div class="details"> <div class="details">
@ -181,8 +184,8 @@
opacity var(--transition-fast); opacity var(--transition-fast);
} }
/* INFO */
.info { .info {
pointer-events: none;
display: flex; display: flex;
align-items: center; align-items: center;
flex-grow: 1; flex-grow: 1;
@ -192,21 +195,23 @@
} }
.name { .name {
color: var(--clr-scale-ntrl-0); flex-shrink: 1;
white-space: nowrap; flex-grow: 0;
flex-shrink: 0; min-width: 40px;
text-overflow: ellipsis; pointer-events: none;
overflow: hidden; color: var(--clt-text-1);
} }
.path { .path {
color: var(--clr-scale-ntrl-0); flex-shrink: 0;
flex-grow: 1;
flex-basis: 0px;
min-width: 50px;
color: var(--clt-text-1);
line-height: 120%; line-height: 120%;
flex-shrink: 1; flex-shrink: 1;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
opacity: 0.3; opacity: 0.3;
transition: opacity var(--transition-fast);
} }
/* DETAILS */ /* DETAILS */