Skip to content

Fix extra vertical line on Zelos hat blocks#385

Draft
google-labs-jules[bot] wants to merge 2 commits intodevelopfrom
fix-zelos-hat-line
Draft

Fix extra vertical line on Zelos hat blocks#385
google-labs-jules[bot] wants to merge 2 commits intodevelopfrom
fix-zelos-hat-line

Conversation

@google-labs-jules
Copy link

This patch fixes a visual bug in the Zelos renderer where blocks with hats had an extra vertical line on their right side.

The fix involves overriding the drawTop_ method in the Zelos drawer to conditionally draw the right-side vertical line of the top row. The line is now only drawn if the block does not have a hat, or if there is a block actively connected to its next connection.

Blocks with hats in the Zelos renderer would sometimes have an extra vertical line segment drawn on their right side when no block was connected below them.

This was caused by the `drawTop_` method in the common drawer unconditionally drawing a vertical line for the top row, which was not coordinated with the rest of the block's path drawing for this specific case.

The fix is to override `drawTop_` in the Zelos drawer and only draw the vertical line if the block does not have a hat, or if a block is connected to its next connection. This is determined by checking the `isConnected()` status of the next connection.
Blocks with hats in the Zelos renderer would sometimes have an extra vertical line segment drawn on their right side when no block was connected below them.

This was caused by the `drawTop_` method in the common drawer unconditionally drawing a vertical line for the top row, which was not coordinated with the rest of the block's path drawing for this specific case.

The fix is to override `drawTop_` in the Zelos drawer and only draw the vertical line if the block does not have a hat, or if a block is connected to its next connection. This is determined by checking the `isConnected()` status of the next connection.
@google-labs-jules
Copy link
Author

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

I will automatically address your comments and implement changes based on your feedback. For any comments you don't want me to act on, just include `(aside)`.


For security, I will only act on instructions from the user who triggered this task for this pull request.

@BeksOmega BeksOmega changed the base branch from master to develop August 30, 2025 01:19
Copy link
Owner

@BeksOmega BeksOmega left a comment

Choose a reason for hiding this comment

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

Can you also run a frontend verification on this?

}
}

protected override drawTop_() {
Copy link
Owner

Choose a reason for hiding this comment

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

I don't think the changes are needed at the zelos level, I think they need to be one level up in the common/drawer

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.

1 participant