mirror of
https://github.com/readest/readest.git
synced 2026-04-28 11:30:48 +00:00
* fix(ui): restore highlight options layout and clean up color name editing Restore the pre-#3741 layout for both the AnnotationPopup highlight options row and the HighlightColorsEditor settings panel. HighlightOptions: re-add `justify-between` on the outer container and remove `flex-1` from the color strip so the gap between the style box and color strip responds to the number of colors. HighlightColorsEditor: restore `grid-cols-3 sm:grid-cols-5` grid, remove always-visible name inputs, and add a click-to-edit popover on each color circle with hover tooltip for the label. Add a browser screenshot test that renders the real AnnotationPopup component with Tailwind CSS and compares against baseline PNGs for 5, 10, and 15 colors. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
38 lines
1 KiB
TypeScript
38 lines
1 KiB
TypeScript
import path from 'path';
|
|
import { defineConfig } from 'vitest/config';
|
|
import react from '@vitejs/plugin-react';
|
|
import tsconfigPaths from 'vite-tsconfig-paths';
|
|
|
|
export default defineConfig({
|
|
plugins: [tsconfigPaths(), react()],
|
|
resolve: {
|
|
alias: {
|
|
// The @pdfjs alias from tsconfig only resolves within the app's own
|
|
// source files. foliate-js/pdf.js lives outside that scope, so Vite
|
|
// needs an explicit alias to find the vendored pdfjs build.
|
|
'@pdfjs': path.resolve(__dirname, 'public/vendor/pdfjs'),
|
|
},
|
|
},
|
|
test: {
|
|
environment: 'jsdom',
|
|
setupFiles: ['./vitest.setup.ts'],
|
|
exclude: [
|
|
'**/node_modules/**',
|
|
'**/dist/**',
|
|
'**/.claude/**',
|
|
'**/*.browser.test.ts',
|
|
'**/*.browser.test.tsx',
|
|
'**/*.tauri.test.ts',
|
|
],
|
|
coverage: {
|
|
provider: 'v8',
|
|
reporter: ['text', 'text-summary'],
|
|
include: ['src/**/*.{ts,tsx}'],
|
|
exclude: [
|
|
'src/**/*.d.ts',
|
|
'src/**/__tests__/**',
|
|
'src/**/test/**',
|
|
],
|
|
},
|
|
},
|
|
});
|