argoproj / argo-cd

Declarative Continuous Deployment for Kubernetes
https://argo-cd.readthedocs.io
Apache License 2.0
17.55k stars 5.35k forks source link

Improve compact diff view to separate diff blocks #9776

Open couloum opened 2 years ago

couloum commented 2 years ago

Summary

Improve compact diff view to clearly separate diff blocks from each other.

Motivation

The current compact diff view display all diffs as a single sequence. An example is better than words. Here is a compact diff I had to review:

image

We clearly see that we change path for livenessProbe. But no... The change is actually in startupProbe as shown in this commit:

image

The key is line numbers. When seing line numbers in 1st screenshot, we see that we go from 204 to 229. But compact diff make it appears as if all lines were continuous. This is very confusing and can lead to error of judgment when reviewing a diff of what is going to be applied on a k8s cluster.

Proposal

There should be a bigger separator when there is a hole in line numbers in compact diff view. This might be excessive, but something like this would be more clear imho:

image

couloum commented 2 years ago

As an alternative to the gray bar, you could use the diff structure with @@ lines. These lines would be in grey or blue. You can mimick github style or gitlab style.

github style:

image

gitlab style:

image

This would bring clarity in diff view, while respecting the diff format and not adding too much complexity.