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

#482 Add Mark as Un/reviewed options to files in code review mode #483

Conversation

dan1994
Copy link
Contributor

@dan1994 dan1994 commented Mar 13, 2021

Closes #482

Added two context menu actions: Mark as reviewed and mark as unreviewed.

mhutchie and others added 15 commits June 14, 2020 17:24
This required separating the functionality of changing the last viewed
file that was coupled with marking the file as reviewed.
marked as reveiewed but not opened.

Added a parameter to the codeReviewFileReviewed message that specifies
whether the file was actually opened. This is set to true except when
the user uses the Mark as Reviewd option.
This was done both in frontend and backend, with a single message
"updateCodeReview".
The lastViewedFile is updated in the backend through this message, but
updated in the frontend in a seperate function (setLastViewedFile) since
in the backend it is considered part of the code review.
Since the backend only changes last viewed file when dealing with
code reviewes, it makes sense to do the same in the frontend as well.
This also prevents code duplication.
Backend was not updated correctly when file is marked as reviewed.
@dan1994 dan1994 requested a review from mhutchie as a code owner March 13, 2021 19:08
@dan1994 dan1994 changed the title 482-Add-Mark-as-Un/reviewed-options-to-files-in-code-review-mode #482 Add Mark as Un/reviewed options to files in code review mode Mar 13, 2021
mhutchie pushed a commit that referenced this pull request Mar 14, 2021
…ile context menu in the Commit Details View when a Code Review is in progress. Squash Merge of @dan1994's PR #483.
Copy link
Owner

@mhutchie mhutchie left a comment

Choose a reason for hiding this comment

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

This PR was really well written and thorough! I just made some trivial minor changes before merging this PR:

  • ExtensionState.updateCodeReview now returns a promise, so it can return the result of ExtensionState.setCodeReviews, in addition to the error message you added when the Code Review could not be found.
  • Updated the unit tests to follow the Setup, Run, Assert pattern used across all unit tests in this repository. This is just a convention to make separate the stages of steps to make them easier to read.
  • GitGraphView.cdvChangeFileReviewedState now accepts a file: GitFileChange, instead of the filePath: string, just to remove some code duplication when it's being called.
  • Reworded the unreview action to be "Mark as Not Reviewed" based on some user feedback I got.
  • Removed the changes to the trailing whitespace on some unrelated comments, just to remove the noise from this PR. I'll include this in a code clean up commit I was going to do today/tomorrow with some other changes that aren't bound to a specific feature.

@mhutchie
Copy link
Owner

Hi @dan1994,

Thanks again for your contribution to Git Graph, I'm sure many users will value this new capability you've added!

I've squash merged this PR in 556e494.

Later this afternoon I'll be releasing the next beta release (which will be the first to include this feature). I'll reply and close the feature request #482 when this occurs, and provide instructions for how to manually install it.

@mhutchie mhutchie closed this Mar 14, 2021
@dan1994
Copy link
Contributor Author

dan1994 commented Mar 14, 2021

Glad to be of help

@dan1994 dan1994 deleted the 482-Add-Mark-as-Un/reviewed-options-to-files-in-code-review-mode branch March 19, 2021 09:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add "Mark as Un/reviewed" options to files in code review mode
2 participants