Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
77f683a
feat: add story block editor with content, title, and scripture blocks
timosville Aug 11, 2026
70aa97e
increment: add fields to blocks to match spec
timosville Aug 11, 2026
a11ed33
refactor: remove redundant test for chapter-only bundle.blocks errors…
timosville Aug 11, 2026
5f91ac2
increment: add new edit review variants and improved workflow actions
timosville Aug 12, 2026
3978f9d
Merge branch 'sco-2751-refine-studio-colours-brand' into sco-2852-dra…
timosville Aug 12, 2026
1a3536a
increment: add 'inNavigation' visibility option to ChapterBlockVisibi…
timosville Aug 13, 2026
7f6d311
increment: enhance visibility handling in chapter block components by…
timosville Aug 13, 2026
8d3c861
increment: introduce ChapterContentItem type and enhance chapter bloc…
timosville Aug 13, 2026
f680696
increment: refactor chapter editing components to support devotion dr…
timosville Aug 13, 2026
b520ded
increment: refactor devotion draft editing components by consolidatin…
timosville Aug 13, 2026
5554e1c
increment: enhance devotion draft functionality by introducing new ty…
timosville Aug 14, 2026
6291898
increment: handle validation erros
timosville Aug 14, 2026
53cd859
increment: handle drag and drop in preview
timosville Aug 14, 2026
840d71b
increment: add support for reusing previous chapter block structures …
timosville Aug 14, 2026
1827a9c
Merge branch 'sco-2751-refine-studio-colours-brand' into sco-2852-dra…
timosville Aug 17, 2026
39ea53a
ops: house keeping
timosville Aug 17, 2026
899e63b
increment: add course template
timosville Aug 17, 2026
c3c1548
refactor: implement chapter draft edit shell and controller for impro…
timosville Aug 17, 2026
20af670
refactor: enhance layout and structure of course and devotion draft e…
timosville Aug 17, 2026
6e05cc4
increment: add German devotion variant and enhance translation block …
timosville Aug 18, 2026
2b1f859
Merge branch 'sco-2751-refine-studio-colours-brand' into sco-2852-dra…
timosville Aug 18, 2026
de69444
refactor: improve block card shell alignment logic and styling
timosville Aug 18, 2026
db1a2f0
increment: introduce media upload configurations and enhance CMS with…
timosville Aug 18, 2026
5a7e6c8
refactor: introduce StoryChapterSpecifier interface and update Chapte…
timosville Aug 18, 2026
da544c2
refactor: remove deprecated mediaConfig interface and clean up import…
timosville Aug 18, 2026
44efec7
increment: add draft edit page logic and integrate with draft service
timosville Aug 18, 2026
380b3d4
refactor: clear blockName and displayName fields in cloneBlockStructu…
timosville Aug 19, 2026
242458b
increment: add preview_course template for course bundle display with…
timosville Aug 19, 2026
e086983
increment: enhance DraftService to support devotion and course templa…
timosville Aug 19, 2026
d9c33a1
increment: enhance block creation and translation handling in DraftSe…
timosville Aug 19, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions .cursor/rules/function-naming.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
---
description: Function and method naming conventions for backend, frontend, and shared code
globs: src/**/*.{ts,vue}
alwaysApply: false
---

# Function Naming

Follow [docs/function-naming.md](../../docs/function-naming.md) for full detail.
Summary for agents writing or reviewing code:

## Principles

- camelCase for all functions/methods
- Class/module name supplies the noun; methods use verbs
- Prefix signals intent; do not mass-rename legacy code

## Shared

| Prefix | Use |
|---|---|
| `isX` / `hasX` / `canX` | Boolean predicates |
| `toX` | Pure converters |
| `getX` / `fetchX` / `loadX` / `findX` | Retrieval; omit `get`/`fetch` when bare domain name is clear (`blockKind`, `previousDevotionChapterBlocks`) |
| `parseX` / `normalizeX` / `normalizedX` / `formatX` | Parse; `normalizedX` = pure return transform; `normalizeX` = in-place/async processing |
| `buildX` | Assemble complex objects |
| `XFromY` / `XForY` | Derive from source / scoped to context |
| `*BlockedMessages` / `blockingX` | Validation blockers |
| `compareX` / `sortX` | Sort helpers |

## Frontend

- **Pinia:** `setX`, `clearX`, `addX`, `removeX`, `toggleX`; boolean state as `isX`/`hasX` computed refs
- **Composables:** export `useX()` matching `use-*.ts` filename
- **Template handlers:** `onX` (`onFilter`, `onDragStart`, `onRemove`) — not `handleX`
- **Page commands:** bare verbs (`saveStory`, `addPage`, `publishDraft`)
- **Form payloads:** `getPayload()` or `buildXPayload()`
- **Avoid:** `setIsDirty` → prefer `setDirty` or `markDirty`

## Backend

- **Services:** bare CRUD on `*Service` classes; `listX`, `fetchX`, shared derivation patterns
- **Controllers:** REST (`index`, `store`, `destroy`) + domain verbs (`publish`, `toggleBookmark`); prefer `destroy` over `delete` for new resources
- **Validators:** `*Validator.validate()` or camelCase vine exports
- **Middleware:** `handle(ctx, next)`
- **Models:** getters for derived shape; instance methods for mutations

## Legacy (do not copy in new code)

- `handle*` event handlers → use `onX`
- `subscribed()` → `isSubscribed()`
- `Analytics` class name (not `*Service`)
- Stories `delete` action (prefer `destroy`)
17 changes: 17 additions & 0 deletions .cursor/rules/vue-components.mdc
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,23 @@ const emit = defineEmits<{
}>();
```

### Event Handlers

Follow [function-naming.md](../../docs/function-naming.md) for full conventions.

- Use **`onX`** for handlers bound in the template (`@click`, `@keydown`, drag/drop, child emits)
- Use **bare domain verbs** for page-level commands not tied to a single DOM event (`saveStory`, `addPage`)
- Do not introduce new **`handleX`** handlers; rename to `onX` when editing legacy code

```typescript
// template-bound
const onFilter = (query: string) => { /* ... */ };
const onDragStart = () => { /* ... */ };

// page command
const saveStory = () => router.post(/* ... */);
```

## State Management

### Store Usage
Expand Down
Loading
Loading