Closed Alphare closed 1 year ago
Hey, I definitely agree with you on this. This is something that multiple people have requested on Reddit as well. I think it should be possible to adapt the DiffView
component to allow for folding batches of unchanged file, and to do so by default. The diffing crate this uses (similar) even has a feature built-in to collapse unchanged regions.
At the same time, I also like being able to see the entire file. Maybe this should be something that is behind a toggle switch. If you are adventorous and want to play with it, I'm happy to merge stuff. Otherwise I'll play with it but it might take me some time to get something workable.
I think I can close this, since the context is now hidden by default.
Most diffing tools hide unchanged parts and only show some context, allowing you to optionally show more (or all) context. I think this would speed up workflow quite a bit, and possibly reduce the amount of data sent over the wire, if that's a metric you care about.
IMO a simple -5 +5 lines context is already a good starting point, more intricate things like showing the closest "indentation header" are a bonus, and they are more complex to implement.