Space the stripe and set the island flush against it

- Give the stripe buttons IntelliJ's spacing and room above the first one
- Meet the island beside the stripe flush with square corners
This commit is contained in:
piexel committed 2026-11-25 19:26:31 +01:00
1 parent 6bdd786815
commit f1482bf338
2 files changed
+6 -3

No files matched your search

+4 -1
View File
@@ -5,6 +5,7 @@ import type { Share } from '../map/census'
import type { MapController, MapStatus, MapToggles } from '../map/MapController'
import type { Highlight } from '../map/tileStyle'
import { Waves } from 'lucide-react'
import { cn } from '@/lib/utils'
import { HelpDialog } from './HelpDialog'
import { HoverCard } from './HoverCard'
import { Glyph } from './Glyph'
@@ -30,6 +31,8 @@ import { usePickInspection } from './usePickInspection'
import { ViewList } from './ViewList'
const KEYBOARD_ZOOM_FACTOR = 2 ** 0.25
/** The island beside the stripe meets it flush with square corners, as IntelliJ's tool windows meet theirs; the row's gap is 1.5. */
const ISLAND_FLUSH_WITH_STRIPE = '[&>nav]:-mr-1.5 [&>nav+div:not(:empty)]:rounded-l-none [&>nav+div:empty+*]:rounded-l-none'
const ENTITY_POLL_MILLIS = 2000
const NOTICE_MILLIS = 4000
/** The views whose spots a noise picks, which the pick inspector explains. */
@@ -235,7 +238,7 @@ export function MapStudio({ client, world, theme, onOpenPack, onDisconnect }: Ma
<div className="flex h-full flex-col">
<StudioToolbar world={world} openingPack={openingPack} loadPacks={loadPacks} onOpenPack={openPack} onHelp={() => setHelpOpen(true)} onSettings={() => setSettingsOpen(true)} />
<SidebarSlot.Provider value={sidebarSlot}>
<div className="relative flex min-h-0 flex-1 gap-1.5 pr-1.5">
<div className={cn('relative flex min-h-0 flex-1 gap-1.5 pr-1.5', ISLAND_FLUSH_WITH_STRIPE)}>
{openingPack !== null && (
<div className="absolute inset-0 z-20 flex items-center justify-center bg-background/70 backdrop-motion">
<div className="popup flex items-center gap-2 px-4 py-3 dialog-motion">
+2 -2
View File
@@ -91,7 +91,7 @@ export function ViewList({ views, current, onSelect, slotRef }: ViewListProps):
const groups = groupsOf(views)
return (
<>
<nav className="flex w-10 shrink-0 flex-col items-center gap-2 overflow-y-auto pb-1.5">
<nav className="flex w-10 shrink-0 flex-col items-center gap-2.5 overflow-y-auto pt-1 pb-1.5">
{groups.map((group, index) => (
<Fragment key={group.label}>
{index > 0 && <StripeLine />}
@@ -119,7 +119,7 @@ function groupsOf(views: ViewInfo[]): ViewGroup[] {
}
function StripeLine(): React.JSX.Element {
return <span className="h-px w-5 shrink-0 bg-input" />
return <span className="my-0.5 h-px w-5 shrink-0 bg-input" />
}
function ViewButton({ view, selected, onSelect }: { view: ViewInfo; selected: boolean; onSelect(): void }): React.JSX.Element {