Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Subscription delta for modify workflows #329

Closed
7 tasks
wouter1975 opened this issue Oct 3, 2023 · 1 comment
Closed
7 tasks

Add Subscription delta for modify workflows #329

wouter1975 opened this issue Oct 3, 2023 · 1 comment
Assignees

Comments

@wouter1975
Copy link
Collaborator

wouter1975 commented Oct 3, 2023

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
    Image
  • 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:

Image

  • 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

@wouter1975 wouter1975 changed the title Add subscription delta for modify workflows Add Subscription delta for modify workflows Oct 3, 2023
@acidjunk acidjunk self-assigned this Nov 29, 2023
@acidjunk
Copy link
Collaborator

Started with the first suggestion, but it;'s unmaintained:
praneshr/react-diff-viewer#166
So switched to the fork which seems to be maintained.

React Diff Viewer uses emotion for styling. So very the

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants