Skip to content

Releases

MarginFit v0.1.19

Choose a tag to compare

@SeptYagu SeptYagu released this 16 Oct 07:40

MarginFit v0.1.19 — Stable Fit Width across consecutive pages

Fit Width now uses a continuous shared horizontal position for pages with compatible detected content bounds. This reduces the distracting left/right repositioning that can occur while reading a PDF.

  • 12 PDF-unit safety margin for the shared horizontal position, chosen after comparing 12, 14 and 16 units across two independent batches of 140 PDFs (6,108 analyzable text-boundary pages).
  • No anticipatory movements. MarginFit keeps the current horizontal position while it remains safe; it moves only as far as needed when the currently viewed page makes the shared position invalid.
  • Simple handling of unusual pages. An incompatible page starts a fresh continuous group; the plugin does not try to carry the previous group's position past it or snap back later.
  • Content visibility has priority over the 4px jitter guard. This preserves the detected content even when a small but necessary horizontal correction is required.
  • No changes to Fit Height, Zotero native two-page rendering, detection-off fitting, or the original PDF and annotations. The existing raster/ink detector and its conservative full-page fallback remain unchanged.

Validation: 115 automated Node tests; an isolated Zotero 10 test of 34 particularly difficult PDF pages with the actual MarginFit detector and viewport positioning (34/34 detected content areas visible at 12 units, including musical examples, images, edge text and original printed borders); plus general isolated Zotero integration regressions. The manually inspected 34-page set showed no meaningful information loss. This is strong targeted evidence, not a guarantee for every unusual PDF or operating system.

Release contains no new preferences, extra timers, alternate renderer, or additional PDF scanning.

MarginFit v0.1.18

Choose a tag to compare

@github-actions github-actions released this 16 Oct 02:27

MarginFit v0.1.18 — More stable content fitting and complete two-page views

This release improves content fitting while keeping Zotero's native PDF layout, continuous scrolling, annotations, and existing cached page boundaries.

  • Fit Height keeps both sheets readable. In Single, Odd Spreads and Even Spreads modes, MarginFit measures the topmost, bottommost, leftmost and rightmost detected content across the visible sheet(s), then chooses one shared zoom that keeps that content visible. The vertical safety gutter is now 5 PDF units (Fit Width retains its 16-unit safety).
  • Avoid the second zoom adjustment. Before zooming, MarginFit checks the full-paper widths of Zotero's native spreads, including other pages that may trigger a horizontal scrollbar. When necessary, it reserves that scrollbar's height in the initial calculation, so an explicit Height Fit needs at most one scale write.
  • Smoother Fit Width scrolling. Automatic width fitting follows actual content boundaries and waits until the outgoing page's content has left the viewport; small manual movements on the same page remain respected.
  • Improved page navigation. Height page turns hook Zotero's navigation commands and reuse MarginFit's existing content alignment; single/odd/even spread behavior stays native.

No additional PDF raster scanning, cache-format migration, alternate renderer or per-page independent zoom was introduced. The original PDF and annotations are never changed.

Verification: 110 Node unit tests, isolated Windows Zotero 10.0.6 content-height and spread tests, six real viewer layout cases checking that all four content edges fit, and general reader / toolbar / caching regressions. Not all macOS/Linux configurations, scan edge cases or physical keyboards have been tested.

Acknowledgment: Thanks to Dylan Awalt-Conley (Center PDF) for suggesting the navigation-hook approach that inspired MarginFit's navigation improvements. MarginFit's implementation is independent; no Center PDF source code was copied.

MarginFit v0.1.17

Choose a tag to compare

@github-actions github-actions released this 13 Oct 03:41

MarginFit v0.1.17 - Native page-spread toggle and spread-aware navigation

