fix: added id to rendered ws comments; made getCommentById public; ad… #8358
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.
…ded blocklyDraggable class to ws comments
The basics
The details
Resolves
Fixes #8242 and #8253
Proposed Changes
This exposes the rendered workspace comment id in the DOM. It also makes the workspace getCommentById function public. It also added the blocklyDraggable class to the DOM of rendered workspace comments.
Reason for Changes
This will help with the support of the implementation of workspace comments in the multiselect plugin. This is mainly needed as the multiselect plugin uses dragSelect to select the elements' DOM. The id in the DOM is then passed to a respective get[element]ById function to manipulate/work with the actual object (in this case workspace comments).
Test Coverage
I tested this by looking at the HTML of the page and seeing whether it had the added classes and data-id field.
Documentation
Documentation regarding rendered workspace comments having a data-id field may be added, but it would not be of the utmost concern.
Additional Information