-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Description
Background
When modifying a sheet that contains comments, the VML drawing file (xl/drawings/vmlDrawingN.vml) is regenerated from scratch rather than preserved from the source file. This means custom VML styling is lost.
Related: #166 (fix for comments overwrite bug)
What VML Controls
VML (Vector Markup Language) stores visual properties for comment boxes:
- Position (margin-left, margin-top)
- Size (width, height)
- Fill color (custom colors beyond default yellow)
- Stroke/border settings
- Shadow settings
- Visibility state (always visible vs hover-only)
- z-index ordering
- Custom anchor offsets
Current Behavior
| Scenario | VML Behavior |
|---|---|
| Unmodified sheet | ✅ Preserved byte-for-byte |
| Modified sheet | ❌ Regenerated with defaults |
When regenerated, comments get fixed defaults:
- Size: 108pt × 59.25pt
- Color:
infoBackground [80](yellow) - Position: Calculated from cell position
- Visibility: Hidden (shows on hover)
Proposed Solution
- Parse VML on read - Extract comment visual properties into domain model
- Extend Comment type - Add optional
CommentStyleorVmlPropertiesfield - Preserve on write - Use stored properties when regenerating VML
Complexity
VML is a complex legacy format. This is a non-trivial enhancement that requires:
- VML parser (currently binary passthrough)
- Domain model extension
- Round-trip testing for VML properties
Acceptance Criteria
- Comments with custom sizes preserve size on round-trip
- Comments with custom positions preserve position on round-trip
- Comments with custom colors preserve color on round-trip
- Comments with "always visible" state preserve visibility
- Existing tests continue to pass
Priority
Low - This is a fidelity enhancement, not a correctness issue. Comments content and author are preserved correctly; only visual styling is affected.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels