Skip to content

NO-2080: Add typed signature input mode - #313

Draft
vivekjyani wants to merge 13 commits into
mainfrom
NO-2080
Draft

vivekjyani wants to merge 13 commits into
mainfrom
NO-2080

Conversation

@vivekjyani

@vivekjyani vivekjyani commented Apr 18, 2026 •

Copy link
Copy Markdown
Collaborator

1) Spec Context

This PR implements NO-2080 by adding typed-signature support alongside draw mode, and by tightening signature behavior for edit/reopen flows across standard, table, and collection signature fields.

2) What Changed (Code + Files)

Core implementation

  • Sources/JoyfillUI/View/Fields/SignatureView.swift
  • Sources/JoyfillUI/View/Fields/TableView/TableSignatureView.swift

Key updates

  • Added draw/type toggle support in signature input.
  • Added typed-signature rendering flow (TypeToSign + typed snapshot generation).
  • Added mode-specific save behavior:
    • Draw mode preserves existing canvas snapshot behavior.
    • Type mode trims input, treats empty value as clear, snapshots typed text, and clears stale draw line data.
  • Restored previously typed signature text when reopening an existing typed signature for edit.
  • Updated typed-signature font styling and removed opacity-based text styling.
  • Updated table signature entry behavior to reset mode/editability before presenting the sheet.

3) UI Test Coverage Added

Files changed

  • JoyfillSwiftUIExample/JoyfillUITests/SignatureField/SignatureFieldUITestCases.swift
  • JoyfillSwiftUIExample/JoyfillUITests/TableField/TableNumber_Block_DateFieldTest.swift
  • JoyfillSwiftUIExample/JoyfillUITests/Collection/CollectionFieldTests.swift

New test scenarios

  • Existing saved signature opens read-only preview first (with Edit action).
  • Signature mode resets to Draw when reopening a fresh signature sheet.
  • Previously typed text is restored on edit.
  • Typed signatures are row-scoped in table/collection flows (no carry-over to new rows).

4) Public API / Docs

  • No public API changes.
  • No docs update required.

5) Reviewer Notes

  • Primary focus areas:
    • mode-specific save logic and state cleanup
    • typed-text restore path on edit
    • row-scoped behavior in table/collection signature flows

@vivekjyani vivekjyani left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall the feature is well-structured and tests are thorough. A few issues flagged inline — most notably the dead signatureInputMode state in TableSignatureView and an access-control gap in CanvasSignatureView.

Comment thread Sources/JoyfillUI/View/Fields/TableView/TableSignatureView.swift Outdated
Comment thread Sources/JoyfillUI/View/Fields/TableView/TableSignatureView.swift Outdated
Comment thread Sources/JoyfillUI/View/Fields/SignatureView.swift Outdated
Comment thread Sources/JoyfillUI/View/Fields/SignatureView.swift Outdated
Comment thread Sources/JoyfillUI/View/Fields/SignatureView.swift Outdated
Comment thread Sources/JoyfillUI/View/Fields/SignatureView.swift Outdated

@vivekjyani vivekjyani left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Second-pass review — three additional issues found.

Comment thread Sources/JoyfillUI/View/Fields/SignatureView.swift
Comment thread Sources/JoyfillUI/View/Fields/SignatureView.swift Outdated
Comment thread Sources/JoyfillUI/View/Fields/SignatureView.swift Outdated
@vivekjyani
vivekjyani marked this pull request as draft August 13, 2026 05:34
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