Skip to content

174: add address option to class creation#195

Merged
talfee merged 1 commit intomainfrom
174
Mar 21, 2026
Merged

174: add address option to class creation#195
talfee merged 1 commit intomainfrom
174

Conversation

@talfee
Copy link
Contributor

@talfee talfee commented Mar 16, 2026

No description provided.

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Mar 16, 2026

Greptile Summary

This PR makes the class location field optional during class creation/editing. It relaxes the locationType validation in the form schema from required to nullish (aligning with the existing UpdateClass API schema), removes the required marker from the Location UI field, and updates placeholder/description text to better guide users ("Zoom link" for online, "address" for in-person).

  • locationType in ClassEditSchema changed from LocationTypeEnum (required) to LocationTypeEnum.nullish(), matching the API's UpdateClass schema
  • Removed the required prop from the Location form field, making it optional for class creators
  • Updated description and in-person placeholder text for clearer UX guidance

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk — small, well-scoped changes to validation and UI text.
  • The changes are minimal and well-aligned with existing patterns. The schema change matches the API schema (UpdateClass already uses nullish()), the form always initializes locationType with a default value via classToFormValues, and the remaining changes are cosmetic text updates. No logic bugs or type-safety issues found.
  • No files require special attention.

Important Files Changed

Filename Overview
src/components/classes/edit/content/class-general-section.tsx Cosmetic changes: removed required from Location field, updated description text and placeholder for in-person location. No logic changes.
src/components/classes/edit/schema.ts Made locationType nullish in the form schema, aligning it with the UpdateClass API schema. The form always initializes with a default value via classToFormValues.

Last reviewed commit: 58d6368

@theosiemensrhodes theosiemensrhodes linked an issue Mar 21, 2026 that may be closed by this pull request
@talfee talfee merged commit a98a128 into main Mar 21, 2026
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.

Add optional location/in-person address to class creation

1 participant