Skip to content

Commit

Permalink
Merge branch 'main' into prefix_path_router
Browse files Browse the repository at this point in the history
  • Loading branch information
nileshgulia1 authored Mar 11, 2024
2 parents 48554df + 03b30f9 commit 294a090
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 5 deletions.
9 changes: 6 additions & 3 deletions docs/source/blocks/settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,13 +142,16 @@ Our new block should be ready to use in the editor.
It is a common pattern to use the block configuration to allow customization of a block's behavior or to provide block-specific implementation of various Volto mechanisms.
Some of these common options are described in the following sections.

(blockHasValue)=

### `blockHasValue`

`blockHasValue` returns `true` if the provided block data represents a value for the current block.
`blockHasValue` is a function that returns `true` if the provided block data represents a non-empty value for the current block.
Required for alternate default block types implementations.
It has the following signature.

```{seealso}
See also [Settings reference](../configuration/settings-reference).
```jsx
blockHasValue(data) => boolean
```

### `initialValue`
Expand Down
5 changes: 3 additions & 2 deletions docs/source/configuration/settings-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@ navDepth
Navigation levels depth used in the navigation endpoint calls. Increasing this is useful for implementing fat navigation menus. Defaults to `1`.
defaultBlockType
The default block type in Volto is "text", which uses the current DraftJS-based implementation for the rich text editor. Future alternative rich text editors will need to use this setting and replace it with their block type. The block definition should also include the `blockHasValue` function, which is needed to activate the Block Chooser functionality. See this function signature in [Blocks > Settings](../blocks/settings.md).
The name of the default block type used when a new block is added.
The default value of this setting is `slate`, which uses the current Slate-based implementation for the rich text editor.
If you change this to a different type of block, make sure the block configuration includes the {ref}`blockHasValue` function.
sentryOptions
In Volto 16.0.0.alpha.45, Sentry integration was moved from core to the add-on [`@plone-collective/volto-sentry`](https://www.npmjs.com/package/@plone-collective/volto-sentry).
Expand Down
5 changes: 5 additions & 0 deletions docs/source/contributing/install-docker.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
Install [Docker Desktop](https://docs.docker.com/get-docker/) for your operating system.
Docker Desktop includes all Docker tools.

```{note}
For some Linux distributions, you might need to create a group `docker` and add your user to this group.
See [Linux post-installation steps for Docker Engine](https://docs.docker.com/engine/install/linux-postinstall/#manage-docker-as-a-non-root-user) for details.
```
1 change: 1 addition & 0 deletions packages/volto/news/5854.documentation
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Update docs for the `defaultBlockType` setting. @davisagli
1 change: 1 addition & 0 deletions packages/volto/news/5861.documentation
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add reference to Docker installation for some Linux distributions. @stevepiercy

0 comments on commit 294a090

Please sign in to comment.