lunapaint / vscode-luna-paint

A raster image editor extension for VS Code
https://marketplace.visualstudio.com/items?itemName=Tyriar.luna-paint
279 stars 25 forks source link

Diff mode? #132

Closed KillyMXI closed 2 years ago

KillyMXI commented 2 years ago

I have Luna paint as the editor associated with PNG files.

Now when I change an image file and then select it in the Source Control panel, VSCode opens two full image editors, which is a bit slow and also cluttered with unnecessary for that situation UI elements.

(The same effect can be observed when selected two images and chosen "Compare Selected" from context menu.)

If taken this further, I think diff view for images could provide different set of useful features to highlight the changes.

But first of all I wonder whether it is possible to detect the way how the editor was opened and show the reduced view when full editor is not required.

Tyriar commented 2 years ago

Ideally I'd like to show a single editor with multiple presentations similar to how github.com does it (onion skin, slider, side-by-side, etc.). I don't think extensions can control this at all until API is added to VS Code though in https://github.com/microsoft/vscode/issues/138525

One small improvement I might be able to make is to hide all the UI windows initially when an image is opened in readonly mode.

Tyriar commented 2 years ago

Made the change to hide the UI in readonly images which is a little better. Unfortunately the right editor is just opened as a regular editor AFAICT so it would be a bit of a hack to try to hide the UI there.

image

Going to close this out for now but I've subscribed to https://github.com/microsoft/vscode/issues/138525 in case that ends up happening.

KillyMXI commented 2 years ago

Another minor convenience might be a command and an icon at the top right that can toggle all panels visibility. Something like "Temporarily hide all windows". This can be handy in the diff view or even in regular editor when parts on the image are hidden behind panels or one wants to reduce the clutter temporarily.

Tyriar commented 2 years ago

I've been trying to keep the buttons in the UI as minimal as possible to keep in the spirit of VS Code. There's actually a shortcut for this by hitting F5, F6, F7 and F8 (same as Paint.net).

Tyriar commented 2 years ago

I'm hopeful that custom editors will eventually get more control over diff editors in which case the extension could have a single readonly editor with custom controls which would be much nicer

zjffun commented 9 months ago

Here seems a solution https://github.com/microsoft/vscode/issues/138525#issuecomment-1847679100 .