Add support for multiple comments on the same Range #459
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
One sentence summary of this PR (This should go in the CHANGELOG!)
Added support for multiple comments on the same Range
Link to Related Issue(s)
#458
Please describe the changes in your request.
Refactored
CommentsAttributes.comments
to from the current comments: Dict[Optional[Range], str] to comments: Dict[Optional[Range], List[str]]. Adjustedcomments.py
, the web API, and the frontend to account for this. Also adjustedtest_comments.py
for more coverage on the new format. The interface for adding a comment incomments.py
(AddCommentModifierConfig
) has not been changed, but the interface for deleting a comment (DeleteCommentModifierConfig
) has been.DeleteCommentModifierConfig
has been modified in a way that should remain backwards compatibility - creating aDeleteCommentModifierConfig
with thecomment_range
of the old type,Optional[Range]
will still work with the new type:Tuple[Optional[Range], Optional[str]]
, as the post-init hook will automatically convert it.test_comments.py
has also been adjusted and expanded.Anyone you think should look at this, specifically?
@rbs-jacob