Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add compat data for FormData Web API #1487

Merged
merged 19 commits into from
May 15, 2018
Merged

Add compat data for FormData Web API #1487

merged 19 commits into from
May 15, 2018

Conversation

theCalibrius
Copy link
Contributor

No description provided.

@teoli2003 teoli2003 added the data:api Compat data for Web APIs. https://developer.mozilla.org/docs/Web/API label Mar 17, 2018
dontcallmedom added a commit to dontcallmedom/browser-compat-data that referenced this pull request Mar 17, 2018
Elchi3 pushed a commit that referenced this pull request Mar 17, 2018
mlbrgl pushed a commit to mlbrgl/browser-compat-data that referenced this pull request Mar 29, 2018
Copy link
Collaborator

@ddbeck ddbeck left a comment

Choose a reason for hiding this comment

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

This looks pretty good so far. I spotted some possible notes improvements for your consideration, but that was it. Thank you, @theCalibrius!

},
"firefox": {
"version_added": "4",
"notes": "Prior to Gecko 7.0 (Firefox 7.0 / Thunderbird 7.0 / SeaMonkey 2.4), if you specified a <a href='https://developer.mozilla.org/docs/Web/API/Blob'><code>Blob</code></a> as the data to append to the object, the filename reported in the 'Content-Disposition' HTTP header was an empty string; this resulted in errors being reported by some servers. Starting from Gecko 7.0, the filename 'blob' is sent."
Copy link
Collaborator

Choose a reason for hiding this comment

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

A few things here:

  • For clarity, it helps to trim down notes to refer only to the browser that the note is attached to (e.g., Firefox, not Gecko or other browsers). So in this case, I'd rework this as something along the lines of "Before Firefox 7… Starting from Firefox 7, the filename 'blob' is sent."
  • A minor thing, but the text formatting could be improved a little by putting Content-Disposition and blob in <code> tags instead of single quotes
  • Finally, the version numbers in notes should match the convention for that browser (e.g., no trailing zero for Firefox)

This comes up in a few places, so I'll 🚩 them too

"notes": "Prior to Gecko 7.0 (Firefox 7.0 / Thunderbird 7.0 / SeaMonkey 2.4), if you specified a <a href='https://developer.mozilla.org/docs/Web/API/Blob'><code>Blob</code></a> as the data to append to the object, the filename reported in the 'Content-Disposition' HTTP header was an empty string; this resulted in errors being reported by some servers. Starting from Gecko 7.0, the filename 'blob' is sent."
},
"firefox_android": {
"version_added": "4"
Copy link
Collaborator

Choose a reason for hiding this comment

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

The note for Firefox also applies to Firefox for Android, so copying the revised note here would be ideal.

"support": {
"webview_android": {
"version_added": "3",
"notes": "XHR in Android 4.0 sends empty content for FormData with blob."
Copy link
Collaborator

Choose a reason for hiding this comment

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

It'd be nice to see <code>blob</code>, to match the previous note like this one

},
"firefox": {
"version_added": "4",
"notes": "Prior to Gecko 7.0 (Firefox 7.0 / Thunderbird 7.0 / SeaMonkey 2.4), if you specified a <a href='https://developer.mozilla.org/docs/Web/API/Blob'><code>Blob</code></a> as the data to append to the object, the filename reported in the 'Content-Disposition' HTTP header was an empty string; this resulted in errors being reported by some servers. Starting in Gecko 7.0 the filename 'blob' is sent."
Copy link
Collaborator

Choose a reason for hiding this comment

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

🚩 This note could be revised too (browser name, formatting version numbers)

},
"firefox_android": {
"version_added": "4",
"notes": "Prior to Gecko 7.0 (Firefox 7.0 / Thunderbird 7.0 / SeaMonkey 2.4), if you specified a <a href='https://developer.mozilla.org/docs/Web/API/Blob'><code>Blob</code></a> as the data to append to the object, the filename reported in the 'Content-Disposition' HTTP header was an empty string; this resulted in errors being reported by some servers. Starting in Gecko 7.0 the filename 'blob' is sent."
Copy link
Collaborator

Choose a reason for hiding this comment

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

🚩 This note could be revised too (browser name, formatting version numbers)

},
"ie": {
"version_added": "10",
"notes": "With the'Include local directory pass when uploading files to a server' option enabled, IE will change the filename inside the <a href='https://developer.mozilla.org/docs/Web/API/Blob'><code>Blob</code></a> on the fly. To have direct control of the sent filename, the developer should send the filename as the third parameter value, i.e. <i>formData.append(name, value, filename)</i>."
Copy link
Collaborator

Choose a reason for hiding this comment

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

A couple little quirks in the formatting here. It looks like there's a space missing before "Include" and the example call at the end might read a little nicer in <code> instead of <i>. Also, instead of single quotes around the option text, you can use double quotes with a backslash, like this \", or an HTML entity (like &quot;)

"AppendWithFilename": {
"__compat": {
"mdn_url": "https://developer.mozilla.org/docs/Web/API/FormData/append",
"description": "append with filename",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Perhaps <code>append</code> with filename here?

"AppendWithFilename": {
"__compat": {
"mdn_url": "https://developer.mozilla.org/docs/Web/API/FormData/append",
"description": "append with filename",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Perhaps <code>append</code> with filename too?

@theCalibrius
Copy link
Contributor Author

Thanks Daniel. Changes made.

Copy link
Collaborator

@ddbeck ddbeck left a comment

Choose a reason for hiding this comment

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

@theCalibrius Thanks for your patience while I got back to you on this. Also, I'm sorry, but I missed a couple of things in my earlier review. Hopefully these should be the last changes needed before we can merge. Thank you!

}
}
},
"AppendWithFilename": {
Copy link
Collaborator

Choose a reason for hiding this comment

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

This appears appears to be a duplicate of the FormData.append.AppendWithFilename data above. You can remove this one.

}
}
},
"WebWorkers": {
Copy link
Collaborator

Choose a reason for hiding this comment

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

The WebWorkers subfeature doesn't need to be duplicated throughout—so you can leave in only this one top-level feature and remove the others (I got clarification on this separately, which is why I didn't mention it before)

@theCalibrius
Copy link
Contributor Author

Thanks again, Daniel. Requested changes have been committed.

@ddbeck ddbeck merged commit 5328a43 into mdn:master May 15, 2018
@ddbeck
Copy link
Collaborator

ddbeck commented May 15, 2018

Thank you very much for your contribution, Brian!

ddbeck added a commit to ddbeck/browser-compat-data that referenced this pull request May 15, 2018
I missed a few things while reviewing the original PR mdn#1487:

- descriptions for methods (not strictly required, but nice to have)
- workers consistency
@Elchi3 Elchi3 added this to the Q2 Sprint 3 milestone May 16, 2018
foolip added a commit to foolip/browser-compat-data that referenced this pull request Mar 27, 2021
These entries were added separately at different times:
- SupportForOf in mdn#1487
- @@iterator in mdn#8104

The data is the same (or missing) except for Edge and Safari.

The @@iterator entry is based on mdn-bcd-collector results, but
https://software.hixie.ch/utilities/js/live-dom-viewer/saved/9119 was
used to confirm support of for...of loops in Edge 18 (but not 17) and in
Safari 11.1 (but not 11).

In other words, no data needed updating on the @@iterator entry.
ddbeck pushed a commit that referenced this pull request Apr 1, 2021
These entries were added separately at different times:
- SupportForOf in #1487
- @@iterator in #8104

The data is the same (or missing) except for Edge and Safari.

The @@iterator entry is based on mdn-bcd-collector results, but
https://software.hixie.ch/utilities/js/live-dom-viewer/saved/9119 was
used to confirm support of for...of loops in Edge 18 (but not 17) and in
Safari 11.1 (but not 11).

In other words, no data needed updating on the @@iterator entry.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
data:api Compat data for Web APIs. https://developer.mozilla.org/docs/Web/API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants