feat(create): metadata editor — editable form with dirty tracking and save-back #270
Reference in New Issue
Block a user
Delete Branch "feat/metadata-editor"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Add an editable Metadata viewer that opens in an MDI subwindow when the user double-clicks the "Metadata" node in the Silo tree. Introduces the dirty tracking and save-back pipeline used by all editable viewers.
Changes
Modified files:
silo_viewers.py—SiloMetadataEditorwidget with:QComboBox(draft/review/released/obsolete)+) and remove (×) buttonsQCheckBoxfor bools,QDoubleSpinBoxfor numbers,QLineEditfor strings)QMessageBoxprompt)QScrollAreawrapper for long field listssilo_objects.py—mark_dirty(),is_dirty(),clear_dirty()methods onSiloViewerObjectproxykc_format.py— Fixentries is None→{}before hooks run; add_metadata_save_hookthat writes dirtyRawContentback to the silo/ cache on document saveSave-back round-trip:
mark_dirty()json.dumpstoobj.RawContent_metadata_save_hookencodesRawContentinto silo/ cacheslotFinishSaveDocumentwrites cache to ZIP (duplicate entry, last wins)Related Issues
Closes kindred/silo-mod#39
Depends on #268, #269
Checklist
feat:,fix:,chore:,docs:,art:)