privacycg / proposals

New proposals in the Privacy Community Group
https://privacycg.github.io
122 stars 5 forks source link

Fragment Directives API #40

Closed eligrey closed 8 months ago

eligrey commented 9 months ago

I am proposing a specification for adoption by the PrivacyCG that aims to codify a way to read and write fragment directives from all supported location interfaces while accounting for the privacy concerns introduced by accessing potentially privacy-sensitive directives (e.g. text).

My proposed spec: https://github.com/eligrey/fragment-directives

Related issue in scroll-to-text spec repository: https://github.com/WICG/scroll-to-text-fragment/issues/128

eligrey commented 9 months ago

@zcorpan left some feedback here about permission prompts and determining what directives should be considered sensitive: https://github.com/eligrey/fragment-directives/issues/1

eligrey commented 9 months ago

I intentionally chose to re-use URLSearchParams in this spec for implementation simplicity, but I can introduce URLFragmentDirectives if there is interest for it. If we re-use URLSearchParams there will be a slight API ergonomics concern with the leading ? in string representation. That could be easily special-cased to be ignored.

Aside from the obvious string representation difference, a URLFragmentDirectives constructor could also parse out fragment directives from a full hash fragment.

eligrey commented 9 months ago

Full disclosure: I work for Transcend, and we currently use performance.getEntries() as part of our implementation of accessing custom fragment directives for our consent manager SDK. We use the compat behavior to help ensure that our URL-based configuration options won't interfere with routing on customer sites.

martinthomson commented 8 months ago

@eligrey can you explain why you think Privacy CG is the right forum to develop this proposal? From what I can see, this is a straightforward extension to the text fragment work that is being developed in WICG. I would suggest that you seek to engage in that forum, probably with the proponents of that work.

@jyasskin you asked for time on our agenda for this. Can you give me a little more context? If we are going to set aside time, then we'd need to know who would be leading that work and what you would hope to achieve. Is it simply a request to discuss adoption as Eli requests?

jyasskin commented 8 months ago

Eli asked someone to agenda+ it in https://w3cping.slack.com/archives/CSVA13FJB/p1696271146530939, so I did.

erik-anderson commented 8 months ago

This was discussed on our October 12th call: https://github.com/privacycg/meetings/blob/main/2023/telcons/10-12-minutes.md. While it wasn't captured in the minutes, I think something along the lines of Martin's feedback about taking this proposal to the WICG was given.

@eligrey any objections to closing out this issue here? Feel free to add a pointer to the new location.

eligrey commented 8 months ago

Yeah, I'm fine with closing this out. I'll post a new link here once I've moved the proposal over to WICG.

eligrey commented 1 month ago

This has been re-proposed under WICG: https://github.com/WICG/proposals/issues/154