Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Additional entry point for review comments #2084

Merged
merged 32 commits into from
Apr 29, 2019

Conversation

kuychaco
Copy link
Contributor

@kuychaco kuychaco commented Apr 18, 2019

Please be sure to read the contributor's guide to the GitHub package before submitting any pull requests.

Requirements

  • Filling out the template is required. Any pull request that does not include enough information to be reviewed in a timely manner may be closed at the maintainers' discretion.
  • Suggestion: You can use checklists to keep track of progress for the sections on metrics, tests, documentation, and user research.

Description of the Change

We received feedback asking to save users clicks when looking at reviews for non-checked out branches. See #2077.

This PR enables users to access reviews for any PR listed in the GitHub tab (not just the checked out PR) via a "See reviews" context menu item.

I also took this opportunity to add a quick way to view the PR on dotcom via a "View on GitHub" context menu item.

Screenshot/Gif

open-reviews

Fullscreen_4_18_19__2_14_PM

Alternate Designs

Initially considered hiding the option behind a right-click context menu, but figured adding a kebab icon would make this more discoverable. The drawback is that the icon takes up some UI real-estate, but in my opinion it's small and discreet enough that it's fine. Open to feedback and other suggestions.

Benefits

Currently, it is only possible to view review comments for the checked out PR from the PR list.

In order to view review comments for a PR that is not checked out the user has to click the desired PR in the PR list to open the PR detail pane item, open the "Files" tab, and click the "See reviews" button in the footer of the tab.

With this change, we increase consistency by allowing the user to open reviews for any PR directly from the PR list. Previously this was only possible for the checked out PR.

Possible Drawbacks

None really... the only mild concern is that the additional icon might increase visual noise.

Applicable Issues

Fixes #2077

Metrics

Adding an event for 'open-reviews-tab'.
Adding an event for 'open-issueish-in-browser' to collect information about the users leaving the editor for the browser.

Tests

Tested openOnGitHub method along with open-issueish-in-browser event firing
Tested that showActionsMenu handler is called when the menu icon is clicked
Currently there is no good way to test Electron Menus.

Documentation

N/A

Release Notes

Access review comments for any PR listed in the GitHub panel via an "ellipses" icon

User Experience Research (Optional)

N/A

@kuychaco kuychaco self-assigned this Apr 18, 2019
@codecov
Copy link

codecov bot commented Apr 18, 2019

Codecov Report

Merging #2084 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2084      +/-   ##
==========================================
+ Coverage   92.55%   92.55%   +<.01%     
==========================================
  Files         207      207              
  Lines       12016    12025       +9     
  Branches     1745     1747       +2     
==========================================
+ Hits        11121    11130       +9     
  Misses        895      895
Impacted Files Coverage Δ
lib/containers/current-pull-request-container.js 100% <ø> (ø) ⬆️
lib/containers/issueish-search-container.js 95.83% <ø> (ø) ⬆️
lib/controllers/issueish-searches-controller.js 73.68% <100%> (+7.01%) ⬆️
lib/views/issueish-list-view.js 97.5% <100%> (+0.35%) ⬆️
lib/controllers/issueish-list-controller.js 100% <100%> (ø) ⬆️
lib/views/reviews-view.js 82.5% <0%> (-0.22%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f98abf3...cff5a35. Read the comment docs.

@aviflax
Copy link

aviflax commented Apr 18, 2019

👋 I’m the user who shared the feedback in #2077. @annthurium pointed me to this PR and I think the change looks great!!!

@@ -63,6 +63,11 @@
text-align: center;
}

&--menu {
color: @text-color-subtle;
transform: rotate(90deg);

Choose a reason for hiding this comment

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

@kuychaco : what's the rationale for rotating the icon?

I'm not a fan for a couple of reasons:

  1. it's inconsistent with other kebab menus in the package such as undo discard which keep the icon in its original orientation.

  2. right now the icon is not vertically centered. It's a lot more annoying to fix when the icon is rotated. If we remove the rotation we can just add a line-height of 1.

Screen Shot 2019-04-19 at 7 48 23 AM

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sounds good! Thanks for making the change!

@kuychaco kuychaco marked this pull request as ready for review April 24, 2019 00:17
@kuychaco kuychaco requested a review from vanessayuenn April 24, 2019 22:54
Copy link
Contributor

@vanessayuenn vanessayuenn left a comment

Choose a reason for hiding this comment

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

I have some small nits with some of the tests, but otherwise this LGTM!

vanessayuenn and others added 2 commits April 25, 2019 15:53
Co-Authored-By: kuychaco <kuychaco@github.com>
Co-Authored-By: Vanessa Yuen <vanessayuenn@users.noreply.github.com>
@kuychaco kuychaco requested a review from vanessayuenn April 25, 2019 22:58
@kuychaco
Copy link
Contributor Author

That pending atom.github [old] check is irrelevant... it's an orphan left over from creating a new Azure pipeline to fix our Azure install. Gonna go ahead and merge this because we have all the green checks we need

@kuychaco kuychaco merged commit c28b7ef into master Apr 29, 2019
@kuychaco kuychaco deleted the ku-open-reviews-from-pr-list branch April 29, 2019 19:27
@smashwilson smashwilson added the feature request 003 Work related to the Pull Request Review feature request label May 3, 2019
@smashwilson smashwilson mentioned this pull request May 8, 2019
11 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature request 003 Work related to the Pull Request Review feature request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

additional entry point for review comments
5 participants