feat: Phase 04 — frontend cite/export affordances#37
Open
dknauss wants to merge 5 commits into
Open
Conversation
Phase 04 Plan 01 (TDD). Lays groundwork before any save() shape change: - block.json: add outputCiteExport (bool, false) and bibliographyId (string) - export.js: export cslToRisEntry for synchronous per-entry RIS in save() - deprecated.js: prepend entry freezing the current pre-Phase-4 <li> shape (mirrors save.js) so existing blocks stay valid when <details> is added - edit.js: assign crypto.randomUUID() to bibliographyId on first render Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Phase 04 Plan 02 (TDD). When outputCiteExport is enabled, each saved <li> gains a zero-JS <details> disclosure with the visible cite text and synchronous data-URI download links for RIS and CSL-JSON (plus BibTeX/ BibLaTeX when per-citation export strings are present). All hrefs are encodeURIComponent-encoded; opt-in is off by default. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Phase 04 Plan 03 (TDD). save() is synchronous, so the async citation-js export builders run in the editor and their output is stored on each citation. A shared computeExportStrings helper is wired into all four format sites (style change, structured edit, import, manual add), each with a post-await cancel guard, and each now assigns a stable citation id (idempotent). The save() <details> BibTeX/BibLaTeX links now populate. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Phase 04 Plan 04. Adds the 'Cite / Export affordances' toggle to the Metadata output inspector panel (outputCiteExport) and flat CSS for the disclosure panels — critically resetting text-indent/padding so the panel is flush-left rather than dragged by the hanging-indent rule, with a readable non-italic summary and an inline export-link row. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #37 +/- ##
==========================================
- Coverage 81.47% 81.43% -0.05%
==========================================
Files 40 41 +1
Lines 2613 2639 +26
Branches 464 469 +5
==========================================
+ Hits 2129 2149 +20
- Misses 126 131 +5
- Partials 358 359 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Update STATE.md and ROADMAP.md: Phase 04 (frontend Cite/Export) is implementation code-complete on this branch (PR #37); only the plan 04-04 human browser-verify checkpoint remains before merge. Review date bumped. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Implements Phase 04 — Frontend Cite/Export Affordances from the canonical
.planning/phases/04-frontend-cite-export-affordances/plans. Adds opt-in, per-entry "Cite / Export" disclosure panels to the static bibliography output, preserving the zero-JS / static-save()contract.Plans (one commit each)
af8a18a— Foundation:outputCiteExport+bibliographyIdattributes, exportcslToRisEntry, and a deprecation entry freezing the currentsave()shape so existing blocks stay valid.639c7a7—<details>cite/export panels insave()(opt-in): visible cite text + synchronous RIS & CSL-JSONdata:URI links, plus conditional BibTeX/BibLaTeX links. AllencodeURIComponent-encoded.65ee699— Editor pre-computation of per-citation BibTeX/BibLaTeX strings (a sharedcomputeExportStringshelper wired into all four format sites with cancel guards) + stable citation IDs. Two new hook test harnesses.16ad931— Inspector toggle ("Cite / Export affordances") + frontend CSS (hanging-indent reset, readable summary, inline export-link row).Verification
npm test— 570 passed, 2 skipped (perf benchmarks), 0 failed.lint:js,lint:css,lint:php,npm run build— all pass.Plan 04-04 ends with a blocking visual checkpoint that could not run in a non-browser session. Before merge, confirm in the editor + frontend (Playground or local):
the inspector toggle appears; enabling it renders the
<details>panels; the panel is flush-left (indent reset works); summary is readable; RIS/CSL-JSON (and BibTeX/BibLaTeX) links work; toggling off removes panels; content stays readable with the plugin deactivated.🤖 Generated with Claude Code