feat(ui): styled app-wide tooltip component (LC-370) #376
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/lc-370-tooltip-component"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes LC-370.
What
Replaces the native
title=tooltips on the enclave rail and room header with one styled, theme-aware tooltip component.server/assets/tooltip.js: a singleposition:fixed#lc-tooltipelement appended to<body>, driven declaratively bydata-lc-tip="text"(+ optionaldata-lc-tip-pos="top|right|bottom|left"). Fixed positioning is the point: the enclave rail isoverflow-y-auto, which forces horizontal clipping, so a CSS-only::aftertooltip cannot escape it.#lc-tooltipinmain.css, served raw so it is never purged): token-driven chip (var(--content)onvar(--surface-elevated)) that inverts correctly across light, dark, and high-contrast themes.enclave_switcher.html,pos="right") - enclave link, settings gear, discover+, sidebar-collapse; room header (room_header.html,pos="bottom") - room-info heading, jump-to-date, info-docs, moderators.Accessibility
The tooltip element is
aria-hiddendecoration. Every converted trigger keeps or gains its own accessible name: icon-only controls carry an explicitaria-label; controls with visible text keep the visible text (no redundantaria-labelthat would override it). Notitle=is left alongsidedata-lc-tip, so nothing double-renders.Docs
docs/ui-conventions.mdgains a "Tooltips (LC-370)" section: the attribute contract, the accessible-name rule, and the rail-right / topbar-bottom placement convention.Testing
./dev/cargo check -p lets-chat-server- clean (Askama validates the templates at compile time).just testandjust test-saas- both green.🤖 Generated with Claude Code