mirror of
https://github.com/scotttomaszewski/obsidian-disciples-journal.git
synced 2026-07-22 05:42:13 +00:00
Doc updates
This commit is contained in:
parent
08723df2f5
commit
3bfd78d90c
5 changed files with 18 additions and 12 deletions
|
|
@ -111,7 +111,6 @@ Source is organized under `src/` by responsibility:
|
|||
`bible` code block, blockquote-with-text + citation).
|
||||
- **`FrontmatterUtil.ts`** — apply user-configured custom frontmatter to Bible
|
||||
notes (`getCustomFrontmatterForReference`, `applyCustomFrontmatter`).
|
||||
- **`BibleCodeblockFormatter.ts`** — formatting helper for the `bible` code block.
|
||||
|
||||
### `settings/`
|
||||
|
||||
|
|
@ -161,9 +160,9 @@ reuses `toBibleApiResponse` on the stored data instead of re-hitting the API. Se
|
|||
## Tests
|
||||
|
||||
`test/` holds the test suites (Node's built-in `node:test` runner via `tsx`), one
|
||||
`*.test.ts` per unit — currently `test/BibleReference.test.ts`. Run with `npm test`
|
||||
(or `devbox run test`); they also gate `npm run build` and `just release`. See
|
||||
[docs/testing.md](docs/testing.md).
|
||||
`*.test.ts` per unit — currently `BibleReference`, `BookNames`, `VerseFormatter`,
|
||||
`VerseId`, and `VerseSelection`. Run with `npm test` (or `devbox run test`); they
|
||||
also gate `npm run build` and `just release`. See [docs/testing.md](docs/testing.md).
|
||||
|
||||
## Build
|
||||
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ Effort is sized XS (<1 h) · S (1–4 h) · M (1 day) · L (multi-day).
|
|||
- **Identified:** 2026-05-31, funky-logic sweep.
|
||||
- **What:** Styles aren't fully ported into freshly created pop-out windows.
|
||||
- **Why:** Passages render unstyled in pop-outs; a known rough edge.
|
||||
- **Context:** `DisciplesJournalPlugin.updateBibleStyles` (`:131-158`) flags this in a
|
||||
- **Context:** `DisciplesJournalPlugin.updateBibleStyles` (`:219-246`) flags this in a
|
||||
comment; see [docs/gotchas.md](docs/gotchas.md). Tracked upstream in an Obsidian
|
||||
Discord thread linked in the code.
|
||||
- **Effort:** M
|
||||
|
|
|
|||
|
|
@ -40,9 +40,9 @@ Releases then go through the `justfile` (`just release <version>`), which:
|
|||
1. Refuses to run if `git status` is not clean.
|
||||
2. Runs `npm test` — a failing test aborts the release before any files are mutated.
|
||||
3. Sets `version` in both `manifest.json` and `package.json` (via `jq`).
|
||||
5. Builds with `npm run build-no-check`.
|
||||
6. Commits (`Prepares for release '<version>'`) and pushes.
|
||||
7. Creates a GitHub release with `gh`, uploading `main.js`, `manifest.json`, and
|
||||
4. Builds with `npm run build-no-check`.
|
||||
5. Commits (`Prepares for release '<version>'`) and pushes.
|
||||
6. Creates a GitHub release with `gh`, uploading `main.js`, `manifest.json`, and
|
||||
`styles.css` as assets (release notes are left empty — the changelog is the record).
|
||||
|
||||
### gh token note
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ frontmatter-as-cache model, `:`→`v` filename encoding) live in
|
|||
loads its document listeners/timer and, crucially, tears them down on plugin
|
||||
unload. A previous version leaked global `document` listeners; do **not** reintroduce
|
||||
per-render or per-reference global listeners — route hover behavior through this one
|
||||
handler. (`DisciplesJournalPlugin.ts:60-65`, `BibleEventHandlers.ts`.)
|
||||
handler. (`DisciplesJournalPlugin.ts:73-77`, `BibleEventHandlers.ts`.)
|
||||
|
||||
## Pop-out windows: styles don't fully carry over (known-incomplete)
|
||||
|
||||
|
|
@ -20,7 +20,7 @@ Each Obsidian pop-out window is a separate `Document`, so `updateBibleStyles`
|
|||
iterates all leaves and applies styles per-document. A code comment flags that this
|
||||
**still doesn't fully work** — a freshly created pop-out doesn't get the style
|
||||
vars ported over. If you touch styling and a pop-out looks unstyled, this is why,
|
||||
not your change. (`DisciplesJournalPlugin.ts:131-158`.)
|
||||
not your change. (`DisciplesJournalPlugin.ts:219-246`.)
|
||||
|
||||
## The passage cache is keyed by object identity — it effectively never hits
|
||||
|
||||
|
|
@ -30,7 +30,7 @@ up** with the inbound (freshly parsed) `ref`. Two equal-but-distinct
|
|||
`BibleReference` objects are different map keys, so cross-call lookups essentially
|
||||
always miss; the real cache is the saved note on disk. Harmless today, but if you
|
||||
ever rely on this in-memory cache, key it by `ref.toString()` instead.
|
||||
(`BibleContentService.ts:14,72-80`.)
|
||||
(`BibleContentService.ts:14,97-103`.)
|
||||
|
||||
## scrollToVerse watches the DOM instead of guessing a delay
|
||||
|
||||
|
|
|
|||
|
|
@ -26,8 +26,15 @@ below) — a failing test blocks both.
|
|||
- `BibleReference` — `parse` (the full format matrix from
|
||||
[reference-formats.md](reference-formats.md), book-name variants, normalization,
|
||||
null cases), `toString` round-trips, and the value-object helpers.
|
||||
- `BookNames` — canonical book-name normalization and per-book chapter counts.
|
||||
- `VerseFormatter` — the three insert formats (inline reference, `bible` code block,
|
||||
blockquote-with-text + citation).
|
||||
- `VerseId` — `parseVerseId` of ESV marker ids (`v01001002-1` → `{chapter, verse}`).
|
||||
- `VerseSelection` — collapsing a verse set into contiguous `BibleReference` runs and
|
||||
its display label.
|
||||
|
||||
This is the first suite; extend it as other pure logic becomes test-worthy.
|
||||
Coverage is the pure logic (parsing, formatting, value objects); extend it as other
|
||||
pure logic becomes test-worthy.
|
||||
|
||||
## Gating
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue