-
Notifications
You must be signed in to change notification settings - Fork 269
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
#482 Add Mark as Un/reviewed options to files in code review mode #483
Conversation
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.
Fixes dan1994/vscode-git-graph#1
There was a problem hiding this 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 ofExtensionState.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 afile: GitFileChange
, instead of thefilePath: 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.
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. |
Glad to be of help |
Closes #482
Added two context menu actions: Mark as reviewed and mark as unreviewed.