Skip to content

Commit 140bd83

Browse files
authored
Merge pull request #2821 from appwrite/fix-small-tooltip-bug-spreadsheet
fix: small tooltip bug in spreadsheet
2 parents 8c8caaa + 31d7468 commit 140bd83

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

  • src/routes/(console)/project-[region]-[project]/databases/database-[database]/table-[table]/columns

src/routes/(console)/project-[region]-[project]/databases/database-[database]/table-[table]/columns/+page.svelte

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@
217217
? (max < 0n ? -max : max) >= LARGE_NUMBER_THRESHOLD
218218
: Math.abs(max) >= LARGE_NUMBER_THRESHOLD_NUM);
219219
if (shouldShowTooltip) {
220-
tooltip = `Min: ${min.toLocaleString()}, Max: ${max.toLocaleString()}`;
220+
tooltip = `Min: ${min.toLocaleString()}\nMax: ${max.toLocaleString()}`;
221221
}
222222
} else if (hasValidMin) {
223223
display = `Min: ${formatLargeNumber(min)}`;
@@ -310,8 +310,8 @@
310310
const spreadsheetColumns = $derived([
311311
{
312312
id: 'key',
313-
width: getColumnWidth('key', 300),
314-
minimumWidth: 300,
313+
width: getColumnWidth('key', 380),
314+
minimumWidth: 380,
315315
resizable: true
316316
},
317317
{
@@ -468,13 +468,15 @@
468468
{@const relationType = getRelationshipTypeForColumn(column)}
469469
{#if minMaxSize}
470470
{#if minMaxSize.tooltip}
471-
<Tooltip portal>
471+
<Tooltip portal maxWidth="fit-content" placement="top">
472472
<Typography.Caption
473473
variant="400"
474474
color="--fgcolor-neutral-tertiary">
475475
{minMaxSize.display}
476476
</Typography.Caption>
477-
<div slot="tooltip">{minMaxSize.tooltip}</div>
477+
<div slot="tooltip" style="white-space: pre-line;">
478+
{minMaxSize.tooltip}
479+
</div>
478480
</Tooltip>
479481
{:else}
480482
<Typography.Caption

0 commit comments

Comments
 (0)