Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
erp5
erp5
  • Project
    • Project
    • Details
    • Activity
    • Releases
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
  • Merge Requests 115
    • Merge Requests 115
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Jobs
  • Commits
  • nexedi
  • erp5erp5
  • Merge Requests
  • !734

Closed
Opened Aug 31, 2018 by Ayush Tiwari@tiwariayush3 of 3 tasks completed3/3 tasks
  • Report abuse
Report abuse

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 and text_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:

Screenshot_2018-09-04_at_3.04.26_PM

View of History in Old UI:

Screenshot_2018-09-04_at_4.59.39_PM

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

Check out, review, and merge locally

Step 1. Fetch and check out the branch for this merge request

git fetch https://lab.nexedi.com/tiwariayush/erp5.git history_diff
git checkout -b tiwariayush/erp5-history_diff FETCH_HEAD

Step 2. Review the changes locally

Step 3. Merge the branch and fix any conflicts that come up

git fetch origin
git checkout origin/master
git merge --no-ff tiwariayush/erp5-history_diff

Step 4. Push the result of the merge to GitLab

git push origin master

Note that pushing to GitLab requires write access to this repository.

Tip: You can also checkout merge requests locally by following these guidelines.

  • Discussion 1
  • Commits 10
  • Changes 27
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
0
Labels
None
Assign labels
  • View project labels
Reference: nexedi/erp5!734
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备14008524号