Skip to content

Conversation

renanbazinin
Copy link
Contributor

It looks big , but mostly because I moved divs

subroutineName +
(Math.abs(currentJShift) / marginSaveFrames).toString();
}
// Fixed name/signature requirements
Copy link
Collaborator

Choose a reason for hiding this comment

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

This comment doesn't add anything


if (document.getElementById("jackCode").checked) {
if (currentCodeMode === "jack") {
// Always generate a Jack function with this signature
Copy link
Collaborator

Choose a reason for hiding this comment

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

Again, no value from this comment

Comment on lines -624 to +617
} else {
} else {
Copy link
Collaborator

Choose a reason for hiding this comment

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

This change in whitespace looks sloppy

newGrid[i][j] = grid[i][j];
}
}

Copy link
Collaborator

Choose a reason for hiding this comment

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

I like to keep a blank line after closing braces and new statements at the same block level

document.getElementById("baseBottomLeft").disabled = true;
document.getElementById("codeTypeHeader").textContent =
"Generated Hack Assembly";
// Update header text based on current mode
Copy link
Collaborator

Choose a reason for hiding this comment

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

Comments should say how or why, not what

<th align="left">
<span id="codeTypeHeader">Generated Jack Code</span>
<form action="javascript:ResetSize()">
<label for="inputWidth">Canvase Size: </label>
Copy link
Collaborator

Choose a reason for hiding this comment

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

"Canvas", not "Canvase"; no trailing space. Labels should typically wrap their inputs, but in this case, there's two inputs, so the accessibility is going to suffer a bit. Maybe

<span>Canvas <label>Width <input id=... /></label> <label>Height <input id=.../></label> <label>Pixel Size <input.../></label></span>

<th align="left">Bitmap</th>
<th align="left">
<span id="codeTypeHeader">Generated Jack Code</span>
<form action="javascript:ResetSize()">
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is a very atypical way to use forms and form actions. You should probably just add the behaviors as click handlers in JavaScript.

</th>
<th align="left">
<div class="tab-container">
<button id="jackTab" class="tab-button active" onclick="SwitchToJack()">Generated Jack Code</button>
Copy link
Collaborator

Choose a reason for hiding this comment

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

(Optional) Not the best treatment, a dropdown or button group would be better, but hey, this is something & we don't have a component library for this file.

</p>
<p></p>

<p></p>
Copy link
Collaborator

Choose a reason for hiding this comment

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

No need for an empty paragraph, is there?

<table>
<tr>
<td align="center">
<td align="center">
Copy link
Collaborator

Choose a reason for hiding this comment

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

Sloppy ending whitespace

@renanbazinin renanbazinin marked this pull request as draft September 29, 2025 12:16
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