Repository navigation
fix(esign): place boxes on the page in view, drag them across pages, step through spots - #217
Merged
Merged
Conversation
Contributor
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 29 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
…step through spots
- "Add spot" under each signer adds a box at once on the page in the middle of
the viewer, in clear space on screen (`freePlaceOn`), instead of waiting for a
click; a signer added while looking at an earlier page gets their box there.
- Extra spots are marks by default: one PDF signature, shown again, so one PIN
signs every spot (full signatures stay available and share the agent's one
card session, as before). The row says "One PIN signs all N spots."
- Boxes drag to any page: drawn over the page under the pointer, re-measured for
it on drop and kept inside it; the viewer scrolls near its edges; between or
off pages the box turns red ("Drop it on a page") and snaps back on drop.
- The backend's placement rules are mirrored in `placement.ts`: a box it would
refuse is red with the reason and keeps Send / Sign with CIE off.
- "‹ Spot 2 of 5 ›" and `[` / `]` step through the boxes in New request, on the
request page and in Sign together.
- The viewer's page counter follows the page in its middle on scroll.
lorenzocorallo
force-pushed
the
fix/esign-placement-ux
branch
from
December 5, 2026 19:43
b1336cd to
49ac77f
Compare
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.
Admin only. No backend or agent change, so it can merge and deploy in any order.
1. A new box lands on the page in view
freePlaceOninplaces.ts: clear of text, signatures and other boxes, closest to the middle of the visible band). A signer added while the user has scrolled to an earlier page gets their box there; otherwise the documented foot-of-the-last-page layout stays.2. Drag across pages, never into an invalid position
SignatureBoxdrags to any page: over another page the box is drawn there and moves to it on drop, re-measured for that page (same size in points) and kept inside it. Near the viewer's top/bottom edge the drag scrolls the pages.placement.tsmirrors the backend's rules (backend/src/esign/placement.ts: page in range, ≥3% a side, ≤1; the backend clamps into the page, the client requires it). Overlap is allowed, as on the backend. A box breaking a rule is red with the reason and keeps Send request / Sign and send / Sign with CIE disabled with the reason under it (New request, request page, Sign together).3. Several spots per signer, one signing action
Investigated end to end: this already works with one PIN. The backend's job holds all of a signer's places;
agentPrepare/agentCompleteanswernextuntil every full signature is made, and the first signature's incremental update also draws everymark(PAdES-covered,pades.ts). The agent'ssignJob(sign-agentinternal/server/server.go) loops prepare →SignDigest→ complete on one card session opened with one PIN. So the smallest change is UI-only:4. Spot navigation
"‹ Spot 2 of 5 ›" in the viewer toolbar plus
[/](ignored in fields, menus and dialogs) step through the boxes in reading order, centring each and ringing it for a moment: every box in New request, the viewer's own boxes still to sign on the request page and in Sign together.Verification
pnpm check,pnpm typecheck,pnpm test(newtests/esign-placement.test.mjs),pnpm build.]/[stepped through 3 spots; created a request with 1 signature + 2 marks and opened it as the signer and in Sign together.