Skip to content

A new addon for block comment alignment - #9118

Open
DNin01 wants to merge 10 commits into
ScratchAddons:masterfrom
DNin01:shift-align-comments
Open

A new addon for block comment alignment#9118
DNin01 wants to merge 10 commits into
ScratchAddons:masterfrom
DNin01:shift-align-comments

Conversation

@DNin01

@DNin01 DNin01 commented Jul 22, 2026

Copy link
Copy Markdown
Member

Better Editor Comments addon removal

All of the addon patches in fix-editor-comments were fixed in the current version of Scratch (hooray! 🎉) so those settings are no longer necessary. With only the "Keep connections straight" feature left, I created a dedicated addon, "Horizontally aligned comments," to take its place.

The Shift key update

I also updated how the alignment feature works. The alignment feature is nice if you like comments to be directly to the right of the block they're attached to. But what if you only want to do this for particular comments?

So, I made it require holding a key by default, and it now aligns the comment as you drag it, not just when you let go. This was inspired by snapping features in image/graphic editors.

Aligning.an.attached.comment.mp4

For users who had the "Keep connections straight" setting enabled, this addon and its "Flip controls" setting will be enabled automatically to preserve user preferences. Otherwise, both must be enabled by the user.

"New" tag behavior

This addon has both a versionAdded and latestUpdate in order to display an update-styled notice while still being displayed as new. Normally, this would cause a "new features" or "new settings" tag to appear next to the "new" tag, but the settings page code has been modified so that doesn't happen.


I tested these changes and the setting migration works.

@DNin01 DNin01 added this to the v1.46.0 milestone Jul 22, 2026
@DNin01
DNin01 requested review from Samq64 and mxmou July 22, 2026 03:39
@DNin01
DNin01 requested a review from WorldLanguages as a code owner July 22, 2026 03:40
@DNin01 DNin01 added type: enhancement New feature for the project scope: addon Related to one or multiple addons labels Jul 22, 2026
Comment thread addons/editor-straight-comments/addon.json Outdated
Comment thread addons/editor-straight-comments/addon.json Outdated
@DNin01

DNin01 commented Aug 5, 2026

Copy link
Copy Markdown
Member Author

Addon details updated.

@DNin01
DNin01 requested a review from mxmou August 5, 2026 21:41
@mxmou

mxmou commented Aug 6, 2026

Copy link
Copy Markdown
Member

While testing, I noticed that there's currently a bug that makes block comments revert to their original position after switching sprites. That makes an addon like this not very useful - maybe we should wait until it's fixed?

@DNin01

DNin01 commented Aug 6, 2026

Copy link
Copy Markdown
Member Author

While testing, I noticed that there's currently a bug that makes block comments revert to their original position after switching sprites. That makes an addon like this not very useful - maybe we should wait until it's fixed?

How do you trigger that bug? What project(s) is it happening in? I'm not spotting any problems myself.

It might have to do with the fact that the new addon's userscript overrides onDrag but not onDragEnd.

Edge 151

@mxmou

mxmou commented Aug 6, 2026

Copy link
Copy Markdown
Member

It might have to do with the fact that the new addon's userscript overrides onDrag but not onDragEnd.

I thought it was a vanilla bug because I could reproduce it without your addon enabled, but disabling SA fixes it. I'll try to find the addon that is causing it.

Edit: see #9151.

Comment thread addons/editor-straight-comments/addon.json Outdated
Comment thread background/get-addon-settings.js Outdated
Comment thread webpages/settings/index.js Outdated
@DNin01
DNin01 requested a review from mxmou August 7, 2026 00:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope: addon Related to one or multiple addons type: enhancement New feature for the project

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants