History Diff: Use of property as well as attributes to display diff
We use Report Section to display diff for properties as well as attribute dict. This will ensure that we have old_value
, new_value
and current_value
for properties which are of type int/string/float and at the same time being able to use DiffTool
to display diff for large text contents and provide link to the current_value
.
Also, we simplify the way the current diff is being displayed in History Tab and let DiffTool calculate diff and then play with UI to display it as required.
Other extra changes include:
- Remove redundant diff(ex: useless
data
,base_data
andtext_content
redundancy) - Provide link for large content instead of displaying the data which is almost impossible to understand on the view.
- Use
DiffTool
to handle the binary problem and display error, hence generalizing the case where diff is not calculated properly.
View of History in New UI:
View of History in Old UI:
Problems remaining:
-
report_view
as page template doesn't support rendering of gadget. -
Current Value Link
is not working for new UI as there is no way to show the value through URL as we do in XHTML UI (ex: document_relative_url/getTextContent) - Remove showing redundant properties as data and text_content