- Added `useKeyboardDeleteConfirmation` hook for enhanced delete interactions.
- Integrated keyboard shortcuts for delete confirmations in clipboard history
- Implemented context menu triggers for keyboard navigation on ClipboardHistory and ClipCard components.
- Enhanced keyboard interactions with contextual menu display
- Added `html-to-text` package for converting HTML to plain text.
- Implemented `stripHtmlTags` function to normalize whitespace and strip HTML tags.
- Introduced new transformation option for converting HTML to plain text in the format converter.
- Updated localization files for German, Spanish, French, Italian, Russian, Turkish, Ukrainian, and Chinese to include new transformation options.
- Enhanced UI text in Clipboard History Settings for better user guidance on drag-and-drop functionality.
This commit introduces a new user setting allowing you to define the
maximum number of lines displayed in the preview for text or code
clipboard history items.
Key changes:
- Added a "History Item Preview Line Limit" setting in
`ClipboardHistorySettings.tsx` (defaulting to 5 lines), stored in
`settingsStore.ts`.
- The `historyPreviewLineLimit` setting is now passed as a prop to
`ClipboardHistoryRow.tsx` and `ClipboardHistoryQuickPasteRow.tsx`
from their parent pages (`ClipboardHistoryPage.tsx` and
`ClipboardHistoryQuickPastePage.tsx` respectively).
- Modified `ClipboardHistoryRow.tsx` and
`ClipboardHistoryQuickPasteRow.tsx` to truncate the displayed text
or code preview based on the `historyPreviewLineLimit` prop when
the item is not expanded.
- The "Show all / Show less" indicators (+X lines / +Y chars) have
been updated to accurately reflect the truncation based on the new
line limit.
- Added comprehensive unit tests for both `ClipboardHistoryRow.tsx`
and `ClipboardHistoryQuickPasteRow.tsx` using Vitest and React
Testing Library to ensure the new functionality works as expected
across various scenarios (different limits, content lengths, text vs.
code, expanded state).