diff --git a/docs/reference/field-types/object.md b/docs/reference/field-types/object.md index ad6f5267..287042e0 100644 --- a/docs/reference/field-types/object.md +++ b/docs/reference/field-types/object.md @@ -51,10 +51,27 @@ contactInfo: { |`requiredIf` | Object | `{}` | Conditions to meet before the field is required. [See the guide for details.](/guide/conditional-fields) | |`hidden` | Boolean | `false` | If `true`, the field is hidden | |`readOnly` | Boolean | `false` | If `true`, prevents the user from editing the field value +|`options` | Object | `{}` | Optional configuration, see below | +### `options` + +Object fields have additional settings configured in an `options` object: + +#### `flat` + +**Type:** Boolean + +Setting `flat: true` will remove the visual nesting (left border, indentation) of sub properties within an object. Use in conjunction with `hideLabel` to give your object's schema the appearance of being discreet fields. + +#### `hideLabel` + +**Type:** Boolean + +Setting `hideLabel: true` will hide the top-level field label and begin the schema with the contents of the object. Use in conjunction with `flat` to give your object's schema the appearance of being discreet fields. + ## Configuring the array field schema `object` field schemas are generally configured the same way as the module's overall field schema is configured. The module's schema is configured in its `fields` section's `add` subsection. Similarly, array field schema are configured in a `fields` property, using its `add` subproperty to configure the actual fields. Both use the field names as keys in the `add` object. Both can contain all field types, including nested `object` fields. diff --git a/docs/reference/modules/widget-type.md b/docs/reference/modules/widget-type.md index 65e14388..0278f9e1 100644 --- a/docs/reference/modules/widget-type.md +++ b/docs/reference/modules/widget-type.md @@ -140,7 +140,7 @@ These are options to *the module itself*, so they apply to *every* instance of t | [`preview`](#preview) | Boolean | Allow for in-context preview during widget edit. | | [`scene`](#scene) | String | **Deprecated.** Can specify that this widget type requires logged-in assets. | | [`template`](#template) | String | The Nunjucks template name to render. | -| [`width`](#width) | String | Define the size of the widget modal. | +| [`width`](#width) | String | Define the size of the widget modal. Defaults to `window`. Can also accept `one-third`, `two-thirds`, `half`, and `full` | | [`origin`](#origin) | String | Define the position of the widget modal (left or right). | ### `className` @@ -219,7 +219,8 @@ The name of the template in the `views` folder of the module that should be rend ### `width` The size of the widget modal can be configured via this option: -- `undefined` (default): the widget modal width is set to 540px. +- `"window"` (default): the widget modal will be a floating window that be moved and resized. +- `"one-third"`: the widget modal width is set to 540px. - `"half"`: the widget modal takes 50% of the screen. - `"two-thirds"`: the widget modal takes 66% of the screen. - `"full"`: the widget modal takes 100% of the screen. @@ -230,8 +231,7 @@ No matter what, the widget modal width will take 100% of the screen for screens ### `origin` -Choose the side from where the widget modal will open: -`left` or `right` (default). +Choose the side from where the widget modal will open. If left unset (default) Apostrophe will make a best guess based on the position of the widget on the page. If the widget appears in the left half of the screen, the widget modal is positioned on the right, and vice-versa. Also accepts `left` or `right`. ## Related documentation