Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .changeset/descenders.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
### Fixes
- **Letters like g and y are no longer cut off** - Tab titles and the names in the sidebar's lists (tables, views, databases, saved queries, the tree) clipped the bottom of descenders, more so with a font that sits low like Source Code Pro. They now have room, and the rows stay the same height.
2 changes: 1 addition & 1 deletion src/lib/components/SchemaTimelinePage.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -988,7 +988,7 @@
{item.status === 'added' ? '+' : item.status === 'removed' ? '−' : '~'}
</span>
<!-- Table name col -->
<span class="min-w-0 truncate font-mono text-ui-sm leading-none">{item.name}</span>
<span class="min-w-0 truncate font-mono text-ui-sm leading-normal">{item.name}</span>
</button>
</li>
{/each}
Expand Down
10 changes: 5 additions & 5 deletions src/lib/components/Sidebar.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -2682,7 +2682,7 @@
aria-label={isCurrent ? `${db.label}, current database` : `Switch to ${db.label}`}
>
<Icon name="database" class="size-4 shrink-0 text-muted-foreground" />
<span class="min-w-0 truncate text-ui-sm leading-4">{@render hl(db.label)}</span>
<span class="min-w-0 truncate text-ui-sm leading-4 -my-1 py-1">{@render hl(db.label)}</span>
{#if isCurrent}
<Icon name="check" class="size-3 shrink-0 text-success" />
{/if}
Expand Down Expand Up @@ -2800,7 +2800,7 @@
{:else}
<Icon name="table-2" class="size-4 shrink-0 text-muted-foreground" />
{/if}
<span class="min-w-0 truncate text-ui-sm leading-4">{@render hl(item.table)}</span>
<span class="min-w-0 truncate text-ui-sm leading-4 -my-1 py-1">{@render hl(item.table)}</span>
<button
type="button"
tabindex="-1"
Expand Down Expand Up @@ -2917,7 +2917,7 @@
<Icon name="square" class={cn("absolute inset-0 size-4 text-muted-foreground opacity-0 group-hover/sel:opacity-100", selecting && "opacity-100")} />
{/if}
</span>
<span class="min-w-0 truncate text-ui-sm leading-4">{@render hl(tableName)}</span>
<span class="min-w-0 truncate text-ui-sm leading-4 -my-1 py-1">{@render hl(tableName)}</span>
{#if showRowCount}
<span class="shrink-0 text-right font-mono text-ui-2xs leading-4 tabular-nums text-muted-foreground">
{formatTableRowCount(_rowCountByName.get(tableName))}
Expand Down Expand Up @@ -3154,7 +3154,7 @@
{/if}
</span>
<span class="flex min-w-0 items-center gap-1.5">
<span class="min-w-0 truncate text-ui-sm leading-4">{@render hl(table.name)}</span>
<span class="min-w-0 truncate text-ui-sm leading-4 -my-1 py-1">{@render hl(table.name)}</span>
{#if table.rlsEnabled}
<Icon
name="lock"
Expand Down Expand Up @@ -3253,7 +3253,7 @@
onclick={() => ontableselect(v.name)}
>
<span class="relative size-4 shrink-0"><Icon name={mat ? 'layers' : 'eye'} class={cn('absolute inset-0 size-4', mat ? 'text-warning' : 'text-muted-foreground')} /></span>
<span class="truncate text-ui-sm leading-4">{v.name}</span>
<span class="truncate text-ui-sm leading-4 -my-1 py-1">{v.name}</span>
{#if showRowCount && mat && v.rowCount != null}
<span class="flex min-w-[4ch] shrink-0 items-center justify-end font-mono text-ui-2xs leading-4 tabular-nums text-muted-foreground">{formatTableRowCount(v.rowCount)}</span>
{:else}<span></span>{/if}
Expand Down
6 changes: 3 additions & 3 deletions src/lib/components/SidebarObjects.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,7 @@
<Icon name="chevron-right" class={cn('size-3.5 shrink-0 text-muted-foreground transition-transform duration-100', r.open && 'rotate-90')} />
</span>
<Icon name={OBJECT_KIND_META[/** @type {ObjectKind} */ (r.group)]?.icon ?? 'box'} class={cn('size-4 shrink-0', OBJECT_KIND_META[/** @type {ObjectKind} */ (r.group)]?.tone)} />
<span class="min-w-0 flex-1 truncate text-ui-sm font-medium leading-4">{r.label}</span>
<span class="min-w-0 flex-1 truncate text-ui-sm font-medium leading-4 -my-1 py-1">{r.label}</span>
<span class={cn('shrink-0 font-mono text-ui-2xs tabular-nums text-muted-foreground', canCreate && 'group-hover/row:invisible', canCreate && ring && 'invisible')}>
{q ? `${r.count}/${r.total}` : r.total}
</span>
Expand Down Expand Up @@ -620,7 +620,7 @@
<Icon name="chevron-right" class={cn('size-3.5 shrink-0 text-muted-foreground transition-transform duration-100', r.open && 'rotate-90')} />
</span>
<Icon name="package" class="size-4 shrink-0 text-muted-foreground" />
<span class="min-w-0 flex-1 truncate text-ui-sm leading-4">{r.label}</span>
<span class="min-w-0 flex-1 truncate text-ui-sm leading-4 -my-1 py-1">{r.label}</span>
<span class="shrink-0 font-mono text-ui-2xs tabular-nums text-muted-foreground">{q ? `${r.count}/${r.total}` : r.total}</span>
</div>
{:else}
Expand All @@ -642,7 +642,7 @@
<span class="w-4 shrink-0" aria-hidden="true"></span>
<Icon name={OBJECT_KIND_META[/** @type {ObjectKind} */ (item.kind)]?.icon ?? 'box'} class={cn('size-4 shrink-0', OBJECT_KIND_META[/** @type {ObjectKind} */ (item.kind)]?.tone)} />
<span class="flex min-w-0 flex-1 items-baseline gap-1.5">
<span class="min-w-0 shrink truncate text-ui-sm leading-4">{#if hit}{hit[0]}<mark class="rounded-[2px] bg-primary/25 text-inherit">{hit[1]}</mark>{hit[2]}{:else}{item.name}{/if}</span>
<span class="min-w-0 shrink truncate text-ui-sm leading-4 -my-1 py-1">{#if hit}{hit[0]}<mark class="rounded-[2px] bg-primary/25 text-inherit">{hit[1]}</mark>{hit[2]}{:else}{item.name}{/if}</span>
{#if (item.kind === 'function' || item.kind === 'procedure') && item.args}
<span class="min-w-0 shrink-[2] truncate font-mono text-ui-2xs text-muted-foreground">({item.args})</span>
{/if}
Expand Down
4 changes: 2 additions & 2 deletions src/lib/components/SidebarQueries.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@
oncontextmenu={() => (menu = { kind: 'query', query: q })}
>
<Icon name="file-code" class={cn('size-3.5 shrink-0', activeId === q.id ? 'text-primary' : 'text-muted-foreground')} />
<span class="min-w-0 flex-1 truncate text-ui-sm leading-4">{renamedTo.get(q.id) ?? q.name}</span>
<span class="min-w-0 flex-1 truncate text-ui-sm leading-4 -my-1 py-1">{renamedTo.get(q.id) ?? q.name}</span>
</button>
{/if}
{/snippet}
Expand Down Expand Up @@ -399,7 +399,7 @@
>
<Icon name="chevron-right" class={cn('size-3.5 shrink-0 text-muted-foreground transition-transform duration-150', open && 'rotate-90')} />
<Icon name={open ? 'folder-open' : 'folder'} class="size-3.5 shrink-0 text-muted-foreground" />
<span class="min-w-0 flex-1 truncate text-ui-sm leading-4">{f.name}</span>
<span class="min-w-0 flex-1 truncate text-ui-sm leading-4 -my-1 py-1">{f.name}</span>
<span class="shrink-0 pr-1 font-mono text-ui-2xs tabular-nums text-muted-foreground">{group.queries.length}</span>
</button>
<button
Expand Down
2 changes: 1 addition & 1 deletion src/lib/components/SidebarTree.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -1397,7 +1397,7 @@
<Icon name={ic.name} class={cn('size-4 shrink-0', ic.tone)} />
{/if}
<span class="flex min-w-0 flex-1 items-baseline gap-1.5">
<span class={cn('min-w-0 shrink truncate text-ui-sm leading-4', (n.kind === 'connection' && n.data?.live) || (n.kind === 'database' && n.data?.current) ? 'font-medium text-foreground' : '')}>
<span class={cn('min-w-0 shrink truncate text-ui-sm leading-4 -my-1 py-1', (n.kind === 'connection' && n.data?.live) || (n.kind === 'database' && n.data?.current) ? 'font-medium text-foreground' : '')}>
{#if hit}{hit[0]}<mark class="rounded-[2px] bg-primary/25 text-inherit">{hit[1]}</mark>{hit[2]}{:else}{n.label}{/if}
</span>
{#if n.meta}
Expand Down
2 changes: 1 addition & 1 deletion src/lib/components/TabBar.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@
onclick={() => { if (_suppressTabClick) { _suppressTabClick = false; return } onselect(tab.id) }}
>
<Icon name={tabIconName} class={cn('size-3.5 shrink-0', active ? 'text-foreground' : 'text-muted-foreground')} />
<span class="truncate">{tabDisplayTitle(tab)}{#if tab.connLabel && clashing.has(tabDisplayTitle(tab))}<span class="text-muted-foreground">{` · ${tab.connLabel}`}</span>{/if}</span>
<span class="truncate leading-normal">{tabDisplayTitle(tab)}{#if tab.connLabel && clashing.has(tabDisplayTitle(tab))}<span class="text-muted-foreground">{` · ${tab.connLabel}`}</span>{/if}</span>
</button>

{#if tab.pinned}
Expand Down
Loading