Skip to content

Conversation

@changminbark
Copy link
Contributor

The basics

The details

Resolves

Fixes #8531

Proposed Changes

Added the isDeadOrDying() checks for the workspace comment's isDeletable and comment drag strategy's isMovable methods (such as the ones that are already implemented for blocks.

image
image

Reason for Changes

Fixes a bug in the multiselect plugin:
After multiselecting comments, copy/pasting them, and then undoing that action does not get rid of the comments from the multiselection. This is usually not a problem as it also happens to blocks. However, the blocks and comments have different isMovable (drag strategy) and isDeletable methods, which lead to a breaking behavior in the multiselect plugin. I have already tested a fix for this by implementing the missing isDeadOrDying() check for the isMovable and isDeletable methods for comments.

Test Coverage

Documentation

Additional Information

Copy link
Contributor

@HollowMan6 HollowMan6 left a comment

Choose a reason for hiding this comment

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

There are some formatting issue here as well (CI fails)

Copy link
Collaborator

@cpcallen cpcallen left a comment

Choose a reason for hiding this comment

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

Change seems pretty reasonable even absent any context other than that it makes comments consistent with blocks, so I'll go ahead and approve this.

There is one other thing, though: screenshots are not very searchable. Can you supplement them with markdown-formatted text and/or (since they seem to be screenshotted from another GitHub conversation) a link to wherever page they originally came from (if public)?

@cpcallen cpcallen changed the title Fix: added workspace comments and comment drag strategy isDeadOrDying() checks fix: added workspace comments and comment drag strategy isDeadOrDying() checks Aug 21, 2024
@cpcallen cpcallen changed the title fix: added workspace comments and comment drag strategy isDeadOrDying() checks fix(comments): added workspace comments and comment drag strategy isDeadOrDying() checks Aug 21, 2024
@github-actions github-actions bot added PR: fix Fixes a bug and removed PR: fix Fixes a bug labels Aug 21, 2024
@cpcallen
Copy link
Collaborator

cpcallen commented Sep 3, 2024

I'm going to go ahead and merge this, but @changminbark please update the description to make it easer to search.

@cpcallen cpcallen merged commit 4d0fd5d into RaspberryPiFoundation:develop Sep 3, 2024
@changminbark changminbark changed the title fix(comments): added workspace comments and comment drag strategy isDeadOrDying() checks fix(comments): added workspace comments and comment drag strategy isDeadOrDying() checks (for multiselect plugin) Sep 3, 2024
@github-actions github-actions bot added PR: fix Fixes a bug and removed PR: fix Fixes a bug labels Sep 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Workspace comments and comment drag strategy undo bug with multiselect plugin

3 participants