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

Group resolved comments #2117

Merged
merged 11 commits into from May 7, 2019

Conversation

Projects
2 participants
@vanessayuenn
Copy link
Contributor

commented May 2, 2019

Description of the Change

Screenshot/Gif

Kapture 2019-04-29 at 18 08 38

Alternate Designs

I experimented with using filter toggle but the user experience feels clunky, and with the current design, there isn't really a natural placement for the toggle.

Benefits

Resolved comments are moved out of the way, further encouraging the use of review comments as a to-do list behaviour model.

Possible Drawbacks

It might confuse users slightly when the resolved comment gets moved to another location. The highlighting should mitigate this confusion, but the problem can still exist for cases where there are many comments. However, the current implementation of collapsing comments immediately after resolving is probably just as confusing, so I don't see this feature making the experience worse.

Applicable Issues

#2078

Metrics

Tests

TBD: still working on them!

Release Notes

Group resolved review comments into its own list.

@codecov

This comment has been minimized.

Copy link

commented May 2, 2019

Codecov Report

Merging #2117 into master will decrease coverage by 0.01%.
The diff coverage is 92%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2117      +/-   ##
==========================================
- Coverage   92.65%   92.63%   -0.02%     
==========================================
  Files         207      207              
  Lines       12045    12040       -5     
  Branches     1764     1747      -17     
==========================================
- Hits        11160    11153       -7     
- Misses        885      887       +2
Impacted Files Coverage Δ
lib/controllers/reviews-controller.js 100% <100%> (ø) ⬆️
lib/views/reviews-view.js 87.8% <81.81%> (+4.57%) ⬆️
lib/containers/user-mention-tooltip-container.js 0% <0%> (-100%) ⬇️
lib/containers/issueish-tooltip-container.js 14.28% <0%> (-85.72%) ⬇️
lib/models/issueish.js 83.33% <0%> (-0.46%) ⬇️
lib/helpers.js 89.95% <0%> (-0.05%) ⬇️
lib/items/issueish-detail-item.js 98.36% <0%> (-0.03%) ⬇️
lib/items/changed-file-item.js 100% <0%> (ø) ⬆️
lib/views/issue-detail-view.js 100% <0%> (ø) ⬆️
lib/views/pr-detail-view.js 100% <0%> (ø) ⬆️
... and 5 more

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 a36da88...200dcc2. Read the comment docs.

@vanessayuenn vanessayuenn marked this pull request as ready for review May 6, 2019

@vanessayuenn vanessayuenn requested a review from atom/github-package May 6, 2019

@smashwilson
Copy link
Member

left a comment

👍 LGTM!

return {commentSectionOpen: true, scrollToThreadID: initThreadID};
}, () => {
setTimeout(() => this.setState({scrollToThreadID: null}), FLASH_DELAY);

This comment has been minimized.

Copy link
@smashwilson

smashwilson May 7, 2019

Member

I wish we had a way to collapse the setState updater functions from here and highlightThread into a single, atomic transaction. I'm pretty sure that's how it's working anyway and this is much cleaner but still 😛

return null; // shh, eslint
});
}
this.scrollToThread(scrollToThreadID);

This comment has been minimized.

Copy link
@smashwilson
@@ -308,7 +299,8 @@ export default class ReviewsView extends React.Component {
return null;
}

const resolvedThreads = commentThreads.filter(pair => pair.thread.isResolved).length;

This comment has been minimized.

Copy link
@smashwilson

smashwilson May 7, 2019

Member

Hah, should have called this resolvedThreadCount or something before. 👍

if (threadHolder) {
threadHolder.map(element => {
element.scrollIntoViewIfNeeded();
return null; // shh, eslint

This comment has been minimized.

Copy link
@smashwilson

smashwilson May 7, 2019

Member

I really need to make a RefHolder::forEach method to make these cases nicer...

}
}

async resolveUnresolveThread(thread) {

This comment has been minimized.

Copy link
@smashwilson

smashwilson May 7, 2019

Member

We keep hitting situations where we need to name methods that toggle something without having a good word for the toggling action. There isn't really a good alternative for this:

  • resolveOrUnresolveThread()
  • toggleThreadResolution()
  • ... ?

@vanessayuenn vanessayuenn merged commit 20ebd0f into master May 7, 2019

14 checks passed

atom.github Build #20190506.10 succeeded
Details
atom.github (Lint) Lint succeeded
Details
atom.github (Linux beta) Linux beta succeeded
Details
atom.github (Linux dev) Linux dev succeeded
Details
atom.github (Linux stable) Linux stable succeeded
Details
atom.github (MacOS beta) MacOS beta succeeded
Details
atom.github (MacOS dev) MacOS dev succeeded
Details
atom.github (MacOS stable) MacOS stable succeeded
Details
atom.github (Snapshot) Snapshot succeeded
Details
atom.github (Windows beta) Windows beta succeeded
Details
atom.github (Windows dev) Windows dev succeeded
Details
atom.github (Windows stable) Windows stable succeeded
Details
codecov/patch 92% of diff hit (within 2% threshold of 92.65%)
Details
codecov/project 92.63% (-0.02%) compared to a36da88
Details

@vanessayuenn vanessayuenn deleted the vy/review-comments-grouping branch May 7, 2019

@smashwilson smashwilson added this to In progress in Sprint : 4 April 2019 - 8 May 2019 : v0.29.0 via automation May 8, 2019

@smashwilson smashwilson moved this from In progress to Merged in Sprint : 4 April 2019 - 8 May 2019 : v0.29.0 May 8, 2019

@smashwilson smashwilson referenced this pull request May 8, 2019

Closed

v0.29.0-0 QA Review #2129

11 of 11 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.