Bug 548862 - disable commit button after click
Summary: disable commit button after click
Status: NEW
Alias: None
Product: EGit
Classification: Technology
Component: UI (show other bugs)
Version: 5.5   Edit
Hardware: PC Windows 10
: P3 minor (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-07-02 08:10 EDT by Michael Keppler CLA
Modified: 2020-06-23 14:53 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Keppler CLA 2019-07-02 08:10:44 EDT
I just managed to double click the "Commit and Push" button, having two push wizards open as a result. We need to disable those buttons earlier.
Comment 1 Alexander Nittka CLA 2020-03-11 04:56:15 EDT
Would disabling them immediately on "click" be an option? (The question is, whether subsequent enablement checks work as expected)

Also, would it make sense to turn "Commit and Push" into "Push" if there is nothing to commit? I sometimes commit and then think that commit and push would have been OK. Currently "Commit and Push" then complains that there is nothing to commit and you have to push from a different location.
Comment 2 Eclipse Genie CLA 2020-03-11 05:59:04 EDT
New Gerrit change created: https://git.eclipse.org/r/159167
Comment 3 Alexander Nittka CLA 2020-04-04 01:18:43 EDT
As noted by Thomas Wolf, this bug is closely related (99% duplicate) of bug 525685. I'd claim that the gerrit change resolves both.

The re-interpretation of the "Commit and Push" button to "Push" in case there is nothing to commit is not addressed.
Comment 4 Thomas Wolf CLA 2020-04-04 09:13:39 EDT
@Michael: could you please check whether the fix for bug 525685 also solves this double-click problem? If so, I suggest we close this as a duplicate.
Comment 5 Michael Keppler CLA 2020-06-23 14:53:49 EDT
I had this issue again at some point in the last 2 weeks, so I'm somewhat sure it's not fixed (since I use egit nightly in all installations).

Looking at the code, I see the commit buttons being enabled/disabled in 2 methods of the staging view _after_ quite some other code has been executed, and that code may even access the disk, since it checks all kinds of conditions of the repository, index state etc. This would fit my observation that this error only happens when eclipse is "under stress", e.g. a clean build running in parallel to my attempt of committing.

To really avoid this, we would need to immediately disable the buttons on click, and then enable them again after all those conditions have been checked, as suggested by Alexander.