Skip to content
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

fix: Update content highlight when workspace comment is moved. #2381

Merged
merged 1 commit into from
Jun 1, 2024

Conversation

johnnesky
Copy link
Member

The basics

The details

Resolves

Partially addresses #2330

Proposed Changes

This adds COMMENT_MOVE, COMMENT_CREATE, and COMMENT_DELETE to the list of events that can trigger the content highlight boundaries to update.

Reason for Changes

Otherwise the content highlight bounds won't update when workspace comments are moved, and it is possible for a comment to be outside of the bounds.

Test Coverage

N/A

Documentation

N/A

Additional Information

This only partially addresses the situation. I know of two possible improvements, both of which would require updating blockly core to fire additional events related to workspace comments:

  1. Starting to drag a normal block hides the content highlight until you finish the drag, but workspace comments do not fire any event when a drag is started so there's no possibility to handle this case. Instead, the content highlight will remain in place while dragging a workspace comment and will only be updated when the drag is finished.
  2. Resizing a workspace comment does not fire any event and thus cannot update the content highlight. (Also the resize handle can get visually detached from the comment in my testing, but that's a separate bug.)

@johnnesky johnnesky requested a review from a team as a code owner May 31, 2024 01:49
@johnnesky johnnesky requested review from maribethb and removed request for a team May 31, 2024 01:49
Copy link

🤖 I detect that the PR title and the commit message differ and there's only one commit. To use the PR title for the commit history, you can use Github's automerge feature with squashing, or use automerge label. Good luck human!

-- conventional-commit-lint bot
https://conventionalcommits.org/

@johnnesky johnnesky merged commit f769849 into google:master Jun 1, 2024
7 checks passed
@johnnesky johnnesky deleted the nesky_content_highlight branch June 1, 2024 01:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants