You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The `viewport` field in `HostContext`communicates sizing constraints between host and app. Each dimension (height and width) operates independently and can be either **fixed** or **flexible**.
528
+
The `HostContext`provides two separate fields for sizing information:
524
529
525
-
#### Viewport Modes
530
+
-**`containerDimensions`**: The dimensions of the container that holds the app. This controls the actual space the app occupies within the host. Each dimension (height and width) operates independently and can be either **fixed** or **flexible**.
526
531
527
-
| Mode | Viewport Field | Meaning |
528
-
|------|---------------|---------|
532
+
-**`viewport`**: The host window's dimensions (e.g., `window.innerWidth` and `window.innerHeight`). Apps can use this to make responsive layout decisions based on the overall screen size.
533
+
534
+
#### Dimension Modes
535
+
536
+
| Mode | Dimensions Field | Meaning |
537
+
|------|-----------------|---------|
529
538
| Fixed |`height` or `width`| Host controls the size. App should fill the available space. |
530
539
| Flexible |`maxHeight` or `maxWidth`| App controls the size, up to the specified maximum. |
531
540
| Unbounded | Field omitted | App controls the size with no limit. |
@@ -534,33 +543,39 @@ These modes can be combined independently. For example, a host might specify a f
534
543
535
544
#### App Behavior
536
545
537
-
Apps should check the viewport configuration and apply appropriate CSS:
546
+
Apps should check the containerDimensions configuration and apply appropriate CSS:
0 commit comments