Skip to content

PNG sits with the other ways to keep a capture, and says how many files it writes - #66

Open
vhladiienko wants to merge 1 commit into
Open-Capture:mainfrom
vhladiienko:feat/png-after-capture
Open

vhladiienko wants to merge 1 commit into
Open-Capture:mainfrom
vhladiienko:feat/png-after-capture

Conversation

@vhladiienko

Copy link
Copy Markdown

Summary

The popup's action row only had PDF / Copy / Annotate. Save-as-PNG existed, but only inside the format-choice panel that appears for captures too long to keep whole and editable — so on an ordinary page PNG was nowhere to be found. This adds it to the row permanently and labels the count in the two places a user looks for it:

 #resultActions (popup.html)
   PDF
+  PNG (2)        # count = files one click writes
   Copy
   Annotate

#status after the capture/save settles
-  Done.
+  Done, captured in 2 files.     # plain "Done." when the capture is one image

The button reuses the format panel's existing {action: "savePngs"} path — no new save code. Count comes from report.output_image_count, already on the persisted last-capture record.

Evidence

  • Before: after any ordinary capture the row offered PDF / Copy / Annotate only; PNG was reachable solely via the too-long capture panel (e2e/too-long.spec.ts was the only spec exercising a PNG save from the popup).
    After: same spec now also asserts, right after watching 2 files download (opencapture-page-1-of-2.png, opencapture-page-2-of-2.png):

    ✓ #status        → "Done, captured in 2 files."
    ✓ #savePngLabel  → "PNG (2)"
    

    And capture.spec.ts "restores report/preview/enabled buttons" asserts the button comes back enabled from persisted state and saves a .png from a real popup click.

    Full runs on this branch: typecheck ✓, i18n suite ✓ (new key present in all 7 catalogues, none left at its English source), locale caps ✓, too-long + popup e2e ✓.

Merge Danger

Door: two-way — additive UI; reverting the single commit restores the old row exactly.

Blast Radius: small — popup.html/popup.ts only; editor, background, and content scripts untouched. The new i18n key ships translated in de/es/ja/ko/pt/zh-Hans/zh-Hant. Merges cleanly with #65 (both touch popup.ts, verified with merge-tree; regions are disjoint).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant