DevTools

DevTools: Multiple viewports in Device Mode

Authors

Status of this feature

This feature is experimental and in active development. See Changelog section for details on progressive feature implementation.

Introduction

Current Device Mode

The history of the Device Mode feature in DevTools predates the current, diverse device ecosystem and mobile emulation has only grown in scope and complexity. Device Mode is a popular tool that web developers use to test the responsiveness of their web contents. Currently, Device Mode allows you to view the webpage through the dimensions of a single device. In this explainer, we propose that handling one device is not enough. There is currently no solution to seeing multiple viewports simultaneously in the DevTools. The only solution is to use browser extensions/external tools.

User Jobs-To-Be-Done (JTBD)

Solution

Prior Art

Already existing tools on the market include:

Each of these applications allow users to add multiple (more than 2) devices through their external application/extension. All these applications allow for synchronization when scrolling and have a multitude of device options (which did not account for newer devices).

Hypotheses

Trigger Conditions and Treatment

Metrics

Usage

Add a new viewport

Users will be able to add a new device to the viewport by simply checking a box from the dropdown list of devices in the viewport toolbar. Once a device is added, it will appear either next to or underneath the existing viewport(s) with a toolbar on top of it. The devices will be re-centered to accommodate the new viewport. As more devices are added and the viewport fills up, the user will be able to vertically scroll down the viewport to look at all the devices.

Open DevTools against a new viewport

DevTools will remain the same, regardless of the number of devices in the viewport. As in the current version of DevTools the user will be able to choose the placement of DevTools on their screen and expand/shrink the DevTools window. Initial exection of the feature will attach DevTools to one (primary) viewport. The larger goal of this project is to synchronize all the viewports with the DevTools.

Synchronize browsing and inspection across viewports

Browsing will be synchronized across devices in the viewport, meaning that scrolling in one device would mean all other devices would be kept in sync so they are displaying as close to the same content as possible. The same will also be true for inspecting and selecting items across different devices in the viewport.

Design

We have two designs: one for the feature as a whole and one for our intern project implementation. While the implementation of our project will start with only adding a second device, the design we created is scalable to allow for a larger number of devices all in one viewport.

The first design adds an entirely new viewport (almost like a new tab) for a second device. The second design allows users to add multiple devices into a grid formation in one viewport so users can more easily view a greater number of devices. Current user research suggets that 3-5 devices on the viewport would provide greater efficiency.

Design Mockup

Design Draft 2

Open Questions and Ideas

Changelog

Edge release Changelog
N/A N/A