-
Notifications
You must be signed in to change notification settings - Fork 3
Add Genesis section to README #22
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
Closed
Closed
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
7a97191
Add Genesis section to README with project origin story
damienriehl a54e249
Merge branch 'main' into release/v0.2.0
damienriehl 7e1cee6
refactor: move auto-save affordance bar to pinned edit toolbar
damienriehl be2134e
Add standalone output for Railway Docker deployment
damienriehl b6c3ee3
Add public directory for Docker build
damienriehl File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,140 @@ | ||
| "use client"; | ||
|
|
||
| import { Cloud, Loader2, Check, AlertTriangle, Save, X } from "lucide-react"; | ||
| import { cn } from "@/lib/utils"; | ||
| import { useEditorModeStore } from "@/lib/stores/editorModeStore"; | ||
| import type { SaveStatus } from "@/lib/hooks/useAutoSave"; | ||
|
|
||
| interface AutoSaveAffordanceBarProps { | ||
| status: SaveStatus; | ||
| error?: string | null; | ||
| validationError?: string | null; | ||
| onRetry?: () => void; | ||
| onManualSave?: () => void; | ||
| onCancel?: () => void; | ||
| } | ||
|
|
||
| export function AutoSaveAffordanceBar({ | ||
| status, | ||
| error, | ||
| validationError, | ||
| onRetry, | ||
| onManualSave, | ||
| onCancel, | ||
| }: AutoSaveAffordanceBarProps) { | ||
| const manualSave = useEditorModeStore((s) => s.manualSave); | ||
|
|
||
| const effectiveStatus = validationError ? "validationError" : status; | ||
|
|
||
| const saveEnabled = manualSave && effectiveStatus === "draft" && !!onManualSave; | ||
| const saveSpinning = manualSave && effectiveStatus === "saving"; | ||
|
|
||
| return ( | ||
| <div | ||
| className={cn( | ||
| "border-b px-4 py-2 transition-colors", | ||
| effectiveStatus === "error" || effectiveStatus === "validationError" | ||
| ? "border-red-200 bg-red-50 dark:border-red-900/50 dark:bg-red-900/10" | ||
| : effectiveStatus === "draft" | ||
| ? "border-amber-200 bg-amber-50 dark:border-amber-900/50 dark:bg-amber-900/10" | ||
| : effectiveStatus === "saved" | ||
| ? "border-green-200 bg-green-50 dark:border-green-900/50 dark:bg-green-900/10" | ||
| : "border-slate-200 bg-slate-50 dark:border-slate-700 dark:bg-slate-800/50", | ||
| )} | ||
| role="status" | ||
| aria-live={effectiveStatus === "error" || effectiveStatus === "validationError" ? "assertive" : "polite"} | ||
| > | ||
| <div className="flex items-center justify-between gap-3 min-h-[1.25rem]"> | ||
| {/* Left side — status */} | ||
| <div className="flex items-center gap-2 min-w-0"> | ||
| {effectiveStatus === "validationError" && ( | ||
| <span className="text-xs text-red-600 dark:text-red-400">{validationError}</span> | ||
| )} | ||
|
|
||
| {effectiveStatus === "error" && ( | ||
| <> | ||
| <AlertTriangle className="h-3.5 w-3.5 shrink-0 text-red-500" /> | ||
| <span className="flex-1 truncate text-xs text-red-600 dark:text-red-400"> | ||
| {error || "Failed to save"} | ||
| </span> | ||
| {onRetry && ( | ||
| <button | ||
| onClick={onRetry} | ||
| className="shrink-0 text-xs font-medium text-red-600 hover:text-red-700 dark:text-red-400 dark:hover:text-red-300" | ||
| > | ||
| Retry | ||
| </button> | ||
| )} | ||
| </> | ||
| )} | ||
|
|
||
| {effectiveStatus === "saving" && ( | ||
| <> | ||
| <Loader2 className="h-3.5 w-3.5 animate-spin text-slate-400" /> | ||
| <span className="text-xs text-slate-500 dark:text-slate-400">Saving...</span> | ||
| </> | ||
| )} | ||
|
|
||
| {effectiveStatus === "saved" && ( | ||
| <> | ||
| <Check className="h-3.5 w-3.5 text-green-500" /> | ||
| <span className="text-xs text-green-600 dark:text-green-400">Saved</span> | ||
| </> | ||
| )} | ||
|
|
||
| {effectiveStatus === "draft" && ( | ||
| <> | ||
| <span className="h-2 w-2 shrink-0 rounded-full bg-amber-400" /> | ||
| <span className="text-xs text-amber-600 dark:text-amber-400">Draft saved</span> | ||
| </> | ||
| )} | ||
|
|
||
| {effectiveStatus === "idle" && ( | ||
| <> | ||
| <Cloud className="h-3.5 w-3.5 text-slate-400 dark:text-slate-500" /> | ||
| <span | ||
| className="text-xs text-slate-400 dark:text-slate-500" | ||
| title="Changes save as a local draft on blur, and commit to git when you navigate away" | ||
| > | ||
| Auto-save on | ||
| </span> | ||
| </> | ||
| )} | ||
| </div> | ||
|
|
||
| {/* Right side — save + cancel buttons */} | ||
| <div className="flex shrink-0 items-center gap-2"> | ||
| {manualSave && ( | ||
| <button | ||
| onClick={saveEnabled ? onManualSave : undefined} | ||
| disabled={!saveEnabled} | ||
| className={cn( | ||
| "flex shrink-0 items-center gap-1.5 rounded-md px-2.5 py-1 text-xs font-medium transition-colors", | ||
| saveEnabled | ||
| ? "bg-primary-600 text-white hover:bg-primary-700 dark:bg-primary-500 dark:hover:bg-primary-600" | ||
| : "cursor-not-allowed bg-slate-200 text-slate-400 dark:bg-slate-700 dark:text-slate-500", | ||
| )} | ||
| > | ||
| {saveSpinning ? ( | ||
| <Loader2 className="h-3.5 w-3.5 animate-spin" /> | ||
| ) : ( | ||
| <Save className="h-3.5 w-3.5" /> | ||
| )} | ||
| Save | ||
| </button> | ||
| )} | ||
| {onCancel && ( | ||
| <button | ||
| onClick={onCancel} | ||
| className="flex shrink-0 items-center gap-1.5 rounded-md px-2.5 py-1 text-xs font-medium text-slate-600 hover:bg-slate-100 dark:text-slate-400 dark:hover:bg-slate-700" | ||
| title="Discard changes" | ||
| > | ||
| <X className="h-3.5 w-3.5" /> | ||
| Cancel | ||
| </button> | ||
| )} | ||
| </div> | ||
| </div> | ||
| </div> | ||
| ); | ||
| } |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Clarify naming consistency for Catholic Semantic Canon.
Line 10 mixes “Catholic Semantic Canon” with “Catholic Digital Commons” in parentheses, which reads like two different names for one item. Consider using one canonical name (or explicitly stating one is the hosting org/site) to reduce ambiguity.
🤖 Prompt for AI Agents