This release makes Zotero's built-in PDF two-page layout easier to use, without a separate renderer.

  • New paper icon immediately to the right of Detect Margins. Click to cycle through native Single Page, Odd Spreads (1-2, 3-4...), and Even Spreads (cover alone, then 2-3, 4-5...) settings.
  • Distinct icon states: one hollow page for Single; filled left and hollow right for Odd; hollow left and filled right for Even. Changing the Zotero View-menu spread setting updates the icon.
  • Page Down / Page Up advance one visible spread in Fit Height, with correct odd/even grouping, lone cover and unpaired last page. Single-page mode still steps one page.

Width/Height Fit, margin recognition, persistent PDF-bound caches, one-worker all-open PDF background indexing, continuous scrolling, and arrow-key navigation remain supported. Original PDF pages and annotations are not modified.

Validation: 102/102 Node unit tests; native Zotero 10.0.6 UI, spread, Height Fit, standard reader integration, cache, all-open indexing, annotation and active-reader suites. OS-level Windows PageDown/PageUp inputs in a disposable profile verified Odd Spreads 3 -> 5 -> 3 and Even Spreads 2 -> 4 -> 2. The project owner tested and accepted the private candidate's features and appearance.

Limitations: for highly mismatched adjacent page sizes or narrow windows, the target-page-derived Height Fit zoom may not fully display both pages simultaneously. macOS/Linux and every physical keyboard device have not been tested.

MarginFit v0.1.16

Choose a tag to compare

@github-actions github-actions released this 12 Oct 23:54

MarginFit v0.1.16 ? Better page centering, tighter Height Fit, independent page keys

Three reader experience fixes:

  • Berger, Music Ficta page 15: After ordinary navigation from page 14, Fit Width previously left an approximately 97 CSS-pixel difference between left and right whitespace. Clicking Fit Width again reduced the difference to 0.8 pixels. Now the reader re-centers once at a real page boundary without the extra click, while preserving user horizontal movement within the same page.
  • Tighter Height Fit: Safety padding above and below actual content is reduced from 16 to 8 PDF units per side. Left/right protection remains 16 units; real content recognition and PDF annotations are not removed.
  • Fit Height works with Detect Margins OFF: Page Down / Page Up still move exactly one entire physical PDF page, using native Zotero page height. With detection ON, they continue to land on the page's actual detected content. Up/Down arrow fine scrolling and the full continuous PDF scrollbar remain unchanged.

Background indexing still completes all opened PDFs, with the current reader first, and persistent JSONL cache works as before. Parity prediction and indiscriminate raster-first remain disabled.

Verified using a disposable Zotero 10.0.6 profile with an imported copy of the original 19-page Berger PDF, unit tests, and OS-level trusted PageDown/PageUp input. No modification to original PDFs or annotations. OS-level synthesized keyboard input is not equivalent to human physical-key testing on every device.

MarginFit v0.1.15

Choose a tag to compare

@github-actions github-actions released this 12 Oct 22:27

MarginFit v0.1.15 ? All opened PDFs indexed again

This release restores the original requirement inadvertently lost in v0.1.14: scan the selected PDF to completion FIRST, then automatically scan ALL other still-open PDFs with the single background worker. No activation of each hidden document is needed. New user selection regains priority. The worker stops only after every open document is cached or Detect Margins is disabled.

Cause: background PDF.js display-intent raster rendering can become stuck waiting for animation frames in an inactive iframe. Background-only print-intent rendering is not RAF-driven; the same real Zotero test previously stalled at page 16/24 but now reaches 24/24 while the tab remains inactive.

Safety: print mode omits display-only annotation appearances. The detector now merges visible annotation rectangles into the background content bounds, with conservative full-page fallback if annotation geometry is unreadable. Generated native annotated-PDF tests verified background bounds match foreground within 3 PDF units and remain precise.

Fitting controls are independent: Width/Height OFF stops automatic fitting, but cache indexing continues if Detect Margins stays ON.

Unchanged: full-document continuous scrolling, one-content-page keys, dirty-border detection, folio exception in Width Fit, persistent JSONL and no speculative parity/raster-first optimization.

MarginFit v0.1.14

Choose a tag to compare

@github-actions github-actions released this 12 Oct 21:20

MarginFit v0.1.14 ? Activity priority, trusted keys, repaired acceptance

