caponetto / vscode-diff-viewer

A simple VS Code extension to easily visualize git diff files.
https://marketplace.visualstudio.com/items?itemName=caponetto.vscode-diff-viewer&ssr=false#overview
MIT License
44 stars 5 forks source link

Add a side-by-side toggle #67

Closed jacekkopecky closed 1 year ago

jacekkopecky commented 1 year ago

With this PR, DiffViewer windows have an icon in the navigation area to toggle line-by-line and side-by-side view.

The mirror icon is the best I found from among the standard codicon set.

It's the second icon in the top-right corner of these screenshots:

Screen Shot 2023-01-15 at 14 51 42 Screen Shot 2023-01-15 at 14 51 23
jacekkopecky commented 1 year ago

@caponetto the 500ms update delay forced in provider.ts feels too long when doing a quick refresh (e.g. when the side-by-side toggle changes).

I see that if it's completely removed, vscode doesn't show the "loading" message when opening a long diff file, which IIRC is the reason for the delay, but maybe we could reduce this to 100ms which seems to be enough for the "loading" message to show up?

caponetto commented 1 year ago

@caponetto the 500ms update delay forced in provider.ts feels too long when doing a quick refresh (e.g. when the side-by-side toggle changes).

I see that if it's completely removed, vscode doesn't show the "loading" message when opening a long diff file, which IIRC is the reason for the delay, but maybe we could reduce this to 100ms which seems to be enough for the "loading" message to show up?

@jacekkopecky 100ms looks good to me!

jacekkopecky commented 1 year ago

Thanks for the feedback, all done.