Feedback requested on emulating env(safe-area-*) in device mode

49 views
Skip to first unread message

Max Ihlenfeldt

unread,
Feb 12, 2025, 2:22:09 AMFeb 12
to devtoo...@chromium.org
Hi,

As requested in https://issues.chromium.org/issues/40718410, it would be useful to emulate non-zero values for the CSS env(safe-area-*) environment variables (see https://developer.mozilla.org/en-US/docs/Web/CSS/env) in DevTools' device mode.

In the linked issue someone provided a patch that, with slight modifications to account for what changed since it was written, gives a working implementation for a new CDP request to override the values for these variables. I've uploaded the change to https://crrev.com/c/6253279, together with https://crrev.com/c/6252825 as a frontend PoC to test the implementation. You can find a video demo of the two CLs at https://issues.chromium.org/40718410#attachment62805533.

I'd like to confirm that this change would be accepted, and if yes, the process to land it. As I understand it, the change is small enough to not require a design doc. I'm aware I still need to write tests, and the frontend part is obviously not yet production-ready (I haven't thought about what the best UI/UX might be, suggestions would of course be welcome).

Best regards
Max


Changhao Han

unread,
Feb 12, 2025, 5:10:22 AMFeb 12
to Max Ihlenfeldt, devtoo...@chromium.org
Hi Max,

Thanks for taking this on! The POC looks that you are heading in the right direction, and you are right that we need some tests and probably making sure that UX works, although the UX is kind of minimal here. I think the next step would be to review the CLs from us, while you can think about possible improvements to the UX. I'll also chat with our UXD to see if we have any suggestions.

Looking forward to helping you land this!

Cheers
Changhao

--
You received this message because you are subscribed to the Google Groups "devtools-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to devtools-dev...@chromium.org.
To view this discussion visit https://groups.google.com/a/chromium.org/d/msgid/devtools-dev/8478cd1a-d695-4a76-800c-fa6cd74f9cfd%40igalia.com.

Max Ihlenfeldt

unread,
Feb 13, 2025, 11:01:57 AMFeb 13
to devtools-dev, chang...@google.com, devtoo...@chromium.org, Max Ihlenfeldt
Hi Changhao,

Thank you for your response, and great to hear there's support for this change! I've polished https://crrev.com/c/6253279 (as well as slightly extending the functionality as was suggested in the linked issue) and submitted it for review.

Regarding the UX, all input would be appreciated! I think it'd be good to move the discussion about it to https://issues.chromium.org/issues/40718410 so that all who are interested in the feature can share their ideas.

Best regards
Max

Leah Tu

unread,
Feb 19, 2025, 6:18:27 PMFeb 19
to devtools-dev, m...@igalia.com, chang...@google.com, devtoo...@chromium.org, nat...@microsoft.com, devtools-...@chromium.org
I've started an explainer with some initial ideas that we have for the front-end and would appreciate any feedback! 
Reply all
Reply to author
Forward
0 new messages