Regular release for Zotero 10.0.5?10.0.x.

  • PageDown / PageUp: The real Windows OS keyboard input route now reaches the selected PDF, even when Zotero dispatches those keys to the main Chrome window rather than the reader iframe. One press moves exactly one content page. Arrow keys still permit normal fine scrolling.
  • Idle indexing: One shared cooperative worker finishes the currently selected PDF only. It switches promptly with tab focus; after that PDF is complete, hidden readers are not scanned (their PDF.js rendering may be suspended). Selecting another unfinished PDF resumes indexing there.
  • Inactive PDF protection: Shared fit-mode preference updates no longer cause a hidden/split pane to change zoom or position.
  • Tests and docs: Fix stale default native integration UI assertions; retain remaining native PDF behaviors, increase isolated detached reader cold-start wait. Replace stale current-state documents while archiving earlier historical reports.
  • Existing features unchanged: Three in-place toggle controls, continuous full-document scroll, content-page transitions, sparse detection, faraway page-number-aware Width Fit and JSONL cache.
  • Algorithm decisions: Real PDF A/B did not authorize activation of six-sample parity-based cropping or unconditional raster-first; the current precise-page and strict pure-text paths remain.

Verification: 99/99 unit tests, 78/78 complete native Zotero acceptance checks, 28/28 height/navigation checks, 34/34 UI checks and 24/24 cache checks, 10/10 idle/JSONL checks; native two-PDF activity and OS-injected trusted PageDown/PageUp navigation exercises recorded. Physical keyboard hardware and macOS/Linux input routes remain unverified.

All tests used disposable Zotero profiles and PDF copies, not production data.

MarginFit v0.1.13

Choose a tag to compare

@github-actions github-actions released this 12 Oct 19:20

MarginFit v0.1.13 ? Fit Width / Height toggles

Regular public release for Zotero 10.0.5?10.0.x.

  • The native Reset Zoom toolbar button is hidden. The plugin's Fit Width button takes its original toolbar position, with Fit Height and Detect Margins beside it. On plugin shutdown, the native button is restored.
  • Fit Width and Fit Height are mutually exclusive on/off switches. Clicking the active button again turns that mode off, preserving zoom and scroll. Clicking the other activates it.
  • Detect Margins is independent. With detection OFF, the two fit buttons call native Zotero width/height fitting.
  • The fit-mode state is kept when opening new PDFs. Turning it off cancels pending automatic adjustments.
  • Continuous scroll, full document scrollbar, content-page stepping, specialized folio handling and JSONL cache are unchanged.

Verification

  • 97/97 unit tests passed.
  • 34/34 isolated Zotero 10.0.6 toolbar integration checks passed, including native button hiding/restoring, width/height toggling, detection-off fallback, delayed adjustment cancellation, and new-PDF mode state.
  • 28/28 native continuous content-page navigation checks passed.
  • 10/10 native background indexing and JSONL cache checks passed.
  • Physical keyboard/trackpad device testing remains separate from these synthetic integration tests.

MarginFit v0.1.12

Choose a tag to compare

@github-actions github-actions released this 12 Oct 18:45

MarginFit v0.1.12 ? One-content-page navigation

Regular public release for Zotero 10.0.5?10.0.x.

This version combines the interaction requirements of v0.1.11 with content-page navigation.

  • The right scrollbar and PDF.js layout still represent the entire PDF, not a single mounted page.
  • Touchpad, wheel, and Arrow Up/Down retain fine adjustment within the current page.
  • When scrolling enters a different physical page, MarginFit uses the existing 75 ms input quiet-window to position that new page's detected content vertically in the viewport. It does not snap back during a movement that remains on the same page.
  • PageDown / PageUp are handled as exactly one neighboring PDF page and land on that page's detected content, rather than scrolling by one screen-height. Modified shortcuts and typing/editing controls are not overridden.
  • The existing sparse boundary detection, far-away folio behavior, JSONL cache, and one-worker background indexing are unchanged.
  • Old single-DOM-page PDF.js PAGE mode stays completely disabled.

