-
Notifications
You must be signed in to change notification settings - Fork 47
Change erick editor bitmap jack #598
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Change erick editor bitmap jack #598
Conversation
subroutineName + | ||
(Math.abs(currentJShift) / marginSaveFrames).toString(); | ||
} | ||
// Fixed name/signature requirements |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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
} else { | ||
} else { |
There was a problem hiding this comment.
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]; | ||
} | ||
} | ||
|
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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> |
There was a problem hiding this comment.
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()"> |
There was a problem hiding this comment.
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> |
There was a problem hiding this comment.
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> |
There was a problem hiding this comment.
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"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sloppy ending whitespace
It looks big , but mostly because I moved divs