Repository navigation
feat(forms): separate logical fields from visual widgets - #164
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5467f171dd
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Thanks for opening your first pull request in this repository! ✌️ |
vitormattos
left a comment
There was a problem hiding this comment.
Requesting changes before merge to address two data-integrity issues documented in the inline comments: lossless model serialization and protection of widget-owned overlay identity and geometry. Each finding includes focused regression cases and positive controls.
Please also address the existing unresolved relationship-validation performance discussion without duplicating that thread, and add the missing DCO Signed-off-by trailer to the commit.
Add a plain, serializable field/widget model so one logical field can own several visual widgets. serializeFormModel validates shape and JSON constraints before cloning, formWidgetToElementObject keeps widget-owned id and geometry authoritative over host extras, and relationship validation uses lookup maps instead of repeated array scans. Signed-off-by: Luis Amorim <principal@felps.zip>
f2eb0c4 to
c1af1e5
Compare
Resolves: #84
📝 Summary
A single overlay rectangle cannot represent radio groups or the same form field appearing on several pages. Introduces a stable public model separating logical fields from visual widgets, providing the foundation for generic form-field editing in #85.
PDFFormFieldPDFFormWidgetPDFFormModelOne field can reference multiple widgets across pages. Unknown field types retain their identity. The existing
PDFElementObjectAPI remains compatible; form-aware consumers can adopt the model alongside their overlay store.Also adds:
docs/FORM_MODEL.mdAcroForm parsing/writing, PDF mutation, signing and host workflow concepts remain outside scope.
🧪 How to test
npm run test -- tests/utils/formModel.spec.tsnpm run test npm run build npm run validate:distValidation evidence
⚙️ Public API changes
🚧 Tasks
✅ Checklist
🤖 AI (if applicable)