From f71a12a3f0c9f08c143c2f136900ca6a0e8c6361 Mon Sep 17 00:00:00 2001 From: rumetsasmaz Date: Sun, 15 Nov 2026 14:25:02 +0300 Subject: [PATCH] Variable rail keeps every name and sits lower; side chart drops its period link Co-Authored-By: Claude Opus 5.5 --- web/src/App.css | 1 + web/src/Panel.tsx | 6 +----- web/src/VariableDock.tsx | 21 +++++---------------- web/src/responsive.css | 4 ++-- 4 files changed, 9 insertions(+), 23 deletions(-) diff --git a/web/src/App.css b/web/src/App.css index 5f6aaaa..854477c 100644 --- a/web/src/App.css +++ b/web/src/App.css @@ -2262,6 +2262,7 @@ dialog.method::backdrop { } .rail .dock { flex-direction: row; align-items: center; height: 52px; border-radius: var(--radius-m); } .rail .dock-item { justify-content: center; padding: 0 10px; } + .rail .dock-item:not(.on) .dock-name { display: none; } .rail .dock-sep { width: 1px; height: 20px; margin: 0 4px; background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.22), transparent); } .rail .dock-label { left: 50%; top: auto; bottom: calc(100% + 12px); translate: -50% 0; } .deck { bottom: calc(var(--sheet) + var(--edge) + 62px); } diff --git a/web/src/Panel.tsx b/web/src/Panel.tsx index eb40929..014da85 100644 --- a/web/src/Panel.tsx +++ b/web/src/Panel.tsx @@ -556,11 +556,7 @@ export function Panel(p: Props) { content: ( <> ({ id: k, label: t(lang, k) }))} value={menuView} onChange={setView} /> - - - + ), onClick: () => setOpenRow(openRow === "graph" ? null : "graph"), } diff --git a/web/src/VariableDock.tsx b/web/src/VariableDock.tsx index 7be871f..7aa12e0 100644 --- a/web/src/VariableDock.tsx +++ b/web/src/VariableDock.tsx @@ -1,12 +1,12 @@ /** * Variable dock: the nine MERRA-2 variables in one floating bar along the bottom of the globe. - * The chosen variable shows its name next to its icon and a soft background slides to it - * (motion layoutId); the others are icons with a label on hover. Groups are split by thin + * Every variable shows its name next to its icon (on phones only the chosen one) and a soft + * background slides to the chosen one (motion layoutId); hover adds the unit. Groups are split by thin * separators. Started from Magic UI "Dock" (MIT), magnification removed so the bar stays calm. * Written with AI assistance (Claude). */ import { Fragment, useState } from "react"; -import { AnimatePresence, motion, useReducedMotion } from "motion/react"; +import { motion, useReducedMotion } from "motion/react"; import type { VarId, VariableInfo } from "./data.ts"; import { VAR_GROUPS, VAR_ICONS } from "./content.ts"; import { Icon } from "./icons.tsx"; @@ -77,19 +77,8 @@ function DockItem(p: { > {p.active && } - - {p.active && ( - - {p.name} - - )} - + {/* every name stays on screen; on phones (row layout) CSS keeps only the chosen one */} + {p.name} {hover && !p.active && ( {p.label} diff --git a/web/src/responsive.css b/web/src/responsive.css index df609d8..ec84bcd 100644 --- a/web/src/responsive.css +++ b/web/src/responsive.css @@ -166,9 +166,9 @@ .period { width: var(--left-w, 380px); } - /* the rail starts right under the period card instead of floating at mid-screen */ + /* the rail starts a little under the period card instead of floating at mid-screen */ .rail { - top: calc(var(--left-bottom, 176px) + 10px); + top: calc(var(--left-bottom, 176px) + 40px); translate: none; } /* the legend sits on the same left edge, as wide as the rail column */