TeachKit project

TeachKit / Design system

Documentation v0.1 · Released product

Design system contents

Components

Saving and commit feedback

Explain when course edits are being committed and keep persistence responsibilities in the owner workflow.

On this page

Purpose and usage

Explain when course edits are being committed and keep persistence responsibilities in the owner workflow.

Anatomy

Anatomy
PartContract
ActionSave It! button
BusySaving... and disabled action
TimestampSaved relative time when lastSaved supplied

Variants and configuration

Variants and configuration
Input or variantBehavior
onClickPromise-returning save callback
isSavingExternal busy state combined with localSaving
lastSavedDate or null; refreshed every 30 seconds

State coverage

State coverage
StateImplemented behavior
ReadySave It!
SavingDisabled with Saving... label
SavedRelative timestamp below button
Failure boundaryParent callback and error handling determine recovery

Interaction and composition

  • Set lastSaved only after real persistence success.
  • Do not assume every route uses the separate auto-save helper.
  • The helper debounces changes by 1500ms and PATCHes course data.
  • Keep a failed save visibly recoverable with the edit draft intact.

Accessibility and readiness

SaveButton awaits onClick without finally, so a rejection can leave localSaving true. useAutoSaveCourse logs failures rather than exposing a visible error. These are explicit readiness gaps; demo Saved text is a specimen state, not a successful live save.

Composition example

<SaveButton onClick={saveCourse} isSaving={saving}
  lastSaved={lastSuccessfulSave} />

Source references

Source references
FileResponsibility
src/components/SaveButton.tsxCommit label and relative timestamp
src/hooks/useCourseEditor.tsInitial course hydration
src/hooks/useAutoSaveCourse.tsSeparate 1500ms debounced PATCH helper

Examples from the app

Actual TeachKit UI with Thomas McGee’s course content. Session, progress and connection specimens are simulated; no student data or live changes. Captured at 2× resolution or higher. Select an image to inspect it full size.

Save · Component detail · Light · Desktop · 1920 × 326 px
Creator Basic Info · Screen · Light · Desktop · 2880 × 2000 px
Creator Basic Info · Screen · Light · Desktop · Full Page · 2880 × 2120 px

Source audit: 2026-10-07 · Revision d8cf23d0a329 · Documentation v0.1