add Ko-fi bean

This commit is contained in:
Julian Tabel
2026-03-20 16:38:54 +01:00
parent c9d42b091f
commit 5bd4ca7d3e
8 changed files with 109 additions and 13 deletions

View File

@@ -1,11 +1,11 @@
---
# nuzlocke-tracker-d68l
title: 'Frontend: Journal entry editor and list view'
status: todo
status: completed
type: task
priority: normal
created_at: 2026-03-20T15:15:55Z
updated_at: 2026-03-20T15:15:59Z
updated_at: 2026-03-20T15:37:39Z
parent: nuzlocke-tracker-mz16
blocked_by:
- nuzlocke-tracker-vmto
@@ -21,15 +21,49 @@ Create the frontend UI for writing and viewing journal entries.
## Checklist
- [ ] Add `JournalEntry` TypeScript types to `frontend/src/types/`
- [ ] Create API client functions for journal CRUD
- [ ] Create `JournalList` component — chronological list of entries for a run
- [x] Add `JournalEntry` TypeScript types to `frontend/src/types/`
- [x] Create API client functions for journal CRUD
- [x] Create `JournalList` component — chronological list of entries for a run
- Show title, date, preview snippet, and linked boss (if any)
- Link each entry to its detail/edit view
- [ ] Create `JournalEditor` component — markdown textarea with title input
- [x] Create `JournalEditor` component — markdown textarea with title input
- Optional boss result selector dropdown (link entry to a boss battle)
- Preview tab to render markdown
- Save and delete actions
- [ ] Create `JournalEntryView` component — rendered markdown display
- [ ] Add journal section/tab to the run detail page
- [ ] Add route for journal entry detail/edit view
- [x] Create `JournalEntryView` component — rendered markdown display
- [x] Add journal section/tab to the run detail page
- [x] Add route for journal entry detail/edit view
## Summary of Changes
Implemented the frontend journal entry editor and list view with the following components:
**Types created:**
- `frontend/src/types/journal.ts` - TypeScript types for JournalEntry, CreateJournalEntryInput, UpdateJournalEntryInput
**API client created:**
- `frontend/src/api/journal.ts` - CRUD functions for journal entries
- `frontend/src/hooks/useJournal.ts` - React Query hooks for journal data fetching and mutations
**Components created:**
- `frontend/src/components/journal/JournalList.tsx` - Chronological list of entries with title, date, preview snippet, and linked boss display
- `frontend/src/components/journal/JournalEditor.tsx` - Markdown textarea with title input, boss result selector, write/preview tabs, save/delete actions
- `frontend/src/components/journal/JournalEntryView.tsx` - Rendered markdown display with entry metadata
- `frontend/src/components/journal/JournalSection.tsx` - Wrapper component for embedding in RunEncounters page
**Pages created:**
- `frontend/src/pages/JournalEntryPage.tsx` - Standalone page for viewing/editing a single journal entry
**Modified files:**
- `frontend/src/types/index.ts` - Added journal type exports
- `frontend/src/pages/index.ts` - Added JournalEntryPage export
- `frontend/src/App.tsx` - Added route `/runs/:runId/journal/:entryId`
- `frontend/src/pages/RunEncounters.tsx` - Added Encounters/Journal tab navigation with JournalSection integration
**Features:**
- Tab navigation in run detail page to switch between Encounters and Journal views
- Create new journal entries with markdown content and optional boss battle linking
- Edit and delete existing entries
- Write/Preview toggle in editor
- Rendered markdown display with full prose styling

View File

@@ -5,7 +5,7 @@ status: completed
type: epic
priority: normal
created_at: 2026-02-19T07:43:05Z
updated_at: 2026-03-20T15:30:38Z
updated_at: 2026-03-20T15:37:21Z
---
Let users tell the story of their nuzlocke run through session journal entries (blog posts).
@@ -35,4 +35,4 @@ The journal becomes a chronological narrative of the nuzlocke run, with game dat
## Success Criteria
- [x] Backend: journal entries CRUD API is complete (`nuzlocke-tracker-vmto`)
- [ ] Frontend: journal list, editor, and view are functional (`nuzlocke-tracker-d68l`)
- [x] Frontend: journal list, editor, and view are functional (`nuzlocke-tracker-d68l`)