Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Commit button always visible #5968

Closed
mstv opened this issue Dec 20, 2018 · 15 comments
Closed

Commit button always visible #5968

mstv opened this issue Dec 20, 2018 · 15 comments

Comments

@mstv
Copy link
Member

mstv commented Dec 20, 2018

Do you want to request a feature or report a bug?
bug

What is the current behavior?
I can click the Commit button before it gets labeled on startup.
(When switching between repos the Commit button does not indicate that the displayed state might be outdated.)

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.
just click here while the first repo is loading
grafik

What is the expected behavior?
The Commit button shall always be labeled. It is annoying to puzzle where it will appear finally.
The Commit button should have a different icon while the repo is loaded, maybe grafik in gray.

Environment you encounter the issue:

  • Git Extensions 3.00.00.4433 and 2.51.05
  • Build fca7cf2
  • Git 2.10.1.windows.1
  • Microsoft Windows NT 6.1.7601 Service Pack 1
  • .NET Framework 4.7.2117.0
  • DPI 96dpi (no scaling)

Did this work in previous version of GitExtensions (which)?
maybe 2.49.3

@vbjay
Copy link
Contributor

vbjay commented Dec 20, 2018 via email

@mstv
Copy link
Member Author

mstv commented Dec 20, 2018

Believe me, it does take long! About 1-3 seconds for the GE repo on a SSD and not talking about the first start of GE.

@mstv
Copy link
Member Author

mstv commented Dec 20, 2018

If you really think, it should be invisible than it must be really invisible and disabled.
Though it does not make sense to me to hide a button which will always be applicable.

@gerhardol
Copy link
Member

As the text is translated, it is probably later (maybe it could be updated twice, but then only English will be correct).
It is possible to deactivate commit count on the button and only have it in the revision grid. (to settle the discussion at least)

@mstv
Copy link
Member Author

mstv commented Dec 21, 2018

The translation is available much earlier than the loading will be finished. The labels "Branches" and "Filter" have already been translated when the window appears.
The commit count can be added when the proposed "refresh icon" will be replaced with the orange or green one.

@RussKie
Copy link
Member

RussKie commented Dec 27, 2018 via email

@mstv
Copy link
Member Author

mstv commented Dec 30, 2018

What is the benefit of replacing the button toolStripButtonCommit with the ToolStripMenuItem _toolStripGitStatus?
I guess this is an unnecessary remainder of the previously removed ToolStripGitStatus _toolStripGitStatus.

FormBrowse.cs(268):

                // TODO: Replace with a status page?
                _toolStripGitStatus.Click += CommitToolStripMenuItemClick;
                ToolStrip.Items.Insert(ToolStrip.Items.IndexOf(toolStripButtonCommit), _toolStripGitStatus);
                ToolStrip.Items.Remove(toolStripButtonCommit);

@mstv
Copy link
Member Author

mstv commented Dec 30, 2018

Which tool do you use to create .png files with a color palette and an alpha mask?
I am trying to add a bitmap like grafik which I want to display while a repository is (re)loaded.

@gerhardol
Copy link
Member

What is the benefit of replacing the button toolStripButtonCommit with the ToolStripMenuItem _toolStripGitStatus?
I guess this is an unnecessary remainder of the previously removed ToolStripGitStatus _toolStripGitStatus.

The status was built in to the button previously so this should be a reminder.

Which tool do you use to create .png files with a color palette and an alpha mask?

If you are happy with any advise, Paint.NET will do the job.

I am trying to add a bitmap like grafik which I want to display while a repository is (re)loaded.

Something I would like to see too. The loading phase is handled with the spinner, but someway mark until the status is actually updated would be nice.
(GitStatusMonitor is clearing status by sending out 0 changes when the repo changes, need to be changed too.)

@mstv
Copy link
Member Author

mstv commented Dec 30, 2018

Thank you, Gerhard.

Then I would remove _toolStripGitStatus and use the form's toolStripButtonCommit.

Paint.NET handles the alpha mask correctly. Though the resulting file is larger than the original (using a color palette) by up to factor 4 unless I chose 32 bits per pixel explicitely.

The hint to adapt the GitStatusMonitor will help to handle in the correct place.

@drewnoakes
Copy link
Member

What about this?

  • The commit button is always visible
    • While loading we use the gray version of the icon (I'm pretty sure it already exists)
    • If we need to prevent clicking it for any reason, it is disabled rather than hidden (reducing horizontal movement within the tool strip)
    • We need to ensure it is correctly translated
  • If the user opts to see number of changes on the button, that information is added once it becomes available, however it is made interactive as early as possible

@drewnoakes
Copy link
Member

Paint.NET handles the alpha mask correctly. Though the resulting file is larger than the original

The PNG files in this repo have been 'crushed'. This online tool can help: https://tinypng.com/

@drewnoakes
Copy link
Member

Haha I just saw your PR which does pretty much what I suggested. Facepalm. Will review.

@mstv
Copy link
Member Author

mstv commented Jan 3, 2019

Unfortunately, it does still not work correctly in all cases, e.g. the button stays gray after committing.
Gerhard recommended a different place from where to invalidate the button.

@gerhardol
Copy link
Member

Commit Button must not be visible/enabled in bare repos. (Prefer disabled)
For normal repos the button should always be visible and active.

With this change, it may be possible to remove the requirement to restart to activate/deactivate commit count. But that is probably a follow up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants