Conversation
|
Tip: Review these changes grouped by change (recommended for most PRs), or grouped by feature (for large PRs). |
|
@caugner Thanks for your attention and taking this up in the BCD meeting. The spec is now updated in w3c/reporting#284 so But what this means is that this has become a "real" problem affecting all the current report types. If BCD is going to avoid dictionaries then the only option I see here is to add the information somehow to The actual place the objects appear is in a EDIT PS, I think this does mean we need to deprecate to_json in the |
|
@caugner And it just got even more messy in w3c/reporting#216 (comment) which seems to indicate that only report bodies which need to show up in The implication, which I am checking, is that COOP and COEP report types only appear in reporting server endpoints - i.e. they are JSON objects posted to a server and not things you can get via ReportingObserver. I have no idea what the "right thing" to do is now for COEP, COOP. Probably what we are proposing to do here, but you might argue that the information should go as a subfeature of the respective COOP / COEP headers - and I couldn't argue that. But the discussion above is still value for the other reporting types. |
5b593e6 to
b394dc7
Compare
|
@caugner I think the way this is now is the correct way to do this. Naming convention might not be right, but I think the approach is. Can you review? The So Right now a We don't record the subfeatures unless they change for the particular type. The only other way to do this is perhaps to add subfeatures to indicate the existing report types are dictionaries, and the versions in which that happens - such as This is good for the docs, but I don't see that as workable for BCD because you still need to find some way to report the coep dict - which as a dict you won't able to add a record for. YOu'll also have all these derived dicts you'll need to remove at some point. |
|
This came up on today's BCD call. I took a look at the spec and the discussion for it. I'm sorry that they've done this to you, Hamish. If these really are dictionaries, then there's no real support story to talk about. The purist move would be to sidestep a lot of this:
On MDN, I would suggest documenting the report body dictionaries as dictionaries (i.e., don't mention the interfaces). I would use the |
a0deba6 to
f418a67
Compare
|
@ddbeck Thank you so much - just the clear direction that I needed. This PR has been updated as you suggested in #27047 (comment) Note, I did not mark the dictionaries as non-standard, though perhaps I should have. @caugner Ready for re-review. Should be good. |
|
For paper trail purposes: in chat, Hamish mentioned that |
f418a67 to
68ac365
Compare
|
@caugner Now that this satisfies @ddbeck can I get a re-review? Note that I have just updated this for FF149 which releases support for the Reporting API, including CSP and Integrity-Policy. See https://bugzilla.mozilla.org/show_bug.cgi?id=2008916 and the changes made in #29135 |
| "value_to_set": "true" | ||
| } | ||
| ] | ||
| "version_added": "149" |
There was a problem hiding this comment.
Note, support for this enabled in https://bugzilla.mozilla.org/show_bug.cgi?id=1976074 - you can see that the IDL has all the poperties https://searchfox.org/firefox-main/source/dom/webidl/Reporting.webidl
Note that IntegrityViolationReportBody also defined in FF, but is explicitly not in BCD, so I haven't touched that.
Elchi3
left a comment
There was a problem hiding this comment.
Thanks for sorting out this strange structure here. I think structurally this is all good now. Some things to look into:
- Some "interfaces" are not exposed to window context but they are supported in Firefox 149. This affects DeprecationReportBody and Report.
- ReportBody seems supported as well as exposed to window context.
- report-to CSP directive is probably also shipping?
- Report-To and Reporting-Endpoints headers are probably also shipping?
If an interface is not exposed to window, does it "count" for support in BCD? If I can't do something like (I ask because I've had #19304 (comment) open in a tab for months and I'd like to figure out how to handle that.) |
Well these are "interfaces", so not really interfaces but rather dictionaries/objects and the implication is exactly that: not exposed to window contexts by design. Since dictionaries are gone from BCD, we're in this situation rarely these days. But here we are again. https://developer.mozilla.org/en-US/docs/Web/API/DeprecationReportBody#browser_compatibility is the compat table and I think code to test support that would "count" would be something like: |
Updated version_added for Firefox to 149 and removed flags.
|
Thanks @Elchi3 - I've done a search on the enabled preference |
This creates a PR to deprecate the Report, ReportBody, and derived objects, which were converted to dictionaries in the spec. It also adds the supported report types as options to the ReportingObserver constructor. This is all as suggested in #27047 (comment)
Below is some context.
to test the suggestion for structuring Reporting API report body types made in #27021 - what was suggested there did not quite survive attempted rollout.
For context,
ReportAPI with propertiestype,body,url..bodycan take an object that is derived fromReportBodythat differs based on thetype.Report,ReportBody, and derived types such asInterventionReportBodywere originally IDL objects, which means that previously we could document body types in the body interfaces, such asInterventionReportBodyReportBodyand possibly evenReportto be dictionaries.Report. Note that eventually this will probably have to go inReportingObserver. Yuck.We have is a whole bunch of different string values for
Report.type. We also have a whole bunch of possible report body properties, which vary or might potentially vary by type.Related docs work done in