google / blockly

The web-based visual programming editor.
https://developers.google.com/blockly/
Apache License 2.0
12.53k stars 3.72k forks source link

fix: Let workspace comment have delete cursor over trash. #8477

Closed johnnesky closed 3 months ago

johnnesky commented 3 months ago

The basics

The details

Resolves

Fixes https://github.com/google/blockly/issues/8413

Proposed Changes

This removes an obsolete CSS property on the workspace comment top bar that overrides the mouse cursor style to be the grab cursor. Other CSS rules affecting the workspace comment have the same cursor, and additionally switch to a different cursor when dragging over the trash can, so removing this property allows those switches to take effect.

Reason for Changes

The CSS property was added in https://github.com/google/blockly/commit/e4b734c0db537032a36ae907ba7af20bb5bb41f7 a couple months ago and was necessary at the time because there wasn't any other style at the time that provided the drag cursor for workspace comments. However, https://github.com/google/blockly/commit/4cdca28fe5c92ce883cc597d517d01531bf8770e was added more recently and provides the drag cursor for the parent element along with the necessary variations, making the previous commit obsolete.

Test Coverage

I manually tested the mouse cursor behavior for dragging workspace comments over the trash can.