Closed
Description
After a modify workflow has been run or if halfway the WF failed, it can be quite useful to see what the actual modification was. By performing a deep-diff on the subscription with the old_subscriptions and presenting it in a gitlab view (- and + highlighting) it will become instantly clear what the change comprised.
- The delta view is available on the process detail page for processes with the workflowTarget=MODIFY.
- Not available for processes with isTask=true
- only show subscription delta button, when workflowTarget=MODIFY
- perform a deep diff on the subscription for which the WF is being run. Use the
subscription_id
from the__old_subscriptions__
and compare with the subscription found in the last step state.- ensure that difference in sorting order is reflected as a delta
- to maximize the view width, open a modal and show the old and new subscription side by side, like presented in the design:
- add header with the subscription_id and subscription description
- hide unchanged rows after 3 exact rows - like gitlab show the commit changes
- Don't include the copy or maximize buttons, that is nice to have R2+ features
- don't show the delta, as the side by side comparison is good enough, and is 100% clear on additions and deletions.
When choosing a new library, discuss with other developers
Use a library to present the delta in way that the additionas and deletions become instantly clear. Consider for example https://github.com/praneshr/react-diff-viewer#readme or https://github.com/otakustay/react-diff-view