-
[OPIK-3748] [FE] Auto-collapse base64 strings in CodeMirror viewer (#4712)
发布于
2026-01-14 14:19:58 +00:00 - [OPIK-3748] [FE] Auto-collapse base64 strings in CodeMirror viewer
Implements auto-collapse functionality for base64 data URIs in the annotation queue input view using CodeMirror's native folding feature.
- Added base64Extension that detects and auto-folds base64 strings (>100 chars) on document load
- Integrated extension into CodeMirrorHighlighter component
- Added comprehensive unit tests for base64 detection, auto-folding, and expand/collapse functionality
- Base64 strings are collapsed by default but can be expanded/collapsed via CodeMirror's fold gutter
- Works with both YAML and JSON formats
- Preserves expand/collapse functionality when switching between modes
-
Revision: Fix linting errors in base64Extension files
-
Revision 2: Memoize base64Extension to prevent recreation on every render
Co-authored-by: Miguel Garcia miguel@Miguels-MacBook-Pro.local
下载附件