Intent to Ship: ContentVisibilityAutoStateChanged event

158 views
Skip to first unread message

Vladimir Levin

unread,
Aug 8, 2022, 2:48:35 PM8/8/22
to blink-dev

Contact emails

vmp...@chromium.org

Explainer

https://github.com/vmpstr/web-proposals/blob/main/explainers/cv-auto-event.md

Specification

https://drafts.csswg.org/css-contain-2/#content-visibility-auto-state-changed

Summary

This proposal is to add an event that would fire on a content-visibility: auto element when the rendering state of the element changes due to any of the attributes that make the element relevant to the user (https://www.w3.org/TR/css-contain-2/#relevant-to-the-user)


Blink component

Blink

TAG review

https://github.com/w3ctag/design-reviews/issues/756

TAG review status

Issues addressed

Risks



Interoperability and Compatibility

This is a new feature that enhances `content-visibility: auto` use. It poses minimal interop and compat risks, and can be feature detected and polyfilled



Gecko: Under consideration (https://github.com/mozilla/standards-positions/issues/664)

WebKit: No signal (https://github.com/WebKit/standards-positions/issues/33)

Web developers: Positive (https://github.com/w3c/csswg-drafts/issues/7384#issuecomment-1182039257)

Other signals:

WebView application risks

Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?

No



Debuggability

This feature can be debugged similarly to other events



Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?

Yes

Is this feature fully tested by web-platform-tests?

Yes

Flag name

ContentVisibilityAutoStateChangedEvent

Requires code in //chrome?

False

Tracking bug

https://bugs.chromium.org/p/chromium/issues/detail?id=1343432

Measurement

ContentVisibilityAutoStateChangedHandlerRegistered use counter (patch in progress)

Non-OSS dependencies

Does the feature depend on any code or APIs outside the Chromium open source repository and its open-source dependencies to function?

No

Estimated milestones

106


Link to entry on the Chrome Platform Status

https://chromestatus.com/feature/5179553291436032

Links to previous Intent discussions

Intent to prototype: https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CADsXd2NdBBy0u5mfoErwy5FOUetVAmAXWB%2B1EmjNnFwZ0QH8%2Bw%40mail.gmail.com


This intent message was generated by Chrome Platform Status.

Manuel Rego Casasnovas

unread,
Aug 10, 2022, 8:57:44 AM8/10/22
to Vladimir Levin, blink-dev

On 08/08/2022 20:48, Vladimir Levin wrote:
> Explainer
>
> https://github.com/vmpstr/web-proposals/blob/main/explainers/cv-auto-event.md
> <https://github.com/vmpstr/web-proposals/blob/main/explainers/cv-auto-event.md>

Should we update the explainer to update on the a11y concerns raised at
https://github.com/w3c/csswg-drafts/issues/7384#issuecomment-1189938042

The explainer explicitly mentions:
"For example, the developer may want to stop React updates in a subtree
that is not rendered by the user-agent."

Which seems not a good idea according to the discussion linked above.

Cheers,
Rego

Vladimir Levin

unread,
Aug 10, 2022, 10:29:48 AM8/10/22
to Manuel Rego Casasnovas, blink-dev
Thanks for pointing this out. I've updated the explainer to reflect the discussion we had on a11y.

Thanks,
Vlad

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/93e41d83-a388-44f4-4456-77aeb87f3821%40igalia.com.

slightlyoff via Chromestatus

unread,
Aug 10, 2022, 6:48:23 PM8/10/22
to blin...@chromium.org
LGTM1

Yoav Weiss

unread,
Aug 31, 2022, 9:47:43 AM8/31/22
to slightlyoff via Chromestatus, blink-dev
LGTM2 conditional on driving the discussion on the Mozilla position thread to completion and making sure the spec text properly reflects it.

On Thu, Aug 11, 2022 at 12:48 AM slightlyoff via Chromestatus <admin+sl...@cr-status.appspotmail.com> wrote:
LGTM1

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.

Philip Jägenstedt

unread,
Aug 31, 2022, 11:39:38 AM8/31/22
to Yoav Weiss, slightlyoff via Chromestatus, blink-dev
LGTM3 on the assumption that the spec discussion will be sorted out and spec fixed by the time this rolls out to stable.

Vladimir Levin

unread,
Nov 10, 2022, 5:07:18 PM11/10/22
to Philip Jägenstedt, Yoav Weiss, slightlyoff via Chromestatus, blink-dev
Hi all,

CSSWG resolved on renaming this event to be in the present tense:
ContentVisibilityAutoStateChangeEvent instead of ContentVisibilityAutoStateChangedEvent

This is currently in the Beta channel (m108). According to https://chromestatus.com/metrics/feature/popularity#ContentVisibilityAutoStateChangedHandlerRegistered there's 0.0191% usage of this (event handler being registered), although the timeline view doesn't show any data.

I would like to rename the event, and attempt to merge this to beta. I will also reach out to partners that we worked with for this event to ensure they are aware of this change. 

Please let me know if there are concerns with this plan.

Thanks,
Vlad

Reply all
Reply to author
Forward
0 new messages