git-blame
git-blame copied to clipboard
Move toggle "Use Custom Url Template If Standard Remotes Fail"
I just lost 15 minutes wondering why git-blame kept on giving me the message that my custom url template was not configured while it was filled out.
The reason is that the checkbox to enable this was 3 field lower (both date format and ignore whitespace fields were between the template field and the toggle checkbox). I would replace the template field label with the checkbox label and put the checkbox in front. Also I would hide the template field when the checkbox is not checked...
Atom does not give us any power over the appearance of settings. Here is how i declare them from git-blame.js
configDefaults: {
useCustomUrlTemplateIfStandardRemotesFail: false,
customCommitUrlTemplateString: 'Example -> https://github.com/<%- project %>/<%- repo %>/commit/<%- revision %>',
dateFormatString: 'YYYY-MM-DD',
ignoreWhiteSpaceDiffs: false
}
It seems atom just puts them in alphabetical order. There may be a way to achieve the same configuration power without that flag at all. I'll look into that option as it will definitely be a better user experience.
I see. I guess you don't need the flag indeed. Also I don't think you need to issue the error alert message until you click a commit reference. If you're not on Github or Bitbucket repositories and have not provided a custom url template, you should still be able to toggle bit blame I think. Only clicking the reference needs the custom template. Not entirely sure though...
This might be able to be fixed with the recent improvements to the config API.
Yeah thanks @dmnd read about this recently. Will definitely help in fixing this.
Maybe I'm misreading the documentation, but I also feel like the flag serves no other purpose than indicating that the template string is not blank. In that case, removing it entirely would be a lot less confusing.
And I think verheyenkoen's suggestion above could partially solve the usability issue I mentioned in #193.