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

Display Pull Request Reviews for a User. #1545

Merged
merged 16 commits into from Apr 9, 2018

Conversation

@grokys
Copy link
Contributor

@grokys grokys commented Mar 20, 2018

When the user clicks on a "Reviewer" item in the PR details view, navigate to a new view to show the PR reviews by that user.

image

This PR also introduces:

  • A new global style for Expander: the default WPF expander style doesn't fit in well with Visual Studio
  • A TrimmedPathTextBlock control to intelligently trim paths (see screenshot above)

Depends on #1523
Part of #1491

grokys added 11 commits Mar 19, 2018
Need to make sure we match the start and end of the string.
We need to be able to read a user model by their login from the API.
This is needed to ensure comment summaries appear without newlines.
Displays a path and intelligently trims with ellipsis when the path doesn't fit in the allocated size.
The default expander style doesn't fit with the VS UI theme - set a new default style which uses a triangle octicon.
When the user clicks on a "Reviewer" item in the PR details view, navigate to a new view to show the PR reviews by that user.
And refactored the `PullRequestUserReviewsViewModel` a little bit to remove stuff that is no longer necessary.
@grokys grokys changed the base branch from feature/pr-reviews-master to feature/pr-details-review-list Mar 20, 2018
grokys added 2 commits Mar 20, 2018
Use the same triangle as used elsewhere (e.g. in `SectionControl`).
Fix a few theming issues.
@grokys grokys changed the title WIP: Display Pull Request Reviews for a User. Display Pull Request Reviews for a User. Mar 20, 2018
@grokys grokys changed the base branch from feature/pr-details-review-list to feature/pr-reviews-master Mar 20, 2018
@grokys grokys mentioned this pull request Mar 20, 2018
17 of 17 tasks complete
@meaghanlewis
Copy link
Contributor

@meaghanlewis meaghanlewis commented Mar 26, 2018

This LGTM 👍

@jcansdale jcansdale changed the base branch from feature/pr-reviews-master to feature/pr-reviews Apr 4, 2018
@jcansdale jcansdale changed the base branch from feature/pr-reviews to feature/pr-reviews-master Apr 4, 2018
string RelativePath { get; }

/// <summary>
/// Gets a comment which opens the comment in a diff view.

This comment has been minimized.

@jcansdale

jcansdale Apr 4, 2018
Collaborator

Should this be simply, "Opens the comment in a diff view"?

This comment has been minimized.

@grokys

grokys Apr 4, 2018
Author Contributor

Ah, should be "Gets a command...". If you look around at C# documentation, properties always start with "Gets a" (for read-only properties) or "Gets or sets a" (for read/write properties). See https://softwareengineering.stackexchange.com/questions/193244/is-the-gets-or-sets-necessary-in-xml-documentation-of-properties and http://stylecop.soyuz5.com/SA1623.html.

This comment has been minimized.

@jcansdale

jcansdale Apr 4, 2018
Collaborator

Thanks, I hadn't noticed that convention.

{
var text = value as string;
if (String.IsNullOrEmpty(text)) return null;
return Regex.Replace(text, @"\t|\n|\r", " ");

This comment has been minimized.

@jcansdale

jcansdale Apr 4, 2018
Collaborator

We we want to replace tabs with a single space as well?

This comment has been minimized.

@grokys

grokys Apr 4, 2018
Author Contributor

If we're displaying a comment on a single line, it would make sense to me to convert tabs to spaces, because otherwise we'd be wasting space. Tabs are generally used for alignment between lines, so if we've got no lines it makes sense to strip them. Do you have an example where this wouldn't be a good idea?

This comment has been minimized.

@jcansdale

jcansdale Apr 4, 2018
Collaborator

Oh, I was just comparing it to the comment: "trims newlines from a string and replaces them with spaces".

@grokys
Copy link
Contributor Author

@grokys grokys commented Apr 5, 2018

@jcansdale addressed your feedback.

@grokys grokys merged commit bff9aac into feature/pr-reviews-master Apr 9, 2018
2 checks passed
2 checks passed
continuous-integration/appveyor/branch AppVeyor build succeeded
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
@grokys grokys deleted the feature/pr-user-reviews branch Apr 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.