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

Closes #1165 - Adds options to modify file annotation button behaviour #1171

Merged
merged 3 commits into from Dec 2, 2020

Conversation

arrpee
Copy link
Contributor

@arrpee arrpee commented Nov 18, 2020

Description

Adds two options to modify the behaviour of the file annotations button:

  • "gitlens.menus.annotations.behaviour" changes the behaviour between a menu (default) and a toggle button
  • "gitlens.menus.annotations.toggleType" changes what is toggled when behaviour is set to toggle

I wasn't too sure of what to name the settings so if you can suggest more appropriate ones that would be great.

Checklist

  • I have followed the guidelines in the Contributing document
  • My changes follow the coding style of this project
  • My changes build without any errors or warnings
  • My changes have been formatted and linted
  • My changes include any required corresponding changes to the documentation
  • My changes have been rebased and squashed to the minimal number (typically 1) of relevant commits
  • My changes have a descriptive commit message with a short title, including a Fixes $XXX - or Closes #XXX - prefix to auto-close the issue that your PR addresses

@eamodio eamodio self-requested a review November 28, 2020 07:35
Copy link
Member

@eamodio eamodio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution!

Unfortunately we can't use the gitlens.menus setting as you have here, since it will break how that setting is used elsewhere (since its set as an object). So we'll need to come up with another setting name -- maybe add a new fileAnnotations.command setting, that defaults to null (which would mean show the menu), or be an enum of blame, changes, heatmap. We probably will also need to add a fileAnnotations.diffCommand setting, which is the same as fileAnnotations.command, but can't be set to changes.

@arrpee
Copy link
Contributor Author

arrpee commented Dec 1, 2020

I've combined and replaced the settings with fileAnnotations.command. What would fileAnnotations.diffCommand be used for?

@eamodio
Copy link
Member

eamodio commented Dec 1, 2020

@arrpee Thanks! Looking great!

I currently have the Changes file annotations disabled when you are in a diff editor -- but thinking about that more I don't think that is needed anymore. So I think we can just move ahead without anything like fileAnnotations.diffCommand

README.md Outdated
| Name | Description |
| -------------------------------------- | -------------------------------------------------------------------------------------------------------------------- |
| `gitlens.menus` | Specifies which commands will be added to which menus |
| `gitlens.menus.annotations.behaviour` | Specifies whether the file annotations button in the editor title acts as a menu (default) or a toggle button |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just need to remove this and document the new gitlens.fileAnnotations.command

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've made the changes

@eamodio
Copy link
Member

eamodio commented Dec 2, 2020

Thank you so much for your contribution!

Thank you!

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

Successfully merging this pull request may close these issues.

None yet

2 participants