2.9 KiB
2.9 KiB
title, status, type, priority, created_at, updated_at, parent, blocked_by
| title | status | type | priority | created_at | updated_at | parent | blocked_by | |
|---|---|---|---|---|---|---|---|---|
| Frontend: Journal entry editor and list view | completed | task | normal | 2026-03-20T15:15:55Z | 2026-03-20T15:37:39Z | nuzlocke-tracker-mz16 |
|
Create the frontend UI for writing and viewing journal entries.
Design Decisions
- Plain markdown textarea (no WYSIWYG)
- Images via markdown URL syntax (
) - Blank slate — no templates
- Private only (no sharing UI)
Checklist
- Add
JournalEntryTypeScript types tofrontend/src/types/ - Create API client functions for journal CRUD
- Create
JournalListcomponent — 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
JournalEditorcomponent — 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
JournalEntryViewcomponent — rendered markdown display - Add journal section/tab to the run detail page
- 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 entriesfrontend/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 displayfrontend/src/components/journal/JournalEditor.tsx- Markdown textarea with title input, boss result selector, write/preview tabs, save/delete actionsfrontend/src/components/journal/JournalEntryView.tsx- Rendered markdown display with entry metadatafrontend/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 exportsfrontend/src/pages/index.ts- Added JournalEntryPage exportfrontend/src/App.tsx- Added route/runs/:runId/journal/:entryIdfrontend/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