Skip to content
This repository has been archived by the owner on Jun 21, 2023. It is now read-only.

Add tooltips to View Pull Request buttons #827

Merged
merged 1 commit into from
Feb 24, 2017
Merged

Conversation

jcansdale
Copy link
Collaborator

This is a fix for #824.
The heading link now says: "View Pull Request details".
The # link now says: "View Pull Request details".

@jcansdale
Copy link
Collaborator Author

jcansdale commented Feb 1, 2017

Hovering over title:
image

Hovering over # link:
image

@@ -57,7 +57,7 @@
TextTrimming="CharacterEllipsis"
Margin="0,-3,5,0"
Content="{Binding Title}"
ToolTip="{Binding Title}"
ToolTip="View Pull Request details"
Copy link
Contributor

Choose a reason for hiding this comment

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

We normally put strings like this in the resources file for when we start adding in translations.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I thought that might be the case! I'll fix it. 👍

Copy link
Contributor

Choose a reason for hiding this comment

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

Each project has its own resx file, I forget which project this code belongs to 😆 but it should be there.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thanks @paladique for the links!
https://github.com/github/VisualStudio/blob/396baff13f4cecb0a035f6a7569a23a929652900/src/GitHub.VisualStudio.UI/Resources.resx

Here's an example of how we do it within this project

<Hyperlink x:Name="pricingLink" ToolTip="https://github.com/pricing"><TextBlock Text="{x:Static prop:Resources.SignUpLink}"/></Hyperlink>

Copy link
Collaborator Author

@jcansdale jcansdale Feb 1, 2017

Choose a reason for hiding this comment

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

@paladique There doesn't appear to be a Resources.resx file in the GitHub.VisualStudio project, which is where the PullRequestListItem.xaml file lives. I'm not sure where the command description really belongs. Should it be in the same assembly as the ViewModels (which controls other text that appears on the view). Maybe @grokys has some opinions?

Copy link
Contributor

Choose a reason for hiding this comment

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

@jcansdale ah yes! It lives in GitHub.VisualStudio.UI

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I see now, 👍
xmlns:prop="clr-namespace:GitHub.VisualStudio.UI;assembly=GitHub.VisualStudio.UI"

@jcansdale
Copy link
Collaborator Author

This link should also say 'View Pull Request on GitHub'. Dow!
image

Do we have a description associated with commands? I'll have a poke around...

@shana
Copy link
Contributor

shana commented Feb 1, 2017

Do we have a description associated with commands? I'll have a poke around...

Probably not? It might be worth doing the tooltip for that in a separate PR, not sure if it's going to involve more code than this one needs.

Copy link
Contributor

@haacked haacked left a comment

Choose a reason for hiding this comment

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

Just one question.

@@ -110,6 +110,7 @@
Command="{Binding OpenPROnGitHub, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:PullRequestListView}}}"
CommandParameter="{Binding Number}"
Content="{Binding Number}"
ToolTip="View Pull Request on GitHub"
Copy link
Contributor

Choose a reason for hiding this comment

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

What about GitHub Enterprise instances? Usually we'd do something like:

  1. For GitHub.com: `View Pull Request on GitHub"
  2. For Enterprise: View Pull Request on xyz.com where xyz.com is the domain of the enterprise instance.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Well, that would make the PR a little more interesting. 😉

I was thinking GitHub the application as opposed to github.com the site. Can I claim president for this interpretation?

image
(the ghe.io search also says "Search GitHub")

My instinct would be to KISS. What do you think?

Copy link
Contributor

Choose a reason for hiding this comment

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

KISS is good.

Copy link
Contributor

Choose a reason for hiding this comment

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

We already do the distinction between "GitHub" and "explicit server name" in the TE home section title and the Connect section title, and there's already code readily available to do this, if that's what's worrying you 😄

@jcansdale
Copy link
Collaborator Author

Updated with @paladique's suggestion to use text from GitHub.VisualStudio.UI resources. 😄

@grokys
Copy link
Contributor

grokys commented Feb 14, 2017

To be honest, I'm not sure about replacing the tooltip that gives the title of the PR. It's a common pattern that when you have possibly truncated text to use the tooltip to display the non-truncated text, and that's what we were doing here. I personally find this behavior useful as my PR list is frequently not wide enough to display the PR title:

image

@jcansdale
Copy link
Collaborator Author

I personally find this behavior useful as my PR list is frequently not wide enough to display the PR title

This makes sense.

What about the other links. Do you think it makes sense to let the user know they're about to open a browser?

@grokys
Copy link
Contributor

grokys commented Feb 14, 2017

Yeah, the "View Pull Request on GitHub" message on the # link definitely makes sense.

@jcansdale jcansdale removed the request for review from shana February 24, 2017 13:36
@jcansdale
Copy link
Collaborator Author

Reverted tooltip that gives the title of the PR. This PR makes me feel like a heavyweight! 😉

@grokys If you're happy, could you approve and merge?

@grokys grokys merged commit 08091ab into master Feb 24, 2017
@grokys grokys deleted the fixes/824-button-tooltips branch February 24, 2017 14:00
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants