+23
Completed

Changes view: allow editing file

vseticka.martin 3 years ago updated by Thomas Singer 3 years ago 10

When I review changes that I'm about to commit I often find that I made a typo. I would like to make some adjustments in SmartGit right away to avoid navigating to the file in my IDE.

I reckon with "review window" you mean the "Changes" view. Currently, it changes its content on selection change in the "Files" view. What do you expect the "Changes" view to do after you have changed something and select a different file? IMHO a selection change should not show a confirmation dialog.

Yes, "Changes" window. I don't know how to change it in my original post.


It seems convenient not to show a confirmation dialog as you say.

OK, let's discuss this further. Normally, a change in the selection of the Files view should cause to show the file changes in the Changes view. If it became changed by the user, it should visually noticable disconnect from the selection change in the Files view and offer a Save or Discard option. If either is selected, it would listen again for selection changes in the Files view, right?

Should the Changes view be editable directly or should it be made editable by an explicit action, e.g., by a toolbar button click?

> If either is selected, it would listen again for selection changes in the Files view, right?


Yes


> Should the Changes view be editable directly or should it be made editable by an explicit action, e.g., by a toolbar button click?

Directly editable sounds better to me.

I also would like to edit the displayed content (from index or working tree, obviously not HEAD) of the Changes view directly. Opposed to having to open the index editor, 'tediously' visually search / scroll to the place I want to edit, close the editor again. After all, isn't one important purpose of the Changes view to check/verify the modifications I made to the working tree and/or index? Well, checking means the possibility to spot errors. And if I do spot an error, I'd like to fix it right away.


So effectively the Changes view would no longer be a read only text view, but a simple editor. Actually two, one for each side (unless the underlying file is from HEAD). I imagine that as soon as the text has been edited, it visually indicates, as Thomas said, that the displayed contained is modified relative to the underlying file (working tree or index). You cannot 'navigate away', e.g. by selecting another element in the Files view, until you explicitly save or discard your modifications. I.e. each side of the changes view would need two additional buttons: save and discard. If you try to 'navigate away' anyway, a Dialog offers to save/discard/cancel.

This would be a very bad user experience. A selection change never must cause a dialog to occur. I also consider a dialog on a focus change as bad user experience.

I completely agree in general. I envisioned that in general no dialog would occur after a selection change.


I imagine it like this: When the user modifies a text in the Changes view, she really explicitly wants the current 'read only viewer' (which can be closed at any time) to become a simple 'text editor'. When this 'text editor' is closed while having unsaved changes relative to the underlying file, e.g. due to selection change in the Files view, IMHO it is appropriate to show a modal dialog asking what to do with these unsaved changes. The purpose of this simple text editor is to make tiny modifications, typically fixing small errors spotted while inspecting changes using the current Changes view. When you want to do more serious editing, you should use another editor.

Completed

We've tried to implement this feature, but found it not easy and intuitive to use. Instead, the next 17.1 preview build will allow to open the Index editor at the same place where the Changes view is, so you can edit there.

I'm not sure whether I should select now Declined or Completed - I use the latter. ;)

Thanks. I'm looking forward to testing this. :)

You already can do that with 17.1 preview from http://www.syntevo.com/smartgit/preview and by invoking Help | Check for Latest Build. If the Changes view is focused/selected and you invoke the Index Editor, it will occur at the same place at the Changes view.