You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Structure: keep functions small and pure where feasible; utilities that don’t touch VS Code APIs are easier to test.
30
+
- Filenames: `kebab-case` for new files; tests end with `.test.ts`.
31
+
32
+
## Testing Guidelines
33
+
- Framework: `node:test` with `assert`.
34
+
- Location/pattern: `src/test/**/*.test.ts` → compiled to `out/test`.
35
+
- Run: `npm test` (ensures a fresh compile).
36
+
- Conventions: target pure utilities (parsing, type inference, color mapping, HTML escaping). Add tests when changing command behavior or settings logic. No formal coverage threshold; aim for meaningful cases.
37
+
38
+
## Commit & Pull Request Guidelines
39
+
- Commits: imperative mood, concise. Optional prefixes like `fix:`/`chore:` to match history (e.g., “Add TSV support”, “chore: widen vscode engine compatibility”). Reference issues/PRs: `(#42)`.
40
+
- PRs: clear description, linked issues, test plan, and screenshots/GIFs for UI changes. Note any new settings/commands and update `README.md` when user-facing.
41
+
42
+
## Security & Configuration Tips
43
+
- Webview: escape all user data before injecting HTML; avoid `eval`/inline scripts. Be mindful of content security.
44
+
- Settings: use `csv.*` keys declared in `package.json` and respect `csv.enabled`.
45
+
- Compatibility: keep within engines in `package.json` (`vscode` and Node). Validate both `.csv` and `.tsv` flows.
Copy file name to clipboardExpand all lines: README.md
+34-30Lines changed: 34 additions & 30 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,8 +33,9 @@ Working with CSV files shouldn’t be a chore. With CSV, you get:
33
33
-**Enhanced Keyboard Navigation:** Navigate cells with Tab/Shift+Tab and use keyboard shortcuts for quick editing, saving, selection, and full-table `Ctrl/Cmd + A` select-all.
34
34
-**Advanced Multi-Cell Selection:** Easily select and copy blocks of data, then paste them elsewhere as properly formatted CSV.
35
35
-**Add/Delete Columns:** Right-click any cell to add a column left or right, or remove the selected column.
36
+
-**Add/Delete Rows:** Insert above/below or remove the selected row via context menu.
36
37
-**Edit Empty CSVs:** Create or open an empty CSV file and start typing immediately.
37
-
-**Column Sorting:**Click column headers to sort ascending or descending.
38
+
-**Column Sorting:**Right-click a header and choose A–Z or Z–A.
38
39
-**Custom Font Selection:** Choose a font from a dropdown or inherit VS Code's default.
39
40
-**Find & Highlight:** Built-in find widget helps you search for text within your CSV with real-time highlighting and navigation through matches.
40
41
-**Preserved CSV Integrity:** All modifications respect CSV formatting—no unwanted extra characters or formatting issues.
@@ -71,41 +72,38 @@ Cursor (built on VS Code 1.99) and the latest VS Code releases (1.102).
71
72
72
73
---
73
74
74
-
## Planned Improvements
75
+
## Commands
75
76
76
-
-**Row Insertion/Deletion:** Quickly add or remove rows without leaving the editor (coming soon).
Scope: VS Code custom editor for CSV/TSV (`csv.editor`). This document captures prioritized recommendations, their rationale, and current status.
4
+
5
+
Highest Priority (P0)
6
+
- Preserve CSV correctness on edit: Always rebuild CSV with Papa when editing a single cell to keep quoting/escaping intact. Status: done.
7
+
- Remove dead command wiring: `csv.changeIgnoreRows` was contributed but unimplemented. Removed from `package.json` and README. Status: done.
8
+
- Provide referenced language configuration: `language-configuration.json` referenced but missing. Added minimal file to satisfy the contribution. Status: done.
9
+
- Use current delimiter for copy: Copy-to-clipboard used comma regardless of settings/TSV. Now copies with the active delimiter. Status: done.
10
+
- Harden virtual scrolling: Guard IntersectionObserver wiring when there is no initial row (empty/new docs). Status: done.
11
+
- Tighten CSP: Replace `style-src 'unsafe-inline'` with a nonce-based policy matching the inline style tag. Status: done.
12
+
13
+
High Priority (P1)
14
+
- README accuracy: Align sorting instructions with actual UX (context menu on header). Status: done.
15
+
- Dependency/types cleanup: Remove unused `@types/mocha` and `mocha` from tsconfig types since tests use `node:test`. Status: done.
16
+
- Remove built artifact from repo: Dropped tracked `.vsix`. Status: done.
17
+
18
+
Medium Priority (P2)
19
+
- Sorting UX: Optional click-to-sort on header with visual indicator; currently available via context menu.
0 commit comments