w3c / virtual-keyboard

VirtualKeyboard API
https://w3c.github.io/virtual-keyboard/
Other
16 stars 3 forks source link

Confusion about "viewport" terminology in the illustrations #9

Open bramus opened 2 years ago

bramus commented 2 years ago

When looking at the Editor's Draft I currently see this illustration:

image

I'm pretty confused about the "Current Behavior" part, as it doesn't mention which viewport it is about. First I thought of the Layout Viewport, only to later on mentally switch to the Visual Viewport. To prevent any confusion I think it's best to use the term "Visual Viewport" in the illustration.

Additionally I guess —don't have any numbers on it— not that many people know of the Visual Viewport, and will think of the Layout Viewport when they read just "viewport" as that's the only viewport they know. This again pleads for explicit usage of the term "Visual Viewport".

Furthermore, it'd be best to also indicate that the illustration resembles scenario 3 from the summation written above it:

User agents respond to the presence of the VK, without any exposure of this information to web developers in the following way: 1. Repositioning the user agent above the VK 2. Reducing the size of the layout viewport so the VK doesn't occlude it 3. Reducing the size of the visual viewport and padding the layout viewport to ensure it can be shifted above the VK

(On a side note: wouldn't it be better if this summation was an actual list instead of a one line sentence?)