-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Feature: Link from code to GitHub via context menus #191
Conversation
Quick stub of the VS file apis required for a potential "Get Link" feature - gets the current file name and line number to build a github url of it for sharing.
Tests are failing on the buildbot and it looks like it's because one test is clobbering data for another test. The only thing these tests share is the global ServiceProvider set, so put these test classes in the same collection so xunit doesn't parallelize them.
People gonna be upset if we add too much to the context menu. If there isn't already a grouping that makes sense, we should group our commands in a top level "GitHub" menu. |
👍 I can see us having to do this anyway as we integrate more features (such as creating a gist.) |
public static string CurrentSha(this ISimpleRepositoryModel repository) | ||
{ | ||
var repo = GitService.GitServiceHelper.GetRepo(repository.LocalPath); | ||
return repo.Commits.FirstOrDefault()?.Sha; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could repo
be null here? Should this be repo?.Commits.FirstOrDefault()?.Sha
?
@haacked Would love to, but unfortunately it seems VS does not support icons on menu entries that lead to submenus 😢 |
😢 /cc @acangialosi feature request! |
@shana I just have the one question about the private class that's exported. |
@haacked I've gone and 🔨 all the things you mentioned. I still need to fix the icons so they look half decent, so don't merge this quite yet. |
Slowly takes finger off the big green button |
@shana A+ |
Any xaml file that includes a SharedDictionaryManager resource dictionary with the uri "Theme.xaml" will get a themed dictionary included instead that tracks the VS theme and gets switched at runtime whenever the VS theme changes.
Are these colors just for demonstrating how theming works? |
@donokuda Yeah, I couldn't actually tell the difference. I'm actually using the same color for those icons on all three themes, and VS is apparently inverting the color on the dark theme when rendering the icons (got me so confused initially when I set it to white and it showed up black and vice-versa...), so I set them to RGB to make sure it was working (and recorded proof for future self) |
👍 That's what I thought. Love this! |
This feature feels like magic! |
Feature: Link from code to GitHub via context menus
How does one activate this? |
Fixes #106
This needs: