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**.
536
+
The `HostContext`provides two separate fields for sizing information:
532
537
533
-
#### Viewport Modes
538
+
-**`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**.
534
539
535
-
| Mode | Viewport Field | Meaning |
536
-
|------|---------------|---------|
540
+
-**`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.
541
+
542
+
#### Dimension Modes
543
+
544
+
| Mode | Dimensions Field | Meaning |
545
+
|------|-----------------|---------|
537
546
| Fixed |`height` or `width`| Host controls the size. App should fill the available space. |
538
547
| Flexible |`maxHeight` or `maxWidth`| App controls the size, up to the specified maximum. |
539
548
| Unbounded | Field omitted | App controls the size with no limit. |
@@ -542,33 +551,39 @@ These modes can be combined independently. For example, a host might specify a f
542
551
543
552
#### App Behavior
544
553
545
-
Apps should check the viewport configuration and apply appropriate CSS:
554
+
Apps should check the containerDimensions configuration and apply appropriate CSS:
0 commit comments