Overview

The canvas is currently 10k2 pixels. This means that it is possible to scroll WAY off to the corner of the canvas and then it's tricky to navigate back to the content.

Proposed resolution

The canvas size should be dynamically set. For the UX to feel nice and users not to feel limited, it needs to be big enough that you can scroll up/down/left/right far enough to almost scroll the preview's off the opposite side of the screen.

The calculation would need to take into account the size of the user's current browser viewport, the size of the left and top toolbars, the height of the tallest preview iFrame (the canvas must always be taller than the iframes) and the total size of all the preview viewports the user is viewing (the ability to show a dynamic number of viewport sizes is coming later).

Ideally it should automatically resize if the browser window is resized and also as the size of the iFrames increase/decrease as their content is changed or the number/size of viewports displayed is updated.

User interface changes


Example of the furthest amount a user should be able to scroll to the top left


Example of the furthest amount a user should be able to scroll to the bottom right

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

jessebaker created an issue. See original summary.

wim leers’s picture

Title: Total canvas size should be dynamic based on browser viewport size » [later phase] Total canvas size should be dynamic based on browser viewport size
jessebaker’s picture

Issue summary: View changes

gauravvvv made their first commit to this issue’s fork.

gauravvvv’s picture

Status: Active » Needs review
lauriii’s picture

wim leers’s picture

Status: Needs review » Needs work
Issue tags: +Needs reroll

There's now a conflict 😭

gauravvvv’s picture

Status: Needs work » Needs review
Issue tags: -Needs reroll

  • jessebaker committed f130aba2 on 0.x authored by gauravvvv
    Issue #3469894 by gauravvvv, jessebaker: [later phase] Total canvas size...
jessebaker’s picture

Status: Needs review » Fixed

This is great stuff! I'm merging asap because I have a MR in review that I will likely need to adapt slightly to take this into account!

wim leers’s picture

Nice! 🤩

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.