git-blame icon indicating copy to clipboard operation
git-blame copied to clipboard

Move toggle "Use Custom Url Template If Standard Remotes Fail"

Open verheyenkoen opened this issue 9 years ago • 6 comments

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...

verheyenkoen avatar Oct 24 '14 11:10 verheyenkoen

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.

alexcorre avatar Oct 24 '14 17:10 alexcorre

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...

verheyenkoen avatar Oct 24 '14 22:10 verheyenkoen

This might be able to be fixed with the recent improvements to the config API.

dmnd avatar Nov 16 '14 01:11 dmnd

Yeah thanks @dmnd read about this recently. Will definitely help in fixing this.

alexcorre avatar Nov 19 '14 21:11 alexcorre

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.

fedde-s avatar Mar 08 '18 13:03 fedde-s

And I think verheyenkoen's suggestion above could partially solve the usability issue I mentioned in #193.

fedde-s avatar Mar 08 '18 13:03 fedde-s