feat: add text truncation hook and marquee support (#217)

Introduce a hook to detect text truncation for dynamic UI updates
Replace static marquee spans with a reusable marquee component in files and labels
Enable copying of terminal selection on mouse up and touch end
This commit is contained in:
Bohdan Triapitsyn
2026-01-26 00:24:40 +02:00
committed by GitHub
parent f34027df10
commit efe9ad27b7
18 changed files with 537 additions and 57 deletions
@@ -1,6 +1,7 @@
import React from 'react';
import { getSafeStorage } from '@/stores/utils/safeStorage';
import { updateDesktopSettings } from '@/lib/persistence';
const SHOW_GITIGNORED_STORAGE_KEY = 'filesViewShowGitignored';
const SHOW_GITIGNORED_EVENT = 'files-view-show-gitignored-change';
@@ -24,7 +25,10 @@ export const notifyFilesViewShowGitignoredChanged = () => {
window.dispatchEvent(new Event(SHOW_GITIGNORED_EVENT));
};
export const setFilesViewShowGitignored = (value: boolean) => {
export const setFilesViewShowGitignored = (
value: boolean,
options: { persist?: boolean } = {}
) => {
if (typeof window === 'undefined') {
return;
}
@@ -34,6 +38,10 @@ export const setFilesViewShowGitignored = (value: boolean) => {
} catch {
// ignore storage errors
}
if (options.persist !== false) {
void updateDesktopSettings({ filesViewShowGitignored: value });
}
};
export const useFilesViewShowGitignored = (): boolean => {