Verification

  • 93/93 Node unit checks passed, including the one-page key calculation, stale page state, fine movement, and page crossing.
  • 28/28 native Zotero 10.0.6 integration assertions passed for full-document scrolling, actual content-page landing, fine-grained 23px scrolling and cross-page snapping. Background cache regression is covered by prior v0.1.11 native results, with no cache code changes.
  • Hardware-key caveat: the debugger's untrusted synthetic KeyboardEvent did not reach any native keydown listener; the native test therefore exercises the actual jump method directly while the key dispatch logic is unit-tested. Physical PageDown/PageUp keys were not independently tested on hardware; they still require practical confirmation.
  • No real user PDF or production Zotero profile was modified.

MarginFit v0.1.11

Choose a tag to compare

@github-actions github-actions released this 12 Oct 18:15

MarginFit v0.1.11 ? Continuous Fit Height

Regular public release for Zotero 10.0.5?10.0.x.

This release corrects the Fit Height interaction model, not just an isolated scroll bug.

Expected behavior

  • Detect Margins ON + Fit Height: determine scale using the current PDF page's detected content height, but retain Zotero/PDF.js's original continuous document and full-document scrollbar.
  • Mouse wheel, touchpad, arrow keys, Page Down/Up, native page-number jumps and manual zoom retain normal PDF reader behavior. There is no synthetic "two swipes per page" or one-page-at-a-time state.
  • A PDF left in single-page mode by a prior release is returned to native continuous mode on a fresh Fit request.
  • Detect Margins OFF: uses Zotero's original native Fit Height behavior as before.

Changes

  • Remove all PAGE-mode activation, custom wheel interception, gesture accumulation and one-page navigation code.
  • Keep the existing height content-bounds scale computation, per-page background cache, JSONL v0.1.9 persistence, and Width Fit folio handling.
  • Historical v0.1.8 PAGE-mode experiment records remain archived for traceability, but are no longer active functional acceptance tests.

Verification

  • 91/91 unit tests passed.
  • 20/20 isolated Zotero 10.0.6 continuous Fit Height regression checks passed.
  • 10/10 separate isolated Zotero background indexing and JSONL persistence checks passed.
  • Native acceptance checks cover: full multi-page DOM and document scrollbar, content bounds fitted to available viewport, native scrolling, page-number navigation, uncaptured wheel/Page Down events, manual zoom, and recovery from prior PAGE mode.
  • Synthetic keyboard events verify the extension does not prevent the native action; testing all physical keyboard and touchpad devices is not claimed.
  • No production Zotero profile, user PDF, annotations, or saved reading data were modified during testing.

MarginFit v0.1.10

Choose a tag to compare

@github-actions github-actions released this 12 Oct 17:46

MarginFit v0.1.10 ? Fix Fit Height page lock

Regular public release for Zotero 10.0.5?10.0.x.

When Detect Margins was active and Fit Height entered PDF.js's one-page mode, manual zoom could leave the reader with only one DOM-mounted page but without wheel-to-next-page handling, making the remaining PDF seem inaccessible.

  • A manual scale change now immediately restores the prior native continuous-scroll layout. All pages remain accessible by standard scrolling.
  • Clicking Fit Height again restores the deliberate one-page-per-turn fitting behavior.
  • The existing page-turn gestures, far-away folio Width Fit, sparse detector, and v0.1.9 JSONL cache are unchanged.

Verification

  • 91/91 unit checks passed.
  • 29/29 isolated Zotero 10.0.6 native Fit Height checks passed, including newly asserted mode restoration, multi-page DOM and re-entering Height Fit after manual zoom.
  • v0.1.9 previously passed native 24/24 cache integration and 6/6 PDF rotation/IOUtils checks. Those tests were not rerun as part of this source-only Height Fit fix.
  • A reported real-world lock may involve additional input paths; this fixes the reproduced manual zoom path and does not claim all possible UI input devices have been exercised.

User PDF files, annotations and the installed production Zotero profile were not modified during testing.