Closed Bug 1072080 Opened 5 years ago Closed 5 years ago

Add the ability to define a marshaller for form data

Categories

(DevTools :: General, defect)

x86
macOS
defect
Not set

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1073691

People

(Reporter: dcamp, Unassigned)

Details

Attachments

(1 file, 1 obsolete file)

Attached patch form-types.diff (obsolete) — Splinter Review
Right now form data is always a json blob, which leads to a decent amount of manual marshalling.

The attached patch lets a user provide a formType: attribute in the prototype.  This is just a protocol.js type through which the form will be marshalled after calling form() on the server side, and before calling form() on the client side.

A few complications:
* If detail types are used, a "formType#<detail>" attribute must be specified too.
* Almost all of these are going to be one-off dictionary types, so rather than forcing the user to call types.addDictType("whatever", { <types> }), this assumes that a non-type should be passed to a types.addDictType("ActorName__formType", {}) call.

I'm tagging bgrins for this review because of this command:

server ▶ hg anno -u protocol.js | awk '{print $1}' | sort | uniq -c | sort -r
1377 dcamp:
  12 bgrinstead:

But feel free to pass on the review if needed.
Attachment #8494219 - Flags: review?(bgrinstead)
Attachment #8494219 - Flags: review?(bgrinstead)
Attached patch form-types.diffSplinter Review
Attachment #8494219 - Attachment is obsolete: true
Attachment #8498300 - Flags: review?(jryans)
Attachment #8498300 - Flags: review?(jryans) → review+
I guess this is the dupe then. :)
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1073691
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.