Skip to content

Major Updates, Overhaul#1

Draft
adizaveri wants to merge 15 commits intomainfrom
major-updates
Draft

Major Updates, Overhaul#1
adizaveri wants to merge 15 commits intomainfrom
major-updates

Conversation

@adizaveri
Copy link
Copy Markdown
Member

@adizaveri adizaveri commented Mar 4, 2026

The JavaScript.html file is used instead of a .gs file because Google Apps Script executes .gs code on the server side, whereas this project requires client-side logic to interact with the browser's Document Object Model (DOM). Since the Google Apps Script editor does not support native .js files, frontend logic must be wrapped in <script> tags within an .html file and injected into the main page using the include() helper function.

Furthermore, JavaScript.html, Index.html, and Stylesheet.html are kept as distinct files to ensure a strict separation of concerns, improving the overall maintainability and readability of the codebase.

- Added case insensitivity and input normalization/sanitation for student names, grades, and time.
- Added error handling for missing sheets, failed sheet operations.
- Greyed out Grade radio button selection. Added help tooltip with instructions for correcting student grade, if incorrect.
- Converted all web push notifications to popups within the webpage itself.
- Made many CSS styling improvements.
- Improved code comments and formatting.
… popup

Also revised CSS class names in `Stylesheet` to ensure inclusivity.
@adizaveri adizaveri self-assigned this Mar 4, 2026
Previously, if the user attempted to submit the form with an amended, non-current time, the current time would still go to the Logs.
Previously, any returning student would face an "Invalid Grade" error message upon attempting to submit the form.
@tomgagnier tomgagnier requested review from paulsp and tomgagnier March 25, 2026 22:47
Comment thread Code.gs
if (data.length > 0) data.shift();
// Sanitize and normalize input
let name = String(formObject.studentName || "").trim();
let normName = name.toLowerCase();
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

consider creating a function safeTrim(..) to avoid repetition

Comment thread Code.gs
}
// Validate Time format (HH:mm)
if (!/^\d{2}:\d{2}$/.test(timeString)) {
return { status: "ERROR", message: "Invalid time format." };
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Improve message to indicate expected format

"Invalid time format, expected HH:MM"

Comment thread Code.gs
const statusCell = sheet.getRange(rowIndex, COL_STATUS);

if (type === "Check In") {
// Set Status text and color
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Comment is good, a constant is better -- LIGHT_GREEN.

Copy link
Copy Markdown

@tomgagnier tomgagnier left a comment

Choose a reason for hiding this comment

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

Looks great -- nice job.

@tomgagnier tomgagnier self-requested a review March 25, 2026 23:00
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