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 |
This creates a PR 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.@caugner Generally we document all properties of the web API objects (not just the ones that have changed). Since these properties "live" in an object mapped to
Report.bodythat's where I've added them, grouped by type. So it looks like this:Note that I haven't yet added all the properties for the other types such as
type_csp-violation- not worth it unless you agree this is the right approach.Let me know.
Related docs work done in mdn/content#39880