anitnilay20 / anitnilay20/thoth

Add support for additional file formats (CSV, XML, YAML)

未關閉
#35 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
enhancement feature
主要語言
Rust
星號
70
分支
5
平均合併
10 小時 33 分鐘
30 天內合併 PR
2

描述

## Description
Building on the FileViewer architecture established in the recent refactoring, add support for viewing additional file formats beyond JSON/NDJSON.

## Background
The codebase has been refactored to separate generic file viewing logic (FileViewer) from format-specific rendering (JsonTreeViewer). This architecture makes it straightforward to add new file format viewers.

## Proposed File Formats

### Priority 1 - High Value
- **CSV/TSV** - Tabular data display with column headers, sorting, filtering
- **XML** - Tree-based viewer similar to JSON, with attribute support
- **YAML** - Tree viewer with YAML-specific syntax handling

### Priority 2 - Nice to Have
- **TOML** - Config file support
- **Plain Text** - Basic text viewer with syntax highlighting
- **Markdown** - Rendered preview

## Implementation Plan

Each format viewer should:
1. Implement a dedicated viewer (e.g., `CsvTableViewer`, `XmlTreeViewer`)
2. Integrate with `FileViewer` via format detection
3. Support common operations: search, copy, export
4. Maintain consistent UI/UX with existing JSON viewer

## Technical Notes

Current architecture:
- `FileViewer` (generic parent) - handles loading, caching, selection
- `JsonTreeViewer` (JSON-specific) - renders JSON tree structure
- `ViewerState` (shared) - common state across viewers

New viewers should follow this pattern and reuse the existing infrastructure.

## Related Issues
- Closes #19 (Modularize JsonViewer) ✅
- Related to #18 (Refactor file module)

## Acceptance Criteria
- [x] CSV/TSV files display in tabular format
- [ ] XML files display in tree structure
- [ ] YAML files display in tree structure
- [ ] File type auto-detection works correctly
- [ ] Search functionality works across all formats
- [ ] Performance remains good for large files (lazy loading where applicable)
- [ ] All keyboard shortcuts work consistently

貢獻指南

這個儲存庫沒有索引到貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。