-
Notifications
You must be signed in to change notification settings - Fork 688
Add collapsePreexisting setting to keep newly added comments expanded #8270
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
Conversation
Co-authored-by: alexr00 <[email protected]>
Co-authored-by: alexr00 <[email protected]>
alexr00
left a comment
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.
@copilot Actually, add a new options to githubPullRequests.commentExpandState for collapsePreexisting and use that value instead.
Co-authored-by: alexr00 <[email protected]>
Done! I've added a new |
Co-authored-by: alexr00 <[email protected]>
Co-authored-by: alexr00 <[email protected]>
…eads Co-authored-by: alexr00 <[email protected]>
alexr00
left a comment
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.
@copilot don't base it off of the current user, just base it off of a comment being added.
…t from current user Co-authored-by: alexr00 <[email protected]>
Updated! The logic now detects any newly added comment (regardless of author) and keeps it expanded when |
Co-authored-by: alexr00 <[email protected]>
Summary
This PR adds a new
collapsePreexistingoption to thegithubPullRequests.commentExpandStatesetting that addresses the issue where newly created comments immediately collapse when using thecollapseAllsetting.Users can now select
collapsePreexistingto collapse all pre-existing comments while keeping newly added comments expanded, allowing them to review what was just added.Changes Made
Added new setting option: Added
collapsePreexistingas a third option togithubPullRequests.commentExpandStatesetting inpackage.jsonandpackage.nls.jsonUpdated comment collapse logic: Modified
getCommentCollapsibleState()insrc/github/utils.tsto:collapsePreexistingand if the comment was newly addedEnhanced threading functions: Updated
updateThreadWithRange()andupdateThread()to accept anisNewlyAddedparameter to detect when a comment thread is being addedUpdated controllers: Modified both
pullRequestCommentController.tsandreviewCommentController.tsto:isNewlyAdded: truewhen updating newly added threadsHow It Works
When a user selects the
collapsePreexistingoption:Files Modified
package.json- Added new enum valuecollapsePreexistingto settingpackage.nls.json- Added localized description for new settingsrc/github/utils.ts- Updated logic to useisNewlyAddedflagsrc/view/pullRequestCommentController.ts- PassisNewlyAdded: truefor newly added threadssrc/view/reviewCommentController.ts- PassisNewlyAdded: truefor newly added threadsTesting
Original prompt
collapseAll#6503💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.