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.
TypeScript clipboardclipboard-managerdesktop-appdrag-and-dropelectronopen-sourceproductivityproductivity-toolwindows
fix: unify horizontal dock headers, add scroll-to-start, and fix Polish i18n (fixes #75)
Deepender259b27519e25cf
diff --git a/src/components/ItemList.tsx b/src/components/ItemList.tsxindex dbc2746..68e243c 100644--- a/src/components/ItemList.tsx+++ b/src/components/ItemList.tsx@@ -15,10 +15,18 @@ import { useFilteredItems } from '../hooks/useFilteredItems'import { ClipboardItemCard } from './ClipboardItem'import { EmptyState } from './EmptyState'import { ChevronDownIcon, PinFillIcon } from './icons'-import { playExpandSound } from '../lib/soundEffects'+import { playExpandSound, playButtonClickSound } from '../lib/soundEffects'import { useTranslation } from '../i18n'+const getVerticalPinnedLabelStyle = (text: string): React.CSSProperties => {+ const len = text.length+ if (len <= 6) return { fontSize: 'calc(9.5px * var(--font-scale, 1))', letterSpacing: '0.14em' }+ if (len <= 8) return { fontSize: 'calc(8.5px * var(--font-scale, 1))', letterSpacing: '0.07em' }+ if (len <= 10) return { fontSize: 'calc(7.5px * var(--font-scale, 1))', letterSpacing: '0.02em' }+ return { fontSize: 'calc(7.0px * var(--font-scale, 1))', letterSpacing: '0em' }+}+export function ItemList() {const { t } = useTranslation()const { pinned, recent } = useFilteredItems()@@ -196,6 +204,7 @@ export function ItemList() {}const scrollToTop = () => {+ playButtonClickSound()if (listRef.current) {filterScrollMap.current[typeFilter] = { top: 0, left: 0 }if (isHorizontal) {@@ -325,8 +334,12 @@ export function ItemList() {><div className="pinned-header-left"><PinFillIcon width={13} height={13} style={{ opacity: 0.9, color: '#ffffff' }} />- <span>{t('item.pinned')}</span>- <span className="pinned-count-badge">{pinned.length}</span>+ <div className="pinned-label-group">+ <span style={isHorizontal ? getVerticalPinnedLabelStyle(t('item.pinned')) : undefined}>+ {t('item.pinned')}+ </span>+ <span className="pinned-count-badge">{pinned.length}</span>+ </div></div><div className="pinned-header-right"><button@@ -367,19 +380,26 @@ export function ItemList() {)}<AnimatePresence>- {!isHorizontal && showScrollTop && (+ {showScrollTop && (<motion.button- initial={{ opacity: 0 }}- animate={{ opacity: 1 }}- exit={{ opacity: 0 }}- transition={{ duration: 0.12 }}- className="scroll-top-btn"+ initial={{ opacity: 0, scale: 0.85 }}+ animate={{ opacity: 1, scale: 1 }}+ exit={{ opacity: 0, scale: 0.85 }}+ transition={{ duration: settings.reduceMotion ? 0.01 : 0.14, ease: 'easeOut' }}+ className={`scroll-top-btn${isHorizontal ? ' horizontal' : ''}`}onClick={scrollToTop}title={t('item.scrollToTop')}+ aria-label={t('item.scrollToTop')}>- <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.5" strokeLinecap="round" strokeLinejoin="round">- <polyline points="18 15 12 9 6 15"></polyline>- </svg>+ {isHorizontal ? (+ <svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.5" strokeLinecap="round" strokeLinejoin="round">+ <polyline points="15 18 9 12 15 6"></polyline>+ </svg>+ ) : (+ <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.5" strokeLinecap="round" strokeLinejoin="round">+ <polyline points="18 15 12 9 6 15"></polyline>+ </svg>+ )}</motion.button>)}</AnimatePresence>diff --git a/src/components/Settings.tsx b/src/components/Settings.tsxindex 3d81cc4..e7f3b22 100644--- a/src/components/Settings.tsx+++ b/src/components/Settings.tsx@@ -178,7 +178,8 @@ export function Settings({const downloadPercent = updateInfo?.downloadProgress?.percent ?? 0// ── Tab state & Independent Scroll Memory per section ──────────────────────- const [activeTab, setActiveTab] = useState<SettingsTab>('behaviour')+ const activeTab = useStore((s) => s.settingsTab)+ const setActiveTab = useStore((s) => s.setSettingsTab)const scrollListRef = useRef<HTMLDivElement>(null)const tabScrollPositions = useRef<Record<SettingsTab, number>>({behaviour: 0,diff --git a/src/i18n/translations.ts b/src/i18n/translations.tsindex 7416f8f..2c305b0 100644--- a/src/i18n/translations.ts+++ b/src/i18n/translations.ts@@ -5638,7 +5638,7 @@ export const pl: TranslationKeys = {"copy": "Kopiuj","copied": "skopiowano","imagePlaceholder": "obraz",- "pinned": "PRZYPINIĘTE",+ "pinned": "PRZYPIĘTE","pin": "Przypnij","unpin": "Odepnij","delete": "Usuń",diff --git a/src/store/appStore.ts b/src/store/appStore.tsindex ac71752..ffe3208 100644--- a/src/store/appStore.ts+++ b/src/store/appStore.ts@@ -584,6 +584,7 @@ export const useStore = create<AppState>((set, get) => ({if (reduceMotion) {playButtonClickSound()+ set({ settingsTab: 'position' })await get().patchSettings({ stickPosition: to })get().notifyPositionChanged()returndiff --git a/src/styles/item.css b/src/styles/item.cssindex 1336676..f69266c 100644--- a/src/styles/item.css+++ b/src/styles/item.css@@ -207,7 +207,7 @@padding-left: 6px;}-/* Scroll to top button */+/* Scroll to top / start button */.scroll-top-btn {position: fixed;bottom: 64px;@@ -216,7 +216,7 @@height: 44px;border-radius: 50%;background: #141414;- border: none;+ border: 1px solid rgba(255, 255, 255, 0.1);color: var(--text-primary);display: flex;align-items: center;@@ -224,11 +224,12 @@cursor: pointer;box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);z-index: 100;- transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);+ transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s cubic-bezier(0.16, 1, 0.3, 1);}.scroll-top-btn:hover {background: #1c1c1c;+ border-color: rgba(255, 255, 255, 0.2);transform: translateY(-2px);box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);}@@ -237,6 +238,32 @@transform: translateY(1px);}+/* Horizontal Dock Scroll-to-Start Button */+.scroll-top-btn.horizontal {+ bottom: 16px;+ right: 44px;+ left: auto;+ top: auto;+ width: 38px;+ height: 38px;+ background: rgba(18, 18, 20, 0.88);+ backdrop-filter: blur(12px);+ -webkit-backdrop-filter: blur(12px);+ border: 1px solid rgba(255, 255, 255, 0.14);+ box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.06);+}++.scroll-top-btn.horizontal:hover {+ background: rgba(28, 28, 32, 0.96);+ border-color: rgba(255, 255, 255, 0.28);+ transform: translateX(-2px) scale(1.06);+ box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.12);+}++.scroll-top-btn.horizontal:active {+ transform: scale(0.96);+}+.bundle-stack {display: flex;align-items: center;diff --git a/src/styles/panel.css b/src/styles/panel.cssindex 2ba7814..231ebe0 100644--- a/src/styles/panel.css+++ b/src/styles/panel.css@@ -270,84 +270,103 @@flex-direction: column;align-items: center;justify-content: space-between;- width: 44px;- min-width: 44px;- max-width: 44px;+ width: 32px;+ min-width: 32px;+ max-width: 32px;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);+ padding: 10px 4px 10px;+ background: transparent;+ border: none;+ border-radius: 8px;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;+ transition: background 0.15s ease, transform 0.12s 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);+ background: rgba(255, 255, 255, 0.05);}.list.horizontal .pinned-header-interactive:active {+ background: rgba(255, 255, 255, 0.09);transform: scale(0.97);}.list.horizontal .pinned-header-interactive .pinned-header-left {+ display: flex;flex-direction: column;align-items: center;- gap: 6px;- margin-top: 2px;+ justify-content: flex-start;+ flex: 1;+ width: 100%;+ min-height: 0;}-.list.horizontal .pinned-header-interactive .pinned-header-left span:not(.pinned-count-badge) {+.list.horizontal .pinned-header-interactive .pinned-label-group {+ display: flex;+ flex-direction: column;+ align-items: center;+ justify-content: center;+ gap: 4px;+ margin: auto 0;+ min-height: 0;+}++.list.horizontal .pinned-header-interactive .pinned-label-group 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;+ font-weight: 600;+ letter-spacing: 0.08em;+ text-transform: uppercase;+ color: rgba(255, 255, 255, 0.85);+ margin: 0;+ max-height: 68px;+ overflow: hidden;+ text-overflow: ellipsis;+ white-space: nowrap;+ display: block;}.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;+ background: transparent;+ color: rgba(255, 255, 255, 0.55);+ font-size: calc(10px * var(--font-scale, 1));+ font-weight: 600;+ padding: 0;+ border-radius: 0;+ border: none;+ letter-spacing: 0;display: flex;align-items: center;justify-content: center;+ flex-shrink: 0;}.list.horizontal .pinned-header-interactive .pinned-header-right {- margin-bottom: 2px;+ margin-top: auto;+ margin-bottom: 0;}.list.horizontal .pinned-header-interactive .bundle-collapse-btn {- width: 22px;- height: 22px;+ width: 18px;+ height: 18px;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);+ background: transparent;+ border: none;+ border-radius: 0;+ color: rgba(255, 255, 255, 0.65);+ pointer-events: none;}.list.horizontal .pinned-header-interactive:hover .bundle-collapse-btn {- background: rgba(255, 255, 255, 0.15);+ background: transparent;color: #ffffff;}@@ -356,13 +375,13 @@flex-direction: column;align-items: center;justify-content: center;- width: 24px;- min-width: 24px;+ width: 20px;+ min-width: 20px;height: 146px;margin: 0 2px 0 0;padding: 0;background: transparent;- border-left: 1px solid rgba(255, 255, 255, 0.08);+ border-left: 1px solid rgba(255, 255, 255, 0.06);box-sizing: border-box;flex-shrink: 0;user-select: none;@@ -373,9 +392,13 @@transform: rotate(180deg);font-size: calc(9.5px * var(--font-scale, 1));font-weight: 600;- letter-spacing: 0.14em;+ letter-spacing: 0.08em;text-transform: uppercase;color: rgba(255, 255, 255, 0.35);+ max-height: 125px;+ overflow: hidden;+ text-overflow: ellipsis;+ white-space: nowrap;}.section-label {diff --git a/tests/horizontalSettings.test.ts b/tests/horizontalSettings.test.tsindex 7564bf4..16d5d03 100644--- a/tests/horizontalSettings.test.ts+++ b/tests/horizontalSettings.test.ts@@ -301,4 +301,33 @@ it('Appearance shelf renders Card 1 Copy Indicator toggle first, then Card 2 Indexpect(settingsSrc).toContain('language-toggle-btn')expect(settingsSrc).toContain('setLanguageFlyoutOpen(!languageFlyoutOpen, rect)')})++ it('ItemList renders scroll-to-start arrow button with directional left chevron in horizontal dock mode', () => {+ const itemListSrc = read('src/components/ItemList.tsx')+ expect(itemListSrc).toContain('showScrollTop && (')+ expect(itemListSrc).toContain('className={`scroll-top-btn${isHorizontal ? \' horizontal\' : \'\'}`}')+ expect(itemListSrc).toContain('points="15 18 9 12 15 6"') // Left chevron in horizontal+ expect(itemListSrc).toContain('points="18 15 12 9 6 15"') // Up chevron in vertical+ expect(itemListSrc).toContain('playButtonClickSound()')++ const itemCss = read('src/styles/item.css')+ expect(itemCss).toContain('.scroll-top-btn.horizontal')+ expect(itemCss).toContain('right: 44px')+ expect(itemCss).toContain('bottom: 16px')+ expect(itemCss).toContain('backdrop-filter: blur(12px)')+ })++ it('ItemList applies dynamic vertical font scaling and panel.css bounds for horizontal pinned pill', () => {+ const itemListSrc = read('src/components/ItemList.tsx')+ expect(itemListSrc).toContain('getVerticalPinnedLabelStyle')+ expect(itemListSrc).toContain('getVerticalPinnedLabelStyle(t(\'item.pinned\'))')+ expect(itemListSrc).toContain('pinned-label-group')++ const panelCss = read('src/styles/panel.css')+ expect(panelCss).toContain('.list.horizontal .pinned-header-interactive')+ expect(panelCss).toContain('max-height: 68px')+ expect(panelCss).toContain('text-overflow: ellipsis')+ expect(panelCss).toContain('margin: auto 0')+ })});+