Thanks to visit codestin.com
Credit goes to GitHub.com

Skip to content

Left-align short list reporter labels#510

Open
tjvr wants to merge 1 commit intomainfrom
506-left-align
Open

Left-align short list reporter labels#510
tjvr wants to merge 1 commit intomainfrom
506-left-align

Conversation

@tjvr
Copy link
Member

@tjvr tjvr commented Apr 14, 2024

Scratchblocks has always centered the labels inside reporters with short names. It turns out Scratch (by mistake?) left-aligns some reporters, including list reporters.

Closes #506.

(v)

(l :: list)

scratchblocks(3)

Thanks to @husqwc for reporting!

// Center the label text inside reporters with short names.
//
// Scratch doesn't do this for lists for some reason??
if (this.isReporter && this.info.category !== "list") {
Copy link
Member Author

Choose a reason for hiding this comment

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

I've made this "is not list" rather than "is variable or parameter" because it will only matter in the case of a very short e.g. Motion reporter block, and I'm not aware of any -- I'll update this if we find one (in a non-English language maybe)?

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't know if I've made this clear or not but the (x) motion block is a real Scratch block, it's the (x position) block in Czech

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh good to know, thank you!

Copy link
Member Author

Choose a reason for hiding this comment

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

I'll update this.

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.

Short reporter block names don't center correctly

2 participants