content icon indicating copy to clipboard operation
content copied to clipboard

Editorial review: Topics API docs

Open chrisdavidmills opened this issue 2 years ago • 9 comments

Description

https://github.com/mdn/content/pull/28196 contains the engineering technical review for my work on Topics API docs, which has been completed and approved. Thank you to @samdutton for your thorough and detailed review work.

This is a new PR based on the same branch, which is intended to contain the editorial review for the same work.


Background information

The Topics API is an integral part of Google's privacy sandbox technologies. Many parts of this set are being made available by default in Chrome 115 (depending on a gradual ramp up to 100% of userbase over the 115 release period).

This PR provides documentation for the Topics API and its related HTTP headers and HTTP features.

See my research document for more details of exactly what changes are expected in the PR.

Motivation

Additional details

Related issues and pull requests

chrisdavidmills avatar Nov 08 '23 11:11 chrisdavidmills

Preview URLs (24 pages)
Flaws (14)

Note! 22 documents with no flaws that don't need to be listed. 🎉

URL: /en-US/docs/Web/API/Document Title: Document Flaw count: 6

  • macros:
    • /en-US/docs/Web/API/Document/xmlStandalone does not exist
    • /en-US/docs/Web/API/Document/captureEvents does not exist
    • /en-US/docs/Web/API/Document/getBoxQuads does not exist
    • /en-US/docs/Web/API/Document/releaseEvents does not exist
    • /en-US/docs/Web/API/Document/queryCommandIndeterm does not exist
    • and 1 more flaws omitted

URL: /en-US/docs/Web/API/HTMLIFrameElement Title: HTMLIFrameElement Flaw count: 8

  • macros:
    • /en-US/docs/Web/API/HTMLIFrameElement/align does not exist
    • /en-US/docs/Web/API/HTMLIFrameElement/allow does not exist
    • /en-US/docs/Web/API/HTMLIFrameElement/frameBorder does not exist
    • /en-US/docs/Web/API/HTMLIFrameElement/longDesc does not exist
    • /en-US/docs/Web/API/HTMLIFrameElement/marginHeight does not exist
    • and 3 more flaws omitted
External URLs (27)

URL: /en-US/docs/Web/Privacy/Privacy_sandbox Title: Privacy sandbox


URL: /en-US/docs/Web/Privacy/Privacy_sandbox/Enrollment Title: Privacy sandbox enrollment


URL: /en-US/docs/Web/API/fetch Title: fetch() global function


URL: /en-US/docs/Web/API/Document/browsingTopics Title: Document: browsingTopics() method


URL: /en-US/docs/Web/API/Topics_API Title: Topics API


URL: /en-US/docs/Web/API/Topics_API/Using Title: Using the Topics API


URL: /en-US/docs/Web/API/HTMLIFrameElement/browsingTopics Title: HTMLIFrameElement: browsingTopics property


URL: /en-US/docs/Web/HTTP/Headers/Permissions-Policy/browsing-topics Title: Permissions-Policy: browsing-topics


URL: /en-US/docs/Web/HTTP/Headers/Observe-Browsing-Topics Title: Observe-Browsing-Topics


URL: /en-US/docs/Web/HTTP/Headers/Sec-Browsing-Topics Title: Sec-Browsing-Topics

(comment last updated: 2024-02-22 16:31:41)

github-actions[bot] avatar Nov 08 '23 11:11 github-actions[bot]

Thanks for your thoroughness and patience, Chris!

samdutton avatar Nov 08 '23 18:11 samdutton

Hey Chris, I will take a look at this one.

wbamberg avatar Nov 09 '23 15:11 wbamberg

This pull request has merge conflicts that must be resolved before it can be merged.

github-actions[bot] avatar Nov 16 '23 20:11 github-actions[bot]

@wbamberg see https://github.com/mdn/content/discussions/30428 for relevant discussion about representing standards positions in this PR.

