robproject / fsjd

Git External Diff machinery for Frappe Framework JSON schema
MIT License
8 stars 2 forks source link

Render text value diff #11

Open robproject opened 7 months ago

robproject commented 7 months ago

For values intended to be viewed as a block of text ie. print format code (of fieldtype 'code', text ; list all types) with newline characters, render typical diff output inside value block.

Before being able to implement the diff on values for these fields, we must implement the handling of lists of dicts with no way to compare common keys. In this instance, we can only compare for addition or removal of dicts, based on all values of the dict. Lists that meet this criteria may have dicts containing different sets of keys. The list diff will have to be fed with iterators grouped by dict 'type', based on the common keys that define the group.