Skip to content

Edge-Drop is a clipboard shelf on the edge of your screen. Hover to open it. Drag files and images into any app, click to copy text and links. Free and open-source for Windows.

feat(settings): refine horizontal layout with obsidian language flyout and streamlined controls

Deepender25afa4e239a0c2
diff --git a/package.json b/package.json
index c199912..e5fcf5c 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "edge-drop",
- "version": "0.3.1",
+ "version": "0.3.2",
"description": "Edge-Drop — a clipboard manager that lives on the left edge of your screen and expands on hover.",
"author": "Edge-Drop",
"license": "Apache-2.0",
diff --git a/src/components/ClipboardItem.tsx b/src/components/ClipboardItem.tsx
index 20c42b1..958f062 100644
--- a/src/components/ClipboardItem.tsx
+++ b/src/components/ClipboardItem.tsx
@@ -1101,20 +1101,17 @@ function Preview({ item }: { item: ClipboardItemDto }) {
</>
)
}
- // Non-image single file — show big hero icon on top, and name + meta on the bottom!
+ // Non-image single file — show hero icon on top, and name on the bottom!
const info = getFileKind(first, entry?.isDirectory)
return (
<div className="single-file-preview">
<div className="single-file-hero" style={{ color: info.color }}>
- <FileKindIcon path={first} width={136} height={136} isDirectory={entry?.isDirectory} />
+ <FileKindIcon path={first} isDirectory={entry?.isDirectory} />
</div>
<div className="single-file-meta">
<div className="preview single single-file-name" title={displayName}>
{displayName}
</div>
- <div className="single-file-sub">
- {info.label}{!entry?.isDirectory && entry && entry.size > 0 ? ` · ${formatBytes(entry.size)}` : ''}
- </div>
</div>
</div>
)
diff --git a/src/components/IndicatorStyleFlyout.tsx b/src/components/IndicatorStyleFlyout.tsx
index 4dd0d0e..09e7326 100644
--- a/src/components/IndicatorStyleFlyout.tsx
+++ b/src/components/IndicatorStyleFlyout.tsx
@@ -227,11 +227,11 @@ export function IndicatorStyleFlyout({ isRight }: { isRight: boolean }) {
maxHeight: maxFlyoutHeight,
background: '#141414',
borderRadius: 20,
- border: '1px solid rgba(255, 255, 255, 0.08)',
+ border: 'none',
overflow: 'hidden',
display: 'flex',
flexDirection: 'column',
- boxShadow: '0 20px 40px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(0, 0, 0, 0.5)',
+ boxShadow: 'none',
pointerEvents: 'auto',
position: 'relative',
padding: 12
diff --git a/src/components/ItemList.tsx b/src/components/ItemList.tsx
index 772e652..045ddf5 100644
--- a/src/components/ItemList.tsx
+++ b/src/components/ItemList.tsx
@@ -331,11 +331,18 @@ export function ItemList() {
type="button"
aria-label={pinnedCollapsed ? t('item.expandPinned') : t('item.collapsePinned')}
>
- <ChevronDownIcon style={{ transform: pinnedCollapsed ? 'rotate(0deg)' : 'rotate(180deg)', transition: 'transform 0.14s ease' }} />
+ <ChevronDownIcon
+ style={{
+ transform: isHorizontal
+ ? (pinnedCollapsed ? 'rotate(-90deg)' : 'rotate(90deg)')
+ : (pinnedCollapsed ? 'rotate(0deg)' : 'rotate(180deg)'),
+ transition: 'transform 0.14s ease'
+ }}
+ />
</button>
</div>
</div>
- {(isHorizontal || !pinnedCollapsed) && pinned.map((it) => (
+ {!pinnedCollapsed && pinned.map((it) => (
<ClipboardItemCard key={it.id} item={it} timeTick={timeTick} />
))}
</section>
@@ -344,8 +351,8 @@ export function ItemList() {
{recent.length > 0 && (
<section className="recent-section">
{pinned.length > 0 && (
- <div className="section-label">
- {t('item.recent')}
+ <div className="section-label recent-header">
+ <span className="recent-label-text">{t('item.recent')}</span>
</div>
)}
{recent.map((it) => (
diff --git a/src/components/LanguageFlyout.tsx b/src/components/LanguageFlyout.tsx
new file mode 100644
index 0000000..c36f53f
--- /dev/null
+++ b/src/components/LanguageFlyout.tsx
@@ -0,0 +1,349 @@
+/**
+ * LanguageFlyout — Obsidian Flyout Selection Panel for Display Language in Horizontal Layout.
+ *
+ * Provides an elegant, clean single-column list of all application languages
+ * with native scripts, English subnames, and smooth spring entry/exit animations.
+ */
+import { useRef, useEffect } from 'react'
+import { motion, AnimatePresence } from 'framer-motion'
+import { useStore } from '../store/appStore'
+import { CloseIcon } from './icons'
+import { playButtonClickSound } from '../lib/soundEffects'
+import { createPortal } from 'react-dom'
+import { useAdaptiveSpring } from '../hooks/useAdaptiveSpring'
+import { useTranslation } from '../i18n'
+
+const flyoutEaseOpen = [0.16, 1, 0.3, 1] as const
+const flyoutEaseClose = [0.3, 0, 0.2, 1] as const
+
+const flyoutVariants = {
+ hidden: (dir: 'left' | 'right' | 'top' | 'bottom') => ({
+ opacity: 0,
+ x: dir === 'right' ? 14 : dir === 'left' ? -14 : 0,
+ y: dir === 'top' ? -14 : dir === 'bottom' ? 14 : 0,
+ scale: 0.97,
+ }),
+ shown: {
+ opacity: 1,
+ x: 0,
+ y: 0,
+ scale: 1,
+ transition: {
+ x: { duration: 0.26, ease: flyoutEaseOpen },
+ y: { duration: 0.26, ease: flyoutEaseOpen },
+ scale: { duration: 0.26, ease: flyoutEaseOpen },
+ opacity: { duration: 0.18, ease: 'easeOut' as const },
+ },
+ },
+ exit: (dir: 'left' | 'right' | 'top' | 'bottom') => ({
+ opacity: 0,
+ x: dir === 'right' ? 10 : dir === 'left' ? -10 : 0,
+ y: dir === 'top' ? -10 : dir === 'bottom' ? 10 : 0,
+ scale: 0.98,
+ transition: {
+ x: { duration: 0.18, ease: flyoutEaseClose },
+ y: { duration: 0.18, ease: flyoutEaseClose },
+ scale: { duration: 0.18, ease: flyoutEaseClose },
+ opacity: { duration: 0.14, ease: 'easeIn' as const },
+ },
+ }),
+ reducedHidden: { opacity: 0 },
+ reducedShown: { opacity: 1 },
+}
+
+export function LanguageFlyout({ isRight }: { isRight: boolean }) {
+ const { t, language, languages } = useTranslation()
+ const languageFlyoutOpen = useStore((s) => s.languageFlyoutOpen)
+ const setLanguageFlyoutOpen = useStore((s) => s.setLanguageFlyoutOpen)
+ const settingsOpen = useStore((s) => s.settingsOpen)
+ const open = useStore((s) => s.open)
+ const settings = useStore((s) => s.settings)
+ const patch = useStore((s) => s.patchSettings)
+ const adaptiveSpring = useAdaptiveSpring()
+
+ const stickPosition = (settings.stickPosition || (isRight ? 'right' : 'left')) as 'left' | 'right' | 'top' | 'bottom'
+ const isHorizontal = stickPosition === 'top' || stickPosition === 'bottom'
+ const isTop = stickPosition === 'top'
+
+ const isVisible = languageFlyoutOpen && settingsOpen && open
+ const reduceMotion = settings.reduceMotion || adaptiveSpring.type === 'tween'
+
+ const flyoutRef = useRef<HTMLDivElement | null>(null)
+ const listRef = useRef<HTMLDivElement | null>(null)
+
+ const screenW = typeof window !== 'undefined' ? window.innerWidth : 1200
+ const screenH = typeof window !== 'undefined' ? window.innerHeight : 800
+ const pFrac = settings.panelHeight || 0.6
+ const panelH = screenH * pFrac
+ const minY = panelH / 2
+ const maxY = screenH - panelH / 2
+ const vOffset = settings.verticalOffset ?? 0.5
+ const midY = Math.round(minY + vOffset * (maxY - minY))
+ const panelTop = midY - panelH / 2
+
+ const languageFlyoutAnchorRect = useStore((s) => s.languageFlyoutAnchorRect)
+
+ const dockWidth = Math.min(screenW - 60, 1080)
+ const flyoutWidth = isHorizontal ? 270 : 280
+ const dockLeft = Math.round((screenW - dockWidth) / 2)
+ const anchorCenterX = isHorizontal && languageFlyoutAnchorRect?.x !== undefined
+ ? (languageFlyoutAnchorRect.x + (languageFlyoutAnchorRect.width || 32) / 2) - dockLeft
+ : dockWidth / 2
+ const minLeft = 12
+ const maxLeft = Math.max(minLeft, dockWidth - flyoutWidth - 12)
+ const flyoutLeft = Math.max(minLeft, Math.min(maxLeft, Math.round(anchorCenterX - flyoutWidth / 2)))
+
+ const maxFlyoutHeight = isHorizontal ? 260 : Math.max(100, panelH - 24)
+
+ const originX = isHorizontal
+ ? Math.max(0.08, Math.min(0.92, (anchorCenterX - flyoutLeft) / flyoutWidth))
+ : (isRight ? 1 : 0)
+ const originY = isHorizontal ? (isTop ? 0 : 1) : 0.5
+
+ useEffect(() => {
+ if (!isVisible || !flyoutRef.current) {
+ useStore.getState().setPreviewFlyoutRect(null)
+ return
+ }
+
+ const updateRect = () => {
+ if (!flyoutRef.current) return
+ const h = flyoutRef.current.offsetHeight
+ if (isHorizontal) {
+ useStore.getState().setPreviewFlyoutRect({
+ top: isTop ? 210 : Math.max(0, screenH - (222 + h)),
+ bottom: isTop ? 222 + h : screenH - 210,
+ left: flyoutLeft,
+ right: flyoutLeft + flyoutWidth
+ })
+ } else {
+ const top = panelTop + (panelH - h) / 2
+ useStore.getState().setPreviewFlyoutRect({ top, bottom: top + h })
+ }
+ }
+
+ updateRect()
+ const ro = new ResizeObserver(updateRect)
+ ro.observe(flyoutRef.current)
+ window.addEventListener('resize', updateRect)
+
+ return () => {
+ ro.disconnect()
+ window.removeEventListener('resize', updateRect)
+ useStore.getState().setPreviewFlyoutRect(null)
+ }
+ }, [isVisible, isHorizontal, isTop, screenH, flyoutLeft, flyoutWidth, panelTop, panelH])
+
+ // Auto-scroll to active language on open
+ useEffect(() => {
+ if (isVisible && listRef.current) {
+ const activeBtn = listRef.current.querySelector<HTMLButtonElement>('[data-active="true"]')
+ if (activeBtn) {
+ if ((language || 'system') === 'system') {
+ listRef.current.scrollTop = 0
+ } else {
+ listRef.current.scrollTop = Math.max(0, activeBtn.offsetTop - 36)
+ }
+ }
+ }
+ }, [isVisible, language])
+
+ // Dismiss flyout when clicking outside
+ useEffect(() => {
+ if (!isVisible) return
+
+ const handlePointerDown = (e: PointerEvent) => {
+ const target = e.target as Element | null
+ if (!target || typeof target.closest !== 'function') return
+
+ if (target.closest('[data-language-flyout], .language-flyout, .language-toggle-btn')) {
+ return
+ }
+
+ const inBlade = Boolean(target.closest('.blade') || target.closest('.root') || target.closest('.settings-horizontal-shelf'))
+ if (inBlade) {
+ useStore.getState().setLanguageFlyoutOpen(false)
+ }
+ }
+
+ document.addEventListener('pointerdown', handlePointerDown, true)
+ return () => {
+ document.removeEventListener('pointerdown', handlePointerDown, true)
+ }
+ }, [isVisible])
+
+ return createPortal(
+ <AnimatePresence>
+ {isVisible && (
+ <motion.div
+ key="language-flyout-wrapper"
+ custom={stickPosition}
+ variants={reduceMotion ? { hidden: flyoutVariants.reducedHidden, shown: flyoutVariants.reducedShown, exit: flyoutVariants.reducedHidden } : flyoutVariants}
+ initial="hidden"
+ animate="shown"
+ exit="exit"
+ style={
+ isHorizontal
+ ? {
+ position: 'absolute',
+ top: isTop ? 222 : 'auto',
+ bottom: isTop ? 'auto' : 222,
+ left: dockLeft + flyoutLeft,
+ width: flyoutWidth,
+ pointerEvents: 'none',
+ zIndex: 9999,
+ originX,
+ originY,
+ willChange: 'transform, opacity',
+ backfaceVisibility: 'hidden',
+ }
+ : {
+ position: 'absolute',
+ top: panelTop,
+ height: panelH,
+ [isRight ? 'right' : 'left']: 'var(--panel-width)',
+ marginLeft: isRight ? 0 : 12,
+ marginRight: isRight ? 12 : 0,
+ width: 280,
+ display: 'flex',
+ alignItems: 'center',
+ pointerEvents: 'none',
+ zIndex: 5,
+ originX: isRight ? 1 : 0,
+ originY: 0.5,
+ willChange: 'transform, opacity',
+ backfaceVisibility: 'hidden',
+ }
+ }
+ >
+ <div
+ ref={flyoutRef}
+ className="preview-flyout language-flyout"
+ data-language-flyout="true"
+ style={{
+ width: '100%',
+ maxHeight: maxFlyoutHeight,
+ background: '#141414',
+ borderRadius: 18,
+ border: 'none',
+ outline: 'none',
+ overflow: 'hidden',
+ display: 'flex',
+ flexDirection: 'column',
+ boxShadow: 'none',
+ pointerEvents: 'auto',
+ position: 'relative',
+ padding: '12px 10px 10px 10px',
+ boxSizing: 'border-box'
+ }}
+ >
+ {/* Header */}
+ <div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between', padding: '0 4px 8px 4px', borderBottom: 'none' }}>
+ <div>
+ <div style={{ fontSize: 9.5, fontWeight: 700, letterSpacing: '0.08em', textTransform: 'uppercase', color: 'rgba(255, 255, 255, 0.42)', marginBottom: 2 }}>
+ LANGUAGE
+ </div>
+ <div style={{ fontSize: 13, fontWeight: 600, color: '#ffffff', letterSpacing: '-0.01em' }}>
+ {t('behaviour.languageTitle')}
+ </div>
+ </div>
+ <button
+ type="button"
+ className="icon-btn"
+ style={{
+ width: 24,
+ height: 24,
+ borderRadius: 6,
+ background: 'rgba(255,255,255,0.06)',
+ border: 'none',
+ color: 'rgba(255,255,255,0.7)',
+ cursor: 'pointer',
+ display: 'flex',
+ alignItems: 'center',
+ justifyContent: 'center',
+ flexShrink: 0,
+ transition: 'background 0.15s ease, color 0.15s ease'
+ }}
+ onClick={() => {
+ playButtonClickSound()
+ setLanguageFlyoutOpen(false)
+ }}
+ title={t('header.close')}
+ >
+ <CloseIcon width={11} height={11} />
+ </button>
+ </div>
+
+ {/* Clean Single-Column List (No Horizontal Scroll) */}
+ <div
+ ref={listRef}
+ style={{
+ display: 'flex',
+ flexDirection: 'column',
+ gap: 2,
+ overflowY: 'auto',
+ overflowX: 'hidden',
+ paddingTop: 6,
+ paddingRight: 2,
+ maxHeight: 190,
+ scrollbarWidth: 'none',
+ boxSizing: 'border-box'
+ }}
+ >
+ {languages.map((lang) => {
+ const active = lang.code === (language || 'system')
+ return (
+ <button
+ key={lang.code}
+ type="button"
+ data-active={active ? 'true' : 'false'}
+ onClick={() => {
+ playButtonClickSound()
+ patch({ language: lang.code })
+ setLanguageFlyoutOpen(false)
+ }}
+ style={{
+ width: '100%',
+ display: 'flex',
+ alignItems: 'center',
+ justifyContent: 'space-between',
+ padding: '7px 10px',
+ borderRadius: 8,
+ background: active ? 'rgba(255, 255, 255, 0.12)' : 'transparent',
+ border: active ? '1px solid rgba(255, 255, 255, 0.18)' : '1px solid transparent',
+ color: active ? '#ffffff' : 'rgba(255, 255, 255, 0.8)',
+ fontSize: 12,
+ fontWeight: active ? 600 : 400,
+ cursor: 'pointer',
+ textAlign: 'left',
+ transition: 'background 0.12s ease, border-color 0.12s ease',
+ flexShrink: 0,
+ boxSizing: 'border-box'
+ }}
+ >
+ <div style={{ display: 'flex', alignItems: 'center', gap: 6, minWidth: 0, overflow: 'hidden' }}>
+ <span style={{ fontWeight: active ? 600 : 500, color: active ? '#ffffff' : 'rgba(255, 255, 255, 0.9)', fontSize: 12, whiteSpace: 'nowrap' }}>
+ {lang.nativeName}
+ </span>
+ {lang.code !== 'system' && !lang.nativeName.includes('(') && lang.nativeName !== lang.name && (
+ <span style={{ fontSize: 10.5, color: 'rgba(255, 255, 255, 0.42)', fontWeight: 400, whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis' }}>
+ ({lang.name})
+ </span>
+ )}
+ </div>
+ {active && (
+ <span style={{ color: '#ffffff', fontSize: 12, fontWeight: 700, marginLeft: 6, flexShrink: 0 }}>
+ ✓
+ </span>
+ )}
+ </button>
+ )
+ })}
+ </div>
+ </div>
+ </motion.div>
+ )}
+ </AnimatePresence>,
+ document.body
+ )
+}
diff --git a/src/components/Panel.tsx b/src/components/Panel.tsx
index 94ce8f0..1d71b63 100644
--- a/src/components/Panel.tsx
+++ b/src/components/Panel.tsx
@@ -19,6 +19,7 @@ import { ToastStack } from './Toast'
import { ClearMenu } from './ClearMenu'
import { PreviewFlyout } from './PreviewFlyout'
import { IndicatorStyleFlyout } from './IndicatorStyleFlyout'
+import { LanguageFlyout } from './LanguageFlyout'
import { CopyIndicatorCurve } from './CopyIndicatorCurve'
import { useFilteredItems } from '../hooks/useFilteredItems'
@@ -304,7 +305,7 @@ export function Panel() {
}
const triggerWidthPx = Math.round(
- settings.hotZoneHeight >= 0.55 ? 460 : settings.hotZoneHeight >= 0.35 ? 320 : 220
+ settings.hotZoneHeight >= 0.55 ? 575 : settings.hotZoneHeight >= 0.35 ? 400 : 275
)
const halfTriggerW = triggerWidthPx / 2
let insetLeft = `calc(50% - ${halfTriggerW}px)`
@@ -582,6 +583,7 @@ export function Panel() {
</div>
<PreviewFlyout isRight={isRight} />
<IndicatorStyleFlyout isRight={isRight} />
+ <LanguageFlyout isRight={isRight} />
</motion.div>
</div>
)
diff --git a/src/components/PreviewFlyout.tsx b/src/components/PreviewFlyout.tsx
index cef6520..b3230da 100644
--- a/src/components/PreviewFlyout.tsx
+++ b/src/components/PreviewFlyout.tsx
@@ -312,11 +312,11 @@ export function PreviewFlyout({ isRight }: { isRight: boolean }) {
maxHeight: maxFlyoutHeight,
background: dragOver ? 'rgba(15, 30, 18, 0.95)' : '#141414',
borderRadius: 20,
- border: dragOver ? '2px dashed #4caf50' : '1px solid rgba(255, 255, 255, 0.08)',
+ border: dragOver ? '2px dashed #4caf50' : 'none',
overflow: 'hidden',
display: 'flex',
flexDirection: 'column',
- boxShadow: dragOver ? '0 0 35px rgba(76, 175, 80, 0.3)' : '0 20px 40px rgba(0,0,0,0.6), 0 0 0 1px rgba(0,0,0,0.5)',
+ boxShadow: dragOver ? '0 0 35px rgba(76, 175, 80, 0.3)' : 'none',
pointerEvents: 'auto',
transition: 'background 0.2s ease, border 0.2s ease, box-shadow 0.2s ease',
position: 'relative'
diff --git a/src/components/Settings.tsx b/src/components/Settings.tsx
index 8aa8432..8dd92eb 100644
--- a/src/components/Settings.tsx
+++ b/src/components/Settings.tsx
@@ -23,7 +23,7 @@ export function Settings({
inlineIndicatorStyle?: boolean
isHorizontal?: boolean
}) {
- const { t } = useTranslation()
+ const { t, language, languages } = useTranslation()
const settings = useStore((s) => s.settings)
const isHorizontal = propIsHorizontal ?? (settings.stickPosition === 'top' || settings.stickPosition === 'bottom')
@@ -39,10 +39,16 @@ export function Settings({
const currentVersion = useStore((s) => s.currentVersion)
const styleFlyoutOpen = useStore((s) => s.styleFlyoutOpen)
const setStyleFlyoutOpen = useStore((s) => s.setStyleFlyoutOpen)
+ const languageFlyoutOpen = useStore((s) => s.languageFlyoutOpen)
+ const setLanguageFlyoutOpen = useStore((s) => s.setLanguageFlyoutOpen)
const setSliderActive = useStore((s) => s.setSliderActive)
const edgeTransition = useStore((s) => s.edgeTransition)
const startEdgeTransition = useStore((s) => s.startEdgeTransition)
+ const getLangLabel = (l: { code: string; name: string; nativeName: string }) =>
+ l.code === 'system' || l.nativeName.includes('(') ? l.nativeName : `${l.nativeName} (${l.name})`
+ const selectedLang = languages.find((l) => l.code === (language || 'system')) || languages[0]
+
const lastTickVal = useRef<number>(settings.verticalOffset ?? 0.5)
const horizontalTab = useStore((s) => s.settingsTab)
const shelfTrackRef = useRef<HTMLDivElement>(null)
@@ -103,31 +109,21 @@ export function Settings({
patch({ verticalOffset: clamped })
}
- const lastHorizontalTickVal = useRef<number>(settings.horizontalOffset ?? 0.5)
-
- const handleHorizontalSliderInput = (rawVal: number) => {
- const clamped = Math.min(1.0, Math.max(0.0, rawVal))
- if (Math.abs(clamped - lastHorizontalTickVal.current) >= 0.05) {
- lastHorizontalTickVal.current = clamped
+ const handleThicknessInput = (rawVal: number) => {
+ const clamped = Math.min(7, Math.max(1, Math.round(rawVal)))
+ if (clamped !== (settings.hotZoneWidth ?? 3)) {
playDialTickSound()
+ useStore.setState((s) => ({
+ settings: { ...s.settings, hotZoneWidth: clamped }
+ }))
}
- useStore.setState((s) => ({
- settings: { ...s.settings, horizontalOffset: clamped }
- }))
- }
-
- const handleHorizontalSliderRelease = (rawVal: number) => {
- const snapped = Math.round(rawVal / 0.05) * 0.05
- const clamped = Math.min(1.0, Math.max(0.0, snapped))
- lastHorizontalTickVal.current = clamped
- playDialTickSound()
- patch({ horizontalOffset: clamped })
}
- const handleHorizontalPreset = (val: number) => {
+ const handleThicknessRelease = (rawVal: number) => {
+ const clamped = Math.min(7, Math.max(1, Math.round(rawVal)))
+ setSliderActive(false)
playDialTickSound()
- lastHorizontalTickVal.current = val
- patch({ horizontalOffset: val })
+ patch({ hotZoneWidth: clamped })
}
const [localInlineOpen, setLocalInlineOpen] = useState(false)
@@ -582,6 +578,9 @@ export function Settings({
if (styleFlyoutOpen) {
setStyleFlyoutOpen(false)
}
+ if (languageFlyoutOpen) {
+ setLanguageFlyoutOpen(false)
+ }
horizontalTabScrollPositions.current[horizontalTab] = e.currentTarget.scrollLeft
}
@@ -767,7 +766,35 @@ export function Settings({
<div className="setting-desc">Select application display language</div>
</div>
<div className="shelf-card-bottom">
- <LanguageDropdown compact />
+ <button
+ type="button"
+ className={`language-shelf-btn language-toggle-btn ${languageFlyoutOpen ? 'flyout-open' : ''}`}
+ onClick={(e) => {
+ playButtonClickSound()
+ const rect = e.currentTarget.getBoundingClientRect()
+ setLanguageFlyoutOpen(!languageFlyoutOpen, rect)
+ }}
+ >
+ <div style={{ display: 'flex', alignItems: 'center', gap: 7, minWidth: 0, overflow: 'hidden' }}>
+ <svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" style={{ opacity: 0.65, flexShrink: 0 }}>
+ <circle cx="12" cy="12" r="10"/>
+ <line x1="2" y1="12" x2="22" y2="12"/>
+ <path d="M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"/>
+ </svg>
+ <span style={{ fontWeight: 600, overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' }}>
+ {getLangLabel(selectedLang)}
+ </span>
+ </div>
+ <motion.span
+ animate={{ rotate: languageFlyoutOpen ? 180 : 0 }}
+ transition={{ duration: 0.2 }}
+ style={{ display: 'flex', alignItems: 'center', opacity: 0.65, flexShrink: 0, marginLeft: 6 }}
+ >
+ <svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.5" strokeLinecap="round" strokeLinejoin="round">
+ <path d="m6 9 6 6 6-6"/>
+ </svg>
+ </motion.span>
+ </button>
</div>
</div>
@@ -1139,15 +1166,15 @@ export function Settings({
key={d.id}
type="button"
className={`pill display-pill ${isActive ? 'active' : ''}`}
- style={{ width: '100%', justifyContent: 'space-between', padding: '6px 14px', fontSize: 11.5, height: 32 }}
+ style={{ width: '100%', justifyContent: 'space-between', padding: '6px 14px', fontSize: 11.5, height: 32, flexShrink: 0 }}
onClick={() => {
playButtonClickSound()
patch({ stickDisplayId: d.id })
useStore.getState().notifyPositionChanged()
}}
>
- <span className="pill-name" style={{ fontWeight: 600 }}>{displayName}</span>
- <span className="pill-res" style={{ opacity: 0.75, fontSize: 11 }}>{d.resolution}</span>
+ <span className="pill-name" style={{ fontWeight: 600, whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis', marginRight: 8 }}>{displayName}</span>
+ <span className="pill-res" style={{ opacity: 0.75, fontSize: 11, flexShrink: 0 }}>{d.resolution}</span>
</button>
)
})
@@ -1174,157 +1201,8 @@ export function Settings({
</div>
</div>
- {/* Card 4: Horizontal Alignment Slider */}
- <div className="settings-shelf-card position-slider-card position-col">
- <div className="shelf-card-top">
- <div className="setting-group-label">ALIGNMENT</div>
- <div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between' }}>
- <div>
- <div className="setting-title">{t('position.horizontalPositionTitle') || 'Horizontal Position'}</div>
- <div className="setting-desc">{t('position.horizontalPositionDesc') || 'Adjust horizontal alignment along screen edge'}</div>
- </div>
- <div className="setting-slider-val" style={{ flexShrink: 0, padding: '2px 8px', fontSize: 11, fontWeight: 600, borderRadius: 6 }}>
- {`${Math.round((settings.horizontalOffset ?? 0.5) * 100)}%`}
- </div>
- </div>
- </div>
- <div className="shelf-card-bottom">
- <div className="setting-slider-wrap" style={{ gap: 2, padding: '2px 0' }}>
- <input
- type="range"
- min="0"
- max="1"
- step="0.002"
- className="setting-range-input"
- value={settings.horizontalOffset ?? 0.5}
- style={{
- background: `linear-gradient(to right, #ffffff 0%, #ffffff ${(settings.horizontalOffset ?? 0.5) * 100}%, rgba(255, 255, 255, 0.12) ${(settings.horizontalOffset ?? 0.5) * 100}%, rgba(255, 255, 255, 0.12) 100%)`
- }}
- onPointerDown={() => {
- void window.edge.setInteractive(true)
- setSliderActive(true)
- }}
- onPointerUp={(e) => {
- setSliderActive(false)
- handleHorizontalSliderRelease(parseFloat((e.target as HTMLInputElement).value))
- }}
- onPointerCancel={(e) => {
- setSliderActive(false)
- handleHorizontalSliderRelease(parseFloat((e.target as HTMLInputElement).value))
- }}
- onLostPointerCapture={(e) => {
- setSliderActive(false)
- handleHorizontalSliderRelease(parseFloat((e.target as HTMLInputElement).value))
- }}
- onChange={(e) => {
- handleHorizontalSliderInput(parseFloat(e.target.value))
- }}
- />
-
- <div className="setting-slider-ticks">
- {Array.from({ length: 21 }, (_, i) => {
- const tickVal = i / 20
- const isMajor = i % 5 === 0
- const isActive = tickVal <= (settings.horizontalOffset ?? 0.5)
- return (
- <span
- key={i}
- className={`slider-tick${isMajor ? ' major' : ''}${isActive ? ' active' : ''}`}
- />
- )
- })}
- </div>
-
- <div className="setting-slider-labels" style={{ marginTop: 2 }}>
- {[
- { label: 'Left', val: 0 },
- { label: 'Center', val: 0.5 },
- { label: 'Right', val: 1.0 }
- ].map((pos) => {
- const active = Math.abs((settings.horizontalOffset ?? 0.5) - pos.val) < 0.04
- return (
- <button
- key={pos.val}
- type="button"
- className={`slider-label-btn${active ? ' active' : ''}`}
- style={{ fontSize: 10, padding: '2px 8px' }}
- onClick={() => {
- handleHorizontalPreset(pos.val)
- }}
- >
- {pos.label}
- </button>
- )
- })}
- </div>
- </div>
- </div>
- </div>
-
- {/* Card 5: Edge Trigger Position */}
- <div className="settings-shelf-card dimensions-card position-col">
- <div className="shelf-card-top">
- <div className="setting-group-label">TRIGGER ALIGNMENT</div>
- <div className="setting-title">{t('position.edgeTriggerPositionTitle')}</div>
- <div className="setting-desc">Align invisible trigger zone along the dock</div>
- </div>
- <div className="shelf-card-bottom">
- <div className="setting-pills" style={{ display: 'grid', gridTemplateColumns: 'repeat(3, 1fr)', gap: 5 }}>
- {[
- { label: t('position.left') || 'Left', val: 'top' as const },
- { label: t('position.center'), val: 'center' as const },
- { label: t('position.right') || 'Right', val: 'bottom' as const }
- ].map((opt) => (
- <button
- key={opt.val}
- type="button"
- className={`pill ${(settings.triggerAlignment || 'center') === opt.val ? 'active' : ''}`}
- style={{ height: 32, fontSize: 11.5, fontWeight: 500, padding: 0 }}
- onClick={() => {
- playButtonClickSound()
- patch({ triggerAlignment: opt.val })
- useStore.getState().notifyPositionChanged()
- }}
- >
- {opt.label}
- </button>
- ))}
- </div>
- </div>
- </div>
- {/* Card 6: Panel Height */}
- <div className="settings-shelf-card panel-height-card position-col">
- <div className="shelf-card-top">
- <div className="setting-group-label">PANEL PROPORTIONS</div>
- <div className="setting-title">{t('position.panelHeightTitle')}</div>
- <div className="setting-desc">Vertical height size of clipboard panel</div>
- </div>
- <div className="shelf-card-bottom">
- <div className="setting-pills" style={{ display: 'grid', gridTemplateColumns: 'repeat(3, 1fr)', gap: 5 }}>
- {[
- { label: t('appearance.small'), val: 0.5 },
- { label: t('position.medium'), val: 0.65 },
- { label: t('appearance.large'), val: 0.8 }
- ].map((opt) => (
- <button
- key={opt.val}
- type="button"
- className={`pill ${Math.abs((settings.panelHeight || 0.6) - opt.val) < 0.08 ? 'active' : ''}`}
- style={{ height: 32, fontSize: 11, fontWeight: 500, padding: 0 }}
- onClick={() => {
- playButtonClickSound()
- patch({ panelHeight: opt.val })
- }}
- >
- {opt.label}
- </button>
- ))}
- </div>
- </div>
- </div>
-
- {/* Card 7: Hover Area Size */}
+ {/* Card 5: Hover Area Size */}
<div className="settings-shelf-card trigger-bar-card position-col">
<div className="shelf-card-top">
<div className="setting-group-label">HOVER ZONE LENGTH</div>
@@ -1334,15 +1212,15 @@ export function Settings({
<div className="shelf-card-bottom">
<div className="setting-pills" style={{ display: 'grid', gridTemplateColumns: 'repeat(3, 1fr)', gap: 5, width: '100%' }}>
{[
- { label: `${t('appearance.small')} (220px)`, val: 0.25 },
- { label: `${t('position.medium')} (320px)`, val: 0.4 },
- { label: `${t('appearance.large')} (460px)`, val: 0.6 }
+ { label: t('appearance.small'), val: 0.25 },
+ { label: t('position.medium'), val: 0.4 },
+ { label: t('appearance.large'), val: 0.6 }
].map((opt) => (
<button
key={opt.val}
type="button"
className={`pill ${Math.abs(settings.hotZoneHeight - opt.val) < 0.08 ? 'active' : ''}`}
- style={{ height: 32, fontSize: 11, fontWeight: 500, padding: 0 }}
+ style={{ height: 32, fontSize: 11.5, fontWeight: 500, padding: 0 }}
onClick={() => {
playButtonClickSound()
patch({ hotZoneHeight: opt.val })
@@ -1355,7 +1233,7 @@ export function Settings({
</div>
</div>
- {/* Card 8: Edge Trigger Thickness */}
+ {/* Card 6: Edge Trigger Thickness */}
<div className="settings-shelf-card trigger-thickness-card position-col">
<div className="shelf-card-top">
<div className="setting-group-label">TRIGGER THICKNESS</div>
@@ -1381,14 +1259,24 @@ export function Settings({
style={{
width: '100%',
margin: '1px 0',
+ touchAction: 'none',
background: `linear-gradient(to right, #ffffff 0%, #ffffff ${(((settings.hotZoneWidth ?? 3) - 1) / 6) * 100}%, rgba(255, 255, 255, 0.12) ${(((settings.hotZoneWidth ?? 3) - 1) / 6) * 100}%, rgba(255, 255, 255, 0.12) 100%)`
}}
+ onPointerDown={() => {
+ void window.edge.setInteractive(true)
+ setSliderActive(true)
+ }}
+ onPointerUp={(e) => {
+ handleThicknessRelease(parseInt((e.target as HTMLInputElement).value, 10))
+ }}
+ onPointerCancel={(e) => {
+ handleThicknessRelease(parseInt((e.target as HTMLInputElement).value, 10))
+ }}
+ onLostPointerCapture={(e) => {
+ handleThicknessRelease(parseInt((e.target as HTMLInputElement).value, 10))
+ }}
onChange={(e) => {
- const val = parseInt(e.target.value, 10)
- if (val !== settings.hotZoneWidth) {
- playDialTickSound()
- patch({ hotZoneWidth: val })
- }
+ handleThicknessInput(parseInt(e.target.value, 10))
}}
/>
<div className="setting-slider-ticks">
@@ -1421,8 +1309,7 @@ export function Settings({
style={{ fontSize: 10, padding: '2px 8px' }}
onClick={() => {
if (currentPx !== preset.val) {
- playDialTickSound()
- patch({ hotZoneWidth: preset.val })
+ handleThicknessRelease(preset.val)
}
}}
>
@@ -2145,17 +2032,24 @@ export function Settings({
className="setting-range-input"
value={currentPx}
style={{
+ touchAction: 'none',
background: `linear-gradient(to right, #ffffff 0%, #ffffff ${pct}%, rgba(255, 255, 255, 0.12) ${pct}%, rgba(255, 255, 255, 0.12) 100%)`
}}
onPointerDown={() => {
void window.edge.setInteractive(true)
+ setSliderActive(true)
+ }}
+ onPointerUp={(e) => {
+ handleThicknessRelease(parseInt((e.target as HTMLInputElement).value, 10))
+ }}
+ onPointerCancel={(e) => {
+ handleThicknessRelease(parseInt((e.target as HTMLInputElement).value, 10))
+ }}
+ onLostPointerCapture={(e) => {
+ handleThicknessRelease(parseInt((e.target as HTMLInputElement).value, 10))
}}
onChange={(e) => {
- const val = parseInt(e.target.value, 10)
- if (val !== settings.hotZoneWidth) {
- playDialTickSound()
- patch({ hotZoneWidth: val })
- }
+ handleThicknessInput(parseInt(e.target.value, 10))
}}
/>
)
@@ -2191,8 +2085,7 @@ export function Settings({
className={`slider-label-btn${active ? ' active' : ''}`}
onClick={() => {
if (currentPx !== preset.val) {
- playDialTickSound()
- patch({ hotZoneWidth: preset.val })
+ handleThicknessRelease(preset.val)
}
}}
>
@@ -2572,7 +2465,6 @@ function LanguageDropdown({ direction = 'down', compact = false }: { direction?:
const [isOpen, setIsOpen] = useState(false)
const dropdownRef = useRef<HTMLDivElement | null>(null)
const listRef = useRef<HTMLDivElement | null>(null)
- const lastScrollTick = useRef<number>(0)
const getLangLabel = (l: { code: string; name: string; nativeName: string }) =>
l.code === 'system' || l.nativeName.includes('(') ? l.nativeName : `${l.nativeName} (${l.name})`
@@ -2651,20 +2543,13 @@ function LanguageDropdown({ direction = 'down', compact = false }: { direction?:
animate={{ opacity: 1, y: 0, scale: 1 }}
exit={{ opacity: 0, y: direction === 'up' ? -6 : 6, scale: 0.98 }}
transition={{ duration: 0.15, ease: 'easeOut' }}
- onScroll={(e) => {
- const tick = Math.floor(e.currentTarget.scrollTop / 28)
- if (tick !== lastScrollTick.current) {
- lastScrollTick.current = tick
- playDialTickSound()
- }
- }}
style={{
position: 'absolute',
top: direction === 'up' ? 'auto' : 'calc(100% + 6px)',
- bottom: direction === 'up' ? 'calc(100% + 6px)' : 'auto',
+ bottom: direction === 'up' ? 'calc(100% + 5px)' : 'auto',
left: 0,
right: 0,
- maxHeight: direction === 'up' ? 140 : 180,
+ maxHeight: direction === 'up' ? (compact ? 88 : 140) : 180,
overflowY: 'auto',
background: '#121214',
border: '1px solid rgba(255, 255, 255, 0.14)',
@@ -2692,11 +2577,11 @@ function LanguageDropdown({ direction = 'down', compact = false }: { direction?:
display: 'flex',
alignItems: 'center',
justifyContent: 'space-between',
- padding: '7px 10px',
+ padding: compact ? '5px 8px' : '7px 10px',
borderRadius: 7,
background: active ? 'rgba(255, 255, 255, 0.12)' : 'transparent',
color: active ? '#ffffff' : 'rgba(255, 255, 255, 0.8)',
- fontSize: 12,
+ fontSize: compact ? 11.5 : 12,
fontWeight: active ? 600 : 400,
border: 'none',
cursor: 'pointer',
@@ -2705,7 +2590,6 @@ function LanguageDropdown({ direction = 'down', compact = false }: { direction?:
}}
onMouseEnter={(e) => {
if (!active) e.currentTarget.style.background = 'rgba(255, 255, 255, 0.07)'
- playDialTickSound()
}}
onMouseLeave={(e) => {
if (!active) e.currentTarget.style.background = 'transparent'
diff --git a/src/hooks/useEdgeHover.ts b/src/hooks/useEdgeHover.ts
index 4aeed5d..a43ee11 100644
--- a/src/hooks/useEdgeHover.ts
+++ b/src/hooks/useEdgeHover.ts
@@ -79,10 +79,10 @@ export function getHorizontalDockMetrics(
const hOffset = Math.min(1, Math.max(0, horizontalOffset))
const dockX = minX + Math.round(Math.max(0, maxX - minX) * hOffset)
const dockCenterX = dockX + dockWidth / 2
- // Trigger bar length scales with hotZoneHeight:
- // Small (0.25) => 220px, Medium (0.40) => 320px, Large (0.60) => 460px
+ // Trigger bar length scales with hotZoneHeight (+25% increase):
+ // Small (0.25) => 275px, Medium (0.40) => 400px, Large (0.60) => 575px
const triggerWidth = Math.round(
- hotZoneHeight >= 0.55 ? 460 : hotZoneHeight >= 0.35 ? 320 : 220
+ hotZoneHeight >= 0.55 ? 575 : hotZoneHeight >= 0.35 ? 400 : 275
)
let triggerLeft = dockCenterX - triggerWidth / 2
let triggerRight = dockCenterX + triggerWidth / 2
@@ -215,6 +215,7 @@ export function useEdgeHover(): void {
const closePanelNow = () => {
const s = useStore.getState()
if (s.styleFlyoutOpen) s.setStyleFlyoutOpen(false)
+ if (s.languageFlyoutOpen) s.setLanguageFlyoutOpen(false)
s.setOpen(false)
if (interactiveTimer !== undefined) window.clearTimeout(interactiveTimer)
interactiveTimer = window.setTimeout(() => {
@@ -229,11 +230,12 @@ export function useEdgeHover(): void {
if (state.sliderActive || state.edgeTransition?.active) return
if (state.dragActive && !state.internalDragReq) return
- // If the indicator style flyout is open, let it play its exit spring first.
+ // If any flyout is open, let it play its exit spring first.
// The Electron window resize (inside setOpen) would cut the flyout animation
// in half if we close both simultaneously — so we sequence it properly.
- if (state.styleFlyoutOpen) {
- state.setStyleFlyoutOpen(false)
+ if (state.styleFlyoutOpen || state.languageFlyoutOpen) {
+ if (state.styleFlyoutOpen) state.setStyleFlyoutOpen(false)
+ if (state.languageFlyoutOpen) state.setLanguageFlyoutOpen(false)
if (graceTimer !== undefined) window.clearTimeout(graceTimer)
graceTimer = window.setTimeout(() => {
graceTimer = undefined
@@ -333,7 +335,7 @@ export function useEdgeHover(): void {
const { x, y } = lastClient.current
if (x < -BUFFER_PX || y < 0) return true // unknown — be conservative, don't close
const s = state.settings
- const hasFlyout = !!(state.previewItemId || state.styleFlyoutOpen)
+ const hasFlyout = !!(state.previewItemId || state.styleFlyoutOpen || state.languageFlyoutOpen)
const currentPanelWide = hasFlyout ? PREVIEW_WIDE : PANEL_WIDE
if (s.stickPosition === 'top') {
@@ -431,7 +433,7 @@ export function useEdgeHover(): void {
const state = useStore.getState()
const { stickPosition, displayWidth, displayHeight } = data
const { top, bottom, midY, panelHalfH } = zone.current
- const hasFlyout = !!(state.previewItemId || state.styleFlyoutOpen)
+ const hasFlyout = !!(state.previewItemId || state.styleFlyoutOpen || state.languageFlyoutOpen)
const currentKeepOpenPx = hasFlyout ? PREVIEW_WIDE - 15 : KEEP_OPEN_PX
const currentStartClosePx = hasFlyout ? PREVIEW_WIDE + 20 : START_CLOSE_PX
diff --git a/src/store/appStore.ts b/src/store/appStore.ts
index e894aea..8cae352 100644
--- a/src/store/appStore.ts
+++ b/src/store/appStore.ts
@@ -123,6 +123,9 @@ interface AppState {
styleFlyoutOpen: boolean
styleFlyoutAnchorRect: { x?: number; y?: number; width?: number; height?: number } | null
setStyleFlyoutOpen: (open: boolean, rect?: { x?: number; y?: number; width?: number; height?: number } | null) => void
+ languageFlyoutOpen: boolean
+ languageFlyoutAnchorRect: { x?: number; y?: number; width?: number; height?: number } | null
+ setLanguageFlyoutOpen: (open: boolean, rect?: { x?: number; y?: number; width?: number; height?: number } | null) => void
previewFlyoutRect: { top: number; bottom: number; left?: number; right?: number } | null
setPreviewFlyoutRect: (rect: { top: number; bottom: number; left?: number; right?: number } | null) => void
isInternalCopying: boolean
@@ -180,6 +183,8 @@ export const useStore = create<AppState>((set, get) => ({
previewFlyoutRect: null,
styleFlyoutOpen: false,
styleFlyoutAnchorRect: null,
+ languageFlyoutOpen: false,
+ languageFlyoutAnchorRect: null,
expandedStackId: null
})
edge.setPreviewMode(false)
@@ -212,6 +217,9 @@ export const useStore = create<AppState>((set, get) => ({
styleFlyoutAnchorRect: null,
setStyleFlyoutOpen: (open, rect) => {
const isHorizontal = get().settings.stickPosition === 'top' || get().settings.stickPosition === 'bottom'
+ if (open && get().languageFlyoutOpen) {
+ set({ languageFlyoutOpen: false, languageFlyoutAnchorRect: null })
+ }
set({
styleFlyoutOpen: open,
styleFlyoutAnchorRect: open && rect ? rect : null,
@@ -229,6 +237,22 @@ export const useStore = create<AppState>((set, get) => ({
// AnimatePresence.onExitComplete callback is the one that calls setPreviewMode(false)
// after the exit animation has fully settled.
},
+ languageFlyoutOpen: false,
+ languageFlyoutAnchorRect: null,
+ setLanguageFlyoutOpen: (open, rect) => {
+ const isHorizontal = get().settings.stickPosition === 'top' || get().settings.stickPosition === 'bottom'
+ if (open && get().styleFlyoutOpen) {
+ set({ styleFlyoutOpen: false, styleFlyoutAnchorRect: null })
+ }
+ set({
+ languageFlyoutOpen: open,
+ languageFlyoutAnchorRect: open && rect ? rect : null,
+ ...(open ? {} : { previewFlyoutRect: null })
+ })
+ if (open && !isHorizontal) {
+ edge.setPreviewMode(true)
+ }
+ },
isInternalCopying: false,
copyFlareActive: false,
flareKey: 0,
@@ -373,6 +397,8 @@ export const useStore = create<AppState>((set, get) => ({
previewFlyoutRect: null,
styleFlyoutOpen: false,
styleFlyoutAnchorRect: null,
+ languageFlyoutOpen: false,
+ languageFlyoutAnchorRect: null,
expandedStackId: null,
emojiOpen: settingsOpen ? false : get().emojiOpen
})
diff --git a/src/styles/item.css b/src/styles/item.css
index 1dd3be5..8735d8c 100644
--- a/src/styles/item.css
+++ b/src/styles/item.css
@@ -272,7 +272,7 @@
border: none;
box-shadow: none;
transform-origin: center center;
- filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.45));
+ filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.35));
}
.kind-badge {
@@ -380,18 +380,39 @@
}
/* Image thumbnails */
+.item:has(.thumb-wrap) .item-content {
+ overflow: visible;
+ padding: 10px 12px 4px 12px;
+}
+
.thumb {
- width: 100%;
+ width: auto;
+ max-width: 100%;
+ height: auto;
max-height: 180px;
object-fit: contain;
- border-radius: 12px;
- background: rgba(0, 0, 0, 0.4);
+ border-radius: 10px;
+ border: none;
+ box-shadow: none;
+ background: transparent;
pointer-events: none;
+ transition: transform 0.16s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.16s ease;
}
+
.thumb-wrap {
position: relative;
- border-radius: 12px;
- overflow: hidden;
+ border-radius: 10px;
+ overflow: visible;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ padding: 2px;
+}
+
+.item:hover .thumb,
+.item-main:hover .thumb {
+ transform: scale(1.01);
+ box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
}
/* Floating Actions Pill */
@@ -627,17 +648,18 @@
align-items: center;
gap: 10px;
padding: 8px 10px;
- background: #141414;
- border: none;
- border-radius: 14px;
+ background: rgba(255, 255, 255, 0.04);
+ border: 1px solid rgba(255, 255, 255, 0.06);
+ border-radius: 12px;
cursor: grab;
width: 100%;
- transition: background 0.2s cubic-bezier(0.16, 1, 0.3, 1);
+ transition: background 0.18s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.18s cubic-bezier(0.16, 1, 0.3, 1);
overflow: hidden;
}
.fluid-card-row:hover {
- background: #1c1c1c;
+ background: rgba(255, 255, 255, 0.075);
+ border-color: rgba(255, 255, 255, 0.14);
}
.fluid-card-row::before {
@@ -647,25 +669,19 @@
border-radius: inherit;
pointer-events: none;
z-index: 2;
+ opacity: 0.5;
transition: opacity 0.14s ease;
background:
radial-gradient(
ellipse 70% 1px at 50% 0%,
- rgba(255, 255, 255, 0.22) 0%,
- rgba(255, 255, 255, 0.08) 45%,
+ rgba(255, 255, 255, 0.2) 0%,
+ rgba(255, 255, 255, 0.04) 45%,
transparent 80%
- ) top / 100% 1px no-repeat,
- linear-gradient(
- 90deg,
- transparent 0%,
- rgba(255, 255, 255, 0.035) 20%,
- rgba(255, 255, 255, 0.035) 80%,
- transparent 100%
- ) bottom / 100% 1px no-repeat;
+ ) top / 100% 1px no-repeat;
}
.fluid-card-row:hover::before {
- opacity: 1.2;
+ opacity: 1;
}
.fluid-card-row:active {
@@ -680,14 +696,16 @@
align-items: center;
justify-content: center;
background: transparent;
- filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35));
+ filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.25));
}
.fluid-row-img {
width: 44px;
height: 44px;
object-fit: cover;
- border-radius: 6px;
+ border-radius: 8px;
+ border: 1px solid rgba(255, 255, 255, 0.08);
+ box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}
.fluid-row-content {
@@ -726,11 +744,13 @@
gap: 4px;
opacity: 0;
pointer-events: none;
- background: #141414;
+ background: rgba(20, 20, 24, 0.95);
+ backdrop-filter: blur(16px);
+ -webkit-backdrop-filter: blur(16px);
padding: 3px 4px;
border-radius: 8px;
- border: none;
- box-shadow: 0 4px 14px rgba(0, 0, 0, 0.75);
+ border: 1px solid rgba(255, 255, 255, 0.12);
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
transition: opacity 0.15s ease, transform 0.15s ease;
z-index: 5;
}
@@ -770,14 +790,23 @@
white-space: nowrap;
}
-/* Single (non-image) file tile: big hero icon on top, name + details on the bottom */
+/* Single (non-image) file tile: hero icon on top, name on the bottom */
+.item:has(.single-file-preview) .item-content {
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ align-items: center;
+ padding: 10px 16px 4px 16px;
+}
+
.single-file-preview {
display: flex;
flex-direction: column;
align-items: center;
- gap: 10px;
+ justify-content: center;
+ gap: 8px;
width: 100%;
- padding: 6px 0 2px;
+ padding: 2px 0 2px;
}
.single-file-hero {
@@ -785,15 +814,24 @@
align-items: center;
justify-content: center;
width: 100%;
- padding: 4px 0;
+ padding: 0;
background: transparent;
border: none;
box-shadow: none;
transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
-.item-main:hover .single-file-hero {
- transform: translateY(-2px) scale(1.02);
+.single-file-hero svg {
+ width: 96px;
+ height: 96px;
+ display: block;
+ filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.28));
+ transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), filter 0.2s ease;
+}
+
+.item-main:hover .single-file-hero svg {
+ transform: translateY(-2px) scale(1.03);
+ filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.38));
}
.single-file-meta {
@@ -801,8 +839,9 @@
min-width: 0;
display: flex;
flex-direction: column;
- gap: 2px;
- padding: 0 2px;
+ align-items: center;
+ gap: 0;
+ padding: 0 4px;
}
.single-file-name {
@@ -810,13 +849,11 @@
font-weight: 500;
color: var(--text-primary, #ffffff);
line-height: 1.35;
-}
-
-.single-file-sub {
- font-size: calc(11px * var(--font-scale, 1));
- color: rgba(255, 255, 255, 0.45);
- font-family: var(--font-mono);
- text-transform: lowercase;
+ text-align: center;
+ width: 100%;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ word-break: break-all;
}
.bundle-more-label {
@@ -845,19 +882,20 @@
display: flex;
align-items: center;
justify-content: center;
- width: 32px;
- height: 32px;
+ width: 30px;
+ height: 30px;
margin-right: auto;
border-radius: 999px;
color: rgba(255, 255, 255, 0.75);
- background: #141414;
- border: none;
+ background: rgba(255, 255, 255, 0.06);
+ border: 1px solid rgba(255, 255, 255, 0.06);
cursor: pointer;
flex-shrink: 0;
- transition: background 0.15s ease, color 0.15s ease;
+ transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.bundle-collapse-hit:hover {
- background: #1c1c1c;
+ background: rgba(255, 255, 255, 0.12);
+ border-color: rgba(255, 255, 255, 0.14);
color: #fff;
}
@@ -868,11 +906,11 @@
.actions-pill {
display: flex;
gap: 4px;
- padding: 4px;
- background: #141414;
- border: none;
+ padding: 3px 4px;
+ background: rgba(255, 255, 255, 0.06);
+ border: 1px solid rgba(255, 255, 255, 0.06);
border-radius: 999px;
- box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
+ box-shadow: none;
}
/* Interactive Onboarding Tutorial Banner styling */
@@ -1093,9 +1131,18 @@
font-size: calc(10.5px * var(--font-scale, 1));
}
+.list.horizontal .item:has(.single-file-preview) .item-content {
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ align-items: center;
+ padding: 6px 12px 2px 12px;
+}
+
.list.horizontal .single-file-preview {
- gap: 6px;
- padding: 2px 0 0;
+ gap: 4px;
+ padding: 0;
+ width: 100%;
}
.list.horizontal .single-file-hero {
@@ -1103,17 +1150,19 @@
}
.list.horizontal .single-file-hero svg {
- width: 44px;
- height: 44px;
+ width: 54px;
+ height: 54px;
+ filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.24));
}
.list.horizontal .single-file-name {
- font-size: calc(12px * var(--font-scale, 1));
+ font-size: calc(11.5px * var(--font-scale, 1));
line-height: 1.35;
-}
-
-.list.horizontal .single-file-sub {
- font-size: calc(10px * var(--font-scale, 1));
+ text-align: center;
+ width: 100%;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ word-break: break-all;
}
.list.horizontal .bundle-stack-large {
@@ -1133,19 +1182,21 @@
flex-direction: column;
justify-content: center;
align-items: center;
- padding: 6px 12px 4px 12px;
+ padding: 8px 12px 4px 12px;
+ overflow: visible;
}
.list.horizontal .thumb-wrap {
width: 100%;
height: auto;
- max-height: 106px;
+ max-height: 100px;
display: flex;
align-items: center;
justify-content: center;
background: transparent;
- border-radius: 10px;
- overflow: hidden;
+ border-radius: 8px;
+ overflow: visible;
+ padding: 2px;
}
.list.horizontal .thumb {
@@ -1155,13 +1206,15 @@
max-height: 100px;
object-fit: contain;
border-radius: 8px;
- box-shadow: 0 4px 18px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.09);
+ border: none;
+ box-shadow: none;
+ background: transparent;
transition: transform 0.16s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.16s ease;
}
.list.horizontal .item:hover .thumb {
- transform: scale(1.02);
- box-shadow: 0 6px 24px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.16);
+ transform: scale(1.015);
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}
.list.horizontal .item-content:has(.preview.single) .thumb {
@@ -1220,18 +1273,19 @@
height: 26px;
border-radius: 999px;
color: rgba(255, 255, 255, 0.75);
- background: #141414;
- border: none;
+ background: rgba(255, 255, 255, 0.06);
+ border: 1px solid rgba(255, 255, 255, 0.06);
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
flex-shrink: 0;
- transition: background 0.15s ease, color 0.15s ease;
+ transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.horizontal-bundle-header .bundle-collapse-hit:hover {
- background: #1c1c1c;
+ background: rgba(255, 255, 255, 0.12);
+ border-color: rgba(255, 255, 255, 0.14);
color: #fff;
}
@@ -1240,9 +1294,10 @@
align-items: center;
gap: 4px;
padding: 2px 6px;
- background: #141414;
+ background: rgba(255, 255, 255, 0.06);
+ border: 1px solid rgba(255, 255, 255, 0.06);
border-radius: 999px;
- box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
+ box-shadow: none;
flex-shrink: 0;
}
@@ -1277,8 +1332,8 @@
gap: 8px;
overflow-x: auto;
overflow-y: hidden;
- height: 94px;
- padding: 2px 2px 3px 2px;
+ height: 96px;
+ padding: 3px 4px 5px 4px;
scroll-behavior: smooth;
}
@@ -1300,22 +1355,25 @@
.horizontal-subitem-tile {
flex-shrink: 0;
width: 104px;
- height: 89px;
- background: #141414;
+ height: 88px;
+ background: rgba(255, 255, 255, 0.04);
border-radius: 12px;
- border: none;
+ border: 1px solid rgba(255, 255, 255, 0.07);
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-between;
- padding: 4px 6px 5px 6px;
+ padding: 5px 6px 5px 6px;
overflow: hidden;
cursor: grab;
position: relative;
- transition: all 0.16s cubic-bezier(0.16, 1, 0.3, 1);
+ transition: background 0.16s cubic-bezier(0.16, 1, 0.3, 1),
+ border-color 0.16s cubic-bezier(0.16, 1, 0.3, 1),
+ transform 0.16s cubic-bezier(0.16, 1, 0.3, 1),
+ box-shadow 0.16s cubic-bezier(0.16, 1, 0.3, 1);
}
-/* Edge-Drop signature 1px specular top highlight reflection */
+/* Edge-Drop signature specular top highlight reflection */
.horizontal-subitem-tile::before {
content: '';
position: absolute;
@@ -1323,22 +1381,24 @@
border-radius: inherit;
pointer-events: none;
z-index: 2;
+ opacity: 0.5;
transition: opacity 0.14s ease;
background: radial-gradient(
ellipse 70% 1px at 50% 0%,
- rgba(255, 255, 255, 0.24) 0%,
- rgba(255, 255, 255, 0.06) 45%,
+ rgba(255, 255, 255, 0.2) 0%,
+ rgba(255, 255, 255, 0.04) 50%,
transparent 80%
) top / 100% 1px no-repeat;
}
.horizontal-subitem-tile:hover {
- background: #1c1c1c;
- transform: translateY(-2px);
- box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6);
+ background: rgba(255, 255, 255, 0.08);
+ border-color: rgba(255, 255, 255, 0.16);
+ transform: translateY(-1px);
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}
.horizontal-subitem-tile:hover::before {
- opacity: 1.3;
+ opacity: 1;
}
.horizontal-subitem-tile:active {
cursor: grabbing;
@@ -1353,12 +1413,12 @@
align-items: center;
gap: 2px;
padding: 2px 4px;
- background: rgba(18, 18, 22, 0.92);
- backdrop-filter: blur(12px);
- -webkit-backdrop-filter: blur(12px);
- border: 1px solid rgba(255, 255, 255, 0.12);
+ background: rgba(20, 20, 24, 0.95);
+ backdrop-filter: blur(16px);
+ -webkit-backdrop-filter: blur(16px);
+ border: 1px solid rgba(255, 255, 255, 0.14);
border-radius: 999px;
- box-shadow: 0 4px 14px rgba(0, 0, 0, 0.75);
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
opacity: 0;
pointer-events: none;
transform: scale(0.9) translateY(-1px);
@@ -1374,22 +1434,22 @@
}
.horizontal-subitem-actions .act {
- width: 20px;
- height: 20px;
+ width: 18px;
+ height: 18px;
display: flex;
align-items: center;
justify-content: center;
background: transparent;
border: none;
border-radius: 4px;
- color: rgba(255, 255, 255, 0.82);
+ color: rgba(255, 255, 255, 0.85);
cursor: pointer;
transition: all 0.12s ease;
padding: 0;
}
.horizontal-subitem-actions .act:hover {
- background: rgba(255, 255, 255, 0.16);
+ background: rgba(255, 255, 255, 0.18);
color: #ffffff;
}
@@ -1404,20 +1464,21 @@
}
.horizontal-subitem-img {
- width: 40px;
- height: 40px;
+ width: 42px;
+ height: 42px;
object-fit: cover;
border-radius: 8px;
+ border: 1px solid rgba(255, 255, 255, 0.08);
display: block;
user-select: none;
pointer-events: none;
- box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
+ box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}
.horizontal-subitem-icon-wrap svg {
width: 36px;
height: 36px;
- filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35));
+ filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.25));
}
.horizontal-subitem-meta {
diff --git a/src/styles/panel.css b/src/styles/panel.css
index 6999be0..c819d8a 100644
--- a/src/styles/panel.css
+++ b/src/styles/panel.css
@@ -296,9 +296,120 @@
align-items: stretch;
gap: 10px;
margin: 0;
+ height: 100%;
+}
+
+.list.horizontal .pinned-header-interactive {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: space-between;
+ width: 44px;
+ min-width: 44px;
+ max-width: 44px;
+ height: 146px;
+ margin: 0;
+ padding: 10px 4px;
+ background: rgba(255, 255, 255, 0.04);
+ border: 1px solid rgba(255, 255, 255, 0.08);
+ border-radius: var(--radius-card);
+ cursor: pointer;
+ user-select: none;
+ flex-shrink: 0;
+ box-sizing: border-box;
+ transition: background 0.16s cubic-bezier(0.16, 1, 0.3, 1),
+ border-color 0.16s ease,
+ transform 0.16s cubic-bezier(0.16, 1, 0.3, 1),
+ box-shadow 0.16s ease;
+ position: relative;
+}
+
+.list.horizontal .pinned-header-interactive:hover {
+ background: rgba(255, 255, 255, 0.08);
+ border-color: rgba(255, 255, 255, 0.18);
+ transform: translateY(-1px);
+ box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
+}
+
+.list.horizontal .pinned-header-interactive:active {
+ transform: scale(0.97);
+}
+
+.list.horizontal .pinned-header-interactive .pinned-header-left {
+ flex-direction: column;
+ align-items: center;
+ gap: 6px;
+ margin-top: 2px;
}
-.list.horizontal .section-label {
- display: none;
+
+.list.horizontal .pinned-header-interactive .pinned-header-left span:not(.pinned-count-badge) {
+ writing-mode: vertical-rl;
+ transform: rotate(180deg);
+ font-size: calc(9.5px * var(--font-scale, 1));
+ font-weight: 700;
+ letter-spacing: 0.14em;
+ color: rgba(255, 255, 255, 0.75);
+ margin: 2px 0;
+}
+
+.list.horizontal .pinned-header-interactive .pinned-count-badge {
+ background: rgba(255, 255, 255, 0.12);
+ color: #ffffff;
+ font-size: 9.5px;
+ font-weight: 700;
+ padding: 1px 5px;
+ border-radius: 999px;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+}
+
+.list.horizontal .pinned-header-interactive .pinned-header-right {
+ margin-bottom: 2px;
+}
+
+.list.horizontal .pinned-header-interactive .bundle-collapse-btn {
+ width: 22px;
+ height: 22px;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ background: rgba(255, 255, 255, 0.06);
+ border: 1px solid rgba(255, 255, 255, 0.08);
+ border-radius: 999px;
+ color: rgba(255, 255, 255, 0.85);
+}
+
+.list.horizontal .pinned-header-interactive:hover .bundle-collapse-btn {
+ background: rgba(255, 255, 255, 0.15);
+ color: #ffffff;
+}
+
+.list.horizontal .recent-section .section-label.recent-header {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ width: 24px;
+ min-width: 24px;
+ height: 146px;
+ margin: 0 2px 0 0;
+ padding: 0;
+ background: transparent;
+ border-left: 1px solid rgba(255, 255, 255, 0.08);
+ box-sizing: border-box;
+ flex-shrink: 0;
+ user-select: none;
+}
+
+.list.horizontal .recent-section .recent-label-text {
+ writing-mode: vertical-rl;
+ transform: rotate(180deg);
+ font-size: calc(9.5px * var(--font-scale, 1));
+ font-weight: 600;
+ letter-spacing: 0.14em;
+ text-transform: uppercase;
+ color: rgba(255, 255, 255, 0.35);
}
.section-label {
diff --git a/src/styles/settings.css b/src/styles/settings.css
index eb8559c..21fbb59 100644
--- a/src/styles/settings.css
+++ b/src/styles/settings.css
@@ -1627,7 +1627,41 @@
/* Specific Card Widths tailored dynamically to content */
.settings-shelf-card.shortcuts-card {
- width: 240px;
+ width: 250px;
+}
+
+/* Language Shelf Select Button */
+.language-shelf-btn {
+ width: 100%;
+ height: 32px;
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ justify-content: space-between;
+ background: rgba(255, 255, 255, 0.05);
+ border: 1px solid rgba(255, 255, 255, 0.10);
+ border-radius: 10px;
+ padding: 0 12px;
+ color: #ffffff;
+ font-size: 11.5px;
+ font-weight: 500;
+ cursor: pointer;
+ transition: all 0.15s ease;
+ box-sizing: border-box;
+ outline: none;
+}
+
+.language-shelf-btn:hover {
+ background: rgba(255, 255, 255, 0.09);
+ border-color: rgba(255, 255, 255, 0.18);
+ color: #ffffff;
+}
+
+.language-shelf-btn.flyout-open {
+ background: rgba(255, 255, 255, 0.10);
+ border-color: rgba(255, 255, 255, 0.28);
+ color: #ffffff;
+ box-shadow: 0 0 12px rgba(255, 255, 255, 0.06);
}
.settings-shelf-card.hotkey-card {
@@ -1682,6 +1716,27 @@
width: 280px;
}
+.settings-shelf-card.display-card .shelf-card-bottom {
+ max-height: 74px;
+ overflow-y: auto;
+ overflow-x: hidden;
+ padding-right: 2px;
+ gap: 5px;
+}
+
+.settings-shelf-card.display-card .shelf-card-bottom::-webkit-scrollbar {
+ width: 3px;
+}
+
+.settings-shelf-card.display-card .shelf-card-bottom::-webkit-scrollbar-track {
+ background: transparent;
+}
+
+.settings-shelf-card.display-card .shelf-card-bottom::-webkit-scrollbar-thumb {
+ background: rgba(255, 255, 255, 0.2);
+ border-radius: 999px;
+}
+
.settings-shelf-card.beacon-card {
width: 240px;
}
diff --git a/tests/horizontalSettings.test.ts b/tests/horizontalSettings.test.ts
index 98125d9..4812b11 100644
--- a/tests/horizontalSettings.test.ts
+++ b/tests/horizontalSettings.test.ts
@@ -63,7 +63,7 @@ describe('Horizontal Card Shelf Settings Layout', () => {
expect(src).toContain('settings.hotZoneHeight')
expect(src).toContain('settings.hotZoneWidth')
const panelSrc = read('src/components/Panel.tsx')
- expect(panelSrc).toContain('settings.hotZoneHeight >= 0.55 ? 460 : settings.hotZoneHeight >= 0.35 ? 320 : 220')
+ expect(panelSrc).toContain('settings.hotZoneHeight >= 0.55 ? 575 : settings.hotZoneHeight >= 0.35 ? 400 : 275')
})
it('Appearance card triggers popup indicator style selector matching left/right alignment', () => {
@@ -116,16 +116,16 @@ describe('Horizontal Card Shelf Settings Layout', () => {
expect(css).toContain('.shelf-quit-btn')
})
- it('getHorizontalDockMetrics scales trigger bar length based on hotZoneHeight', async () => {
+ it('getHorizontalDockMetrics scales trigger bar length based on hotZoneHeight (+25% increase)', async () => {
const { getHorizontalDockMetrics } = await import('../src/hooks/useEdgeHover')
const small = getHorizontalDockMetrics(1920, 0.5, 0.25)
- expect(small.triggerWidth).toBe(220)
+ expect(small.triggerWidth).toBe(275)
const medium = getHorizontalDockMetrics(1920, 0.5, 0.4)
- expect(medium.triggerWidth).toBe(320)
+ expect(medium.triggerWidth).toBe(400)
const large = getHorizontalDockMetrics(1920, 0.5, 0.6)
- expect(large.triggerWidth).toBe(460)
+ expect(large.triggerWidth).toBe(575)
})
it('getHorizontalDockMetrics accurately positions triggerLeft and triggerRight based on triggerAlignment', async () => {
@@ -166,20 +166,19 @@ describe('Horizontal Card Shelf Settings Layout', () => {
expect(panelSrc).toContain("insetRight = '0px'")
})
- it('Horizontal shelf includes position offset slider, trigger alignment, panel height, and auto-updates', () => {
+ it('Horizontal shelf includes trigger thickness and auto-updates, without panel height, horizontal position, or edge trigger position', () => {
const src = read('src/components/Settings.tsx')
// Find the isHorizontal branch
const horizontalBlock = src.slice(src.indexOf('if (isHorizontal) {'), src.indexOf('const maxTabLen ='))
- // Should contain horizontal position offset slider and presets
- expect(horizontalBlock).toContain('horizontalPositionTitle')
- expect(horizontalBlock).toContain('horizontalOffset')
- expect(horizontalBlock).toContain('handleHorizontalPreset')
- // Should contain trigger alignment pills
- expect(horizontalBlock).toContain('edgeTriggerPositionTitle')
- expect(horizontalBlock).toContain('triggerAlignment: opt.val')
- // Should contain panel height pills
- expect(horizontalBlock).toContain('panelHeightTitle')
- expect(horizontalBlock).toContain('panelHeight: opt.val')
+ // Should NOT contain horizontal position offset slider or panel height pills
+ expect(horizontalBlock).not.toContain('horizontalPositionTitle')
+ expect(horizontalBlock).not.toContain('panelHeightTitle')
+ // Should NOT contain trigger alignment pills in horizontal shelf
+ expect(horizontalBlock).not.toContain('edgeTriggerPositionTitle')
+ expect(horizontalBlock).not.toContain('triggerAlignment: opt.val')
+ // Should contain trigger thickness
+ expect(horizontalBlock).toContain('trigger-thickness-card')
+ expect(horizontalBlock).toContain('handleThicknessRelease')
// Should contain auto-updates toggle
expect(horizontalBlock).toContain('autoUpdatesTitle')
expect(horizontalBlock).toContain('autoUpdates: v')
@@ -236,10 +235,13 @@ describe('Horizontal Card Shelf Settings Layout', () => {
expect(horizontalBlock).toContain('diamond-mid')
expect(horizontalBlock).toContain('diamond-bottom')
- // Explicit pixel labels on length presets & live thickness badge
- expect(horizontalBlock).toContain('(220px)')
- expect(horizontalBlock).toContain('(320px)')
- expect(horizontalBlock).toContain('(460px)')
+ // Clean names on length presets & live thickness badge without pixel strings
+ expect(horizontalBlock).toContain("t('appearance.small')")
+ expect(horizontalBlock).toContain("t('position.medium')")
+ expect(horizontalBlock).toContain("t('appearance.large')")
+ expect(horizontalBlock).not.toContain('(220px)')
+ expect(horizontalBlock).not.toContain('(320px)')
+ expect(horizontalBlock).not.toContain('(460px)')
expect(horizontalBlock).toContain('${settings.hotZoneWidth ?? 3}px')
})
@@ -296,4 +298,18 @@ it('Appearance shelf renders Card 1 Copy Indicator toggle first, then Card 2 Ind
expect(flyoutSrc).toContain('styleFlyoutAnchorRect.x')
expect(flyoutSrc).toContain('anchorCenterX - flyoutWidth / 2')
})
+
+ it('LanguageFlyout anchors horizontally relative to languageFlyoutAnchorRect in top/bottom dock', () => {
+ const flyoutSrc = read('src/components/LanguageFlyout.tsx')
+ expect(flyoutSrc).toContain('languageFlyoutAnchorRect')
+ expect(flyoutSrc).toContain('languageFlyoutAnchorRect.x')
+ expect(flyoutSrc).toContain('anchorCenterX - flyoutWidth / 2')
+
+ const panelSrc = read('src/components/Panel.tsx')
+ expect(panelSrc).toContain('<LanguageFlyout isRight={isRight} />')
+
+ const settingsSrc = read('src/components/Settings.tsx')
+ expect(settingsSrc).toContain('language-toggle-btn')
+ expect(settingsSrc).toContain('setLanguageFlyoutOpen(!languageFlyoutOpen, rect)')
+ })
});