edit: the discussion is now at https://github.com/orgs/mdn/discussions/463

chrisdavidmills avatar Nov 21 '23 10:11 chrisdavidmills

OK, I have reworked this content quite significantly after considering all the comments made. I'm a bit concerned that, previously I felt like I understood this API, and now I don't feel so sure, and have outstanding questions once more.

I think it might be a good approach for @samdutton to first read the new state of the main landing page and "Using..." guide, have a look at the following questions, and see if he can provide clarification and tell me where I'm now going wrong. I'll then try another rewrite to hopefully clear things up before @wbamberg reviews it again.

I am a bit concerned that this might turn into a huge megathread, in which case maybe we could set up a call to discuss this rather than going back and forth in comments?

  1. In the new "Using..." guide, I've tried to explain what is going on in a high-level fashion before then talking about what technically happens separately, afterwards. In the "High-level overview" section, points 2-4, I've talked in a very hand-wavy fashion about the browser calculating topics per epoch, then choosing top topics per epoch, then choosing one top topic which is then sent to the caller when the

    Looking at this again, I think it would make more sense for me to put point 4 as a subbullet under point 1, as surely this happens when the site is loaded...then explain the ongoing process of calculating user topics and top topics separately below...but again, I'm not sure if that is correct.

  2. In the "How are topics returned to the caller?" section, I've tried to explain what happens when an

    I'm particularly confused by how Observe-Browsing-Topics is used. I thought "observing a topic" was done on the client-side, when the

  3. I've started to change the text that describes technically how this works to talk about the one chosen top topic being sent to the caller via the Sec-Browsing-Topics, rather than multiple top topics, as this is implied earlier comments on this thread ("That topic is returned to the caller"). Is this correct? If so, I'll need to change the descriptions of all the other API features to suit.

    I'm also concerned about where Document.browsingTopics fits into this, as that is specifically defined as returning multiple topics that can then be sent to the caller in a manner of your choosing (i.e. fetch()) rather than a single topic. So why is this different?

  4. I've described the different features that cause the browser to observe topics and send the top topic back to the caller as features that "enable the Topics API" (see the "What API features enable the Topics API?" section). does that make sense?

    I also wanted to check - you only need to use any one of these features, depending on what makes most sense for your particular codebase, right? You don't need to use a combination?

chrisdavidmills avatar Dec 07 '23 11:12 chrisdavidmills

This pull request has merge conflicts that must be resolved before it can be merged.

github-actions[bot] avatar Dec 20 '23 08:12 github-actions[bot]

This pull request has merge conflicts that must be resolved before it can be merged.

github-actions[bot] avatar Jan 05 '24 04:01 github-actions[bot]

This pull request has merge conflicts that must be resolved before it can be merged.

github-actions[bot] avatar Feb 10 '24 09:02 github-actions[bot]

Yay, thanks @wbamberg!

chrisdavidmills avatar Feb 23 '24 09:02 chrisdavidmills

Thanks all, for being so patient and thorough!

One thing we'll need to update: developer.mozilla.org/en-US/docs/Web/API/Topics_API/Using#selecting_topics_of_interest_to_influence_ad_choice

The algorithm for top topics selection used by Chrome has been updated: developers.google.com/privacy-sandbox/blog/topics-enhancements. With a little tweaking, we could pretty much use that explanation as it is.

On Fri, 23 Feb 2024 at 09:28, Chris Mills @.***> wrote:

Yay, thanks @wbamberg https://github.com/wbamberg!

— Reply to this email directly, view it on GitHub https://github.com/mdn/content/pull/30107#issuecomment-1960989382, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABSDKRK32WQK6YEPIUGHU3YVBOLNAVCNFSM6AAAAAA7CXGMRCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNRQHE4DSMZYGI . You are receiving this because you were mentioned.Message ID: @.***>

samdutton avatar Feb 23 '24 10:02 samdutton