abapGit / abapGit

Git client for ABAP
https://abapgit.org
MIT License
1.56k stars 536 forks source link

Get back "blind" stage hotkey #5965

Open sbcgua opened 1 year ago

sbcgua commented 1 year ago

From slack:

as a side-effect of recent refactoring a nice bug-like feature was sadly fixed. 1) repo is fully syncronized 2) change objects 3) go back to AG window and press S (shortcut for stage, although STAGE button is not available !!! because AG doesn't know that objects changed yet) 4) The AG successfully refreshes and stages new changes. Thus no need to extra refresh. Saves time, both for pressing button and one-extra refresh (which could be siginificant !). I used this quite a lot. Did anyone else ? Maybe we should "legalize" this feature ?

I'm up to returning this "feature" if noone objects. It feels really less efficient without it, especially with larger repos.

mbtools commented 1 year ago

Currently, menu items are hidden if there are no changes. Let's just remove this "if" and always show these items (which should enable the "s" shortcut again). If there's nothing to do, AG should show an info message (so you stay on the repo view).

https://github.com/abapGit/abapGit/blob/0ea950c938f7c04393410da6b9c2fa49f4b200b7/src/ui/pages/zcl_abapgit_gui_page_repo_view.clas.abap#L427

sbcgua commented 1 year ago

Actually, maybe it's the right idea.

It makes sense to keep shortcuts and menu in sync. It is also makes sense to keep the toolbar clean from the undoable commands. I though that maybe, if is_unchanged, the commands should looks like Attempt stage, Attempt pull to reflect their uncertain nature. But this will be confusing. And the texts are long. And both starts from the same word. So it sucks. Maybe showing Stage/Pull always is the best compromise.

mbtools commented 1 year ago

Showing always is least confusing. Stage and pull refresh automatically. If there are no diffs, it should just show an info message.

sbcgua commented 1 year ago

Notes: maybe by the way reconsider toolbar look. E.g.

mbtools commented 1 year ago

bold: means "no sub-menus"... so it's kind of major order: pull, stage, diff, patch, refresh... makes sense highlight/separator: doesn't make any difference for me icons: doesn't make any difference for me (the general sap trend is to avoid icons and use translatable text) underscore: nah, you either know the key or press ?

sbcgua commented 1 year ago

The repo overview toolbar is actually nice and clean image

mbtools commented 1 year ago

agree. remove "bold", make menu order the same?

sbcgua commented 1 year ago

No final design yet, just collecting thoughts and ideas for the moment