Skip to content

Commit

Permalink
Merge branch 'master' into handle-api-redirect
Browse files Browse the repository at this point in the history
  • Loading branch information
mamico authored Aug 22, 2023
2 parents 2727f51 + 6259353 commit 5b17e9c
Show file tree
Hide file tree
Showing 109 changed files with 9,319 additions and 4,263 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
pull_request:
paths:
- 'docs/**'
- 'styles/**'

jobs:
docs:
Expand Down Expand Up @@ -46,4 +47,3 @@ jobs:
# Required, set by GitHub actions automatically:
# https://docs.github.com/en/actions/security-guides/automatic-token-authentication#about-the-github_token-secret
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

59 changes: 58 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,63 @@

<!-- towncrier release notes start -->

## 17.0.0-alpha.24 (2023-08-09)

### Breaking

- Update `@plone/scripts` to 3.0.0. @davisagli [#5040](https://github.com/plone/volto/issues/5040)

### Bugfix

- Fix handling of exceptions in reducers. @davisagli [#5069](https://github.com/plone/volto/issues/5069)
- Add missing i18n for ToC block. @davisagli [#5073](https://github.com/plone/volto/issues/5073)

### Documentation

- Fix 302 redirect in changelog. @stevepiercy [#5068](https://github.com/plone/volto/issues/5068)


## 17.0.0-alpha.23 (2023-07-28)

### Bugfix

- Fix regression from v17a22: It was not possible to select a block in a grid
column unless the grid was already selected. @davisagli

Fix regression from v17a22: Block outline was blocking clicks in some cases.
@davisagli [#5039](https://github.com/plone/volto/issues/5039)


## 17.0.0-alpha.22 (2023-07-28)

### Feature

- Refactor Delete -@Tishasoumya [#4890](https://github.com/plone/volto/issues/4890)
- Refactor workflow -@Tishasoumya-02 [#4902](https://github.com/plone/volto/issues/4902)
- Refactor Request Reset Password-@Tishasoumya-02 [#4938](https://github.com/plone/volto/issues/4938)
- Refactor Actions-@Tishasoumya-02 [#4939](https://github.com/plone/volto/issues/4939)
- Refactor Blocks/Maps/Edit component -@Tishasoumya-02 [#4958](https://github.com/plone/volto/issues/4958)
- Updated Italian translations @sabrina-bongiovanni [#4987](https://github.com/plone/volto/issues/4987)
- Made selectedView and className props available in the SearchBlockView.jsx to improve styling development. @danalvrz [#4997](https://github.com/plone/volto/issues/4997)

### Bugfix

- Fix Volto contents - set properties Exclude from navigation - bad request, set exclude_from_nav to boolean [#4855](https://github.com/plone/volto/issues/4855)
- Add XSendfile headers to files and images middleware @instification [#4984](https://github.com/plone/volto/issues/4984)
- search-block: translate some missing strings to german and fix a typo. @pbauer [#4996](https://github.com/plone/volto/issues/4996)
- Add image block className support (Style wrapper). @sneridagh [#5018](https://github.com/plone/volto/issues/5018)
- Fix for 'no value' entry in table of content field. @satyam4p [#5022](https://github.com/plone/volto/issues/5022)
- Fix updating roles when username contains a period (.). @nileshgulia1 [#5025](https://github.com/plone/volto/issues/5025)
- Fix hover and focused border for block child. @claudiaifrim [#5028](https://github.com/plone/volto/issues/5028)
- Enhance display and repairing of broken relations. @ksuess [#5033](https://github.com/plone/volto/issues/5033)
- Fix selecting grid block when a sub-block is selected. @davisagli [#5036](https://github.com/plone/volto/issues/5036)
- Update versions of semver and release-it. @davisagli [#5053](https://github.com/plone/volto/issues/5053)

### Documentation

- Add short comment for easier finding registered components. @ksuess [#5017](https://github.com/plone/volto/issues/5017)


## 17.0.0-alpha.21 (2023-07-23)

### Breaking
Expand Down Expand Up @@ -2872,7 +2929,7 @@ new users/evaluators. @fredvd
### Internal

- Fix URL for Climate-Energy, a Volto website @tiberiuichim
- Fix quirky Cypress test in "DX control panel schema" (see https://github.com/plone/volto/actions/runs/1692689792/jobs/2306969715) @sneridagh
- Fix quirky Cypress test in "DX control panel schema" @sneridagh

## 14.2.1 (2022-01-12)

Expand Down
6 changes: 5 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Contributing to Volto

See [Contributing to Volto](https://6.docs.plone.org/volto/developer-guidelines/contributing.html).
See the following documents.

- [Contributing to Plone](https://6.docs.plone.org/contributing/index.html)
- [Contributing to Volto](https://6.docs.plone.org/volto/contributing/index.html)
- [First-time contributors](https://6.docs.plone.org/contributing/first-time.html)
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ Go to [http://localhost:3000](http://localhost:3000) in your browser.
Volto is actively developed since 2017 and used in production since 2018 on the following websites:

- [VHS Ehrenamtsportal](https://vhs-ehrenamtsportal.de) (Website to help volunteers that help refugees for the [German Adult Education Association](https://www.dvv-vhs.de/en/home/), developed by [kitconcept GmbH](https://kitconcept.com), 2018)
- [Zeelandia](https://zeelandia.de) (Corporate website for one of the leading backery ingredients manufacturers in Germany, developed by [kitconcept GmbH](https://kitconcept.com), 2019)
- [Zeelandia](https://zeelandia.de) (Corporate website for one of the leading bakery ingredients manufacturers in Germany, developed by [kitconcept GmbH](https://kitconcept.com), 2019)
- [Excellence at Humboldt-Universität zu Berlin](https://www.alles-beginnt-mit-einer-frage.de) (Website for the excellence initiative of the [Humboldt University Berlin](https://hu-berlin.de), developed by [kitconcept GmbH](https://kitconcept.com), 2019)
- [Forest Information System for Europe](https://forest.eea.europa.eu) (Thematic website focusing on European forests, developed by [Eau de Web](https://www.eaudeweb.ro), 2019)
- [Industrial Emissions portal for Europe](https://industry.eea.europa.eu) (Thematic website focusing on European industrial emissions, developed by [Eau de Web](https://www.eaudeweb.ro), 2020)
Expand Down
4 changes: 2 additions & 2 deletions cypress/tests/coresandbox/fields.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ context('Special fields Acceptance Tests', () => {

cy.navigate('/document/edit');
cy.wait('@schema');

cy.findAllByText('Test Block Edit').click();
//just for testing
cy.get('.block-editor-testBlock').click();

cy.get('#field-firstWithDefault').should(
'have.value',
Expand Down
12 changes: 6 additions & 6 deletions docs/source/addons/best-practices.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,15 @@ hold the Cypress integration tests and trigger the CI tests.
If you're releasing your add-on to `npmjs.com`, please consider adding the
following tags, next to your add-on-specific tags:

- volto-addon
- volto
- plone
- react
- `volto-addon`
- `volto`
- `plone`
- `react`

## Include in collective/awesome-volto
## Include in `collective/awesome-volto`

Even if you think your add-on is not generic or it's tricky to integrate, please
consider including your add-on in the
[collective/awesome-volto](https://github.com/collective/awesome-volto) add-ons
[`collective/awesome-volto`](https://github.com/collective/awesome-volto) add-ons
list. This provides visibility to your add-on but also further solidifies
Volto's possition in our Plone community.
12 changes: 6 additions & 6 deletions docs/source/addons/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ by Babel), whole-process customization via razzle.extend.js and
integration with Volto's {term}`configuration registry`.
```

The add-on can be published to an NPM registry or directly installed from github
The add-on can be published to an npm registry or directly installed from github
by Yarn. By using [mrs-develop](https://github.com/collective/mrs-developer),
it's possible to have a workflow similar to zc.buildout's mr.developer, where
you can "checkout" an add-on for development.
Expand All @@ -56,7 +56,7 @@ You can install a Volto add-on just like any other JS package:
yarn add name-of-add-on
```

If the add-on is not published on NPM, you can retrieve it directly from Github:
If the add-on is not published on npm, you can retrieve it directly from Github:

```shell
yarn add collective/volto-dropdownmenu
Expand All @@ -74,7 +74,7 @@ configurations methods, making it possible to selectively choose which specific
add-on functionality you want to load.

In your Volto project's ``package.json`` you can allow the add-on to alter the
global configuration by adding, in the `addons` key, a list of volto add-on
global configuration by adding, in the `addons` key, a list of Volto add-on
package names, like:

```js
Expand Down Expand Up @@ -439,9 +439,9 @@ in your add-on's `addons` key, just like you do in your project. By doing so,
that other add-on's configuration loader is executed first, so you can depend on
the configuration being already applied. Another benefit is that you'll have
to declare only the "top level" add-on in your project, the dependencies will be
discovered and automatically treated as Volto add-ons. For example, volto-slate
depends on volto-object-widget's configuration being already applied, so
volto-slate can declare in its `package.json`:
discovered and automatically treated as Volto add-ons. For example, `volto-slate`
depends on `volto-object-widget`'s configuration being already applied, so
`volto-slate` can declare in its `package.json`:

```json
{
Expand Down
4 changes: 2 additions & 2 deletions docs/source/backend/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ Search and indexing integration
Access to images and files are a special use case in Volto.
Usually in plain HTML, `src` and `href` attributes resource calls cannot be wrapped in a JavaScript backend call.
This is problematic when dealing with protected resources that need the user to be authenticated to access them.
For this reason, these resources are rerouted through an internal route in Node Express server and wrapped with the proper authentication headers.
For this reason, these resources are rerouted through an internal route in the Node.js Express server and wrapped with the proper authentication headers.

These proxied backend routes are in place for accessing URLs containing `@@downloads` `@@display-file`, and `@@images` backend views.
These are the backend `BrowserView`s routes that retrieve images and file resources.
Thus the Node Express server takes care of proxying and enhancing them at the same time as the authentication headers.
Thus the Node.js Express server takes care of proxying and enhancing them at the same time as the authentication headers.

```{todo}
This section contains pointers for backend integration with Plone.
Expand Down
52 changes: 26 additions & 26 deletions docs/source/blocks/editcomponent.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ The sidebar and the object browser are the main ones.

## Sidebar

We can use the new sidebar when building our blocks' edit components.
We can use the new sidebar when building our block's edit components.
The sidebar is a new UI asset that is available in Volto 4.
You need to instantiate it this way:

Expand Down Expand Up @@ -195,19 +195,19 @@ this.props.openObjectBrowser({

This widget shows an objectBrowser to find content/contents on site.

It is the default widget for vocabulary fields that uses plone.app.vocabularies.Catalog.
It is the default widget for vocabulary fields that uses `plone.app.vocabularies.Catalog`.

It works in 3 different mode:

- **image**: The field value is an object.
The path of selected item is saved in 'url' property of value object. (fieldName: {url:''})
- **link**: The field value is an object.
The path of selected item is saved in 'href' property of value object. (fieldName: {href:''})
- **multiple**: The field value is an array of objects.
- `image`: The field value is an object.
The path of selected item is saved in `url` property of value object. (`fieldName: {url:''}`)
- `link`: The field value is an object.
The path of selected item is saved in `href` property of value object. (`fieldName: {href:''}`)
- `multiple`: The field value is an array of objects.

#### `return` prop

The object widget returns always an array, even if it's meant to have only one object in return. In order to fix that situation and do not issue a breaking change, a `return` prop is being introduced, so if it's value is `single`, then it returns a single value:
The object widget returns always an array, even if it's meant to have only one object in return. In order to fix that situation and do not issue a breaking change, a `return` prop is being introduced, so if its value is `single`, then it returns a single value:

```js
export const Image = () => <ObjectBrowserWidget mode="image" return="single" />;
Expand All @@ -219,8 +219,8 @@ This situation will be fixed in subsequent Volto releases.

#### PropDataName vs dataName

- **dataName** is the prop inside _data_ object, used for _link_ and _image_ mode.
- **PropDataName** is the name of field wich value is _data_. It's used for _multiple_ mode.
- `dataName` is the prop inside `data` object, used for `link` and `image` mode.
- `PropDataName` is the name of field wich value is `data`. It's used for `multiple` mode.

For example:

Expand All @@ -230,9 +230,9 @@ content:{ '@id': 'page-1', related_pages:[], image:{url:""}, link:{href:""} }

if we use object browser widget for fields:

- **related_pages**: propDataName is _related_pages_ and dataName is null,
- **image**: dataName is _url_ and propDataName is null
- **link**: dataName is _href_ and propDataName is null
- `related_pages`: propDataName is `related_pages` and `dataName` is `null`.
- `image`: dataName is `url` and `propDataName` is `null`.
- `link`: dataName is `href` and `propDataName` is `null`.

#### Usage in blocks schema

Expand Down Expand Up @@ -273,7 +273,7 @@ tokenized value, as if it was selected via the Object Browser widget.
#### ObjectBrowserWidgetMode()
Returns the component widget with _mode_ passed as argument.
Returns the component widget with `mode` passed as argument.
The default mode for ObjectBrowserWidget is multiple. If you would like to use this widget with link or image mode as widget field for a specific field id (for example), you could specify in in config.js as:
Expand All @@ -299,7 +299,7 @@ If `selectableTypes` is set in `widgetOptions.pattern_options`, then only items
<ObjectBrowserWidget ... widgetOptions={{pattern_options:{selectableTypes:['News Item','Event']}}}>
```
You can also set the _selectableTypes_ from plone when declaring a field for contenttype:
You can also set the `selectableTypes` from `plone` when declaring a field for `contenttype`:
```jsx
form.widget(
Expand All @@ -313,15 +313,15 @@ form.widget(
);
```
#### MaximumSelectionSize
#### `maximumSelectionSize`
If **maximumSelectionSize** is set in _widgetOptions.pattern_options_, widget allows to select at most the **maximumSelectionSize** number of items defined in _widgetOptions.pattern_options.maximumSelectionSize_.
If `maximumSelectionSize` is set in `widgetOptions.pattern_options`, the widget allows to select at most the `maximumSelectionSize` number of items defined in `widgetOptions.pattern_options.maximumSelectionSize`.
```jsx
<ObjectBrowserWidget ... widgetOptions={{pattern_options:{maximumSelectionSize:2}}}>
```
You can also set the _maximumSelectionSize_ from plone when declaring a field for contenttype:
You can also set the `maximumSelectionSize` from `plone` when declaring a field for `contenttype`:
```jsx
form.widget(
Expand Down Expand Up @@ -429,15 +429,15 @@ class Example extends Component {
The current block engine is available as the separate `BlocksForm` component,
used to be a part of the `Form.jsx` component. It has been previously exposed
as the [@eeacms/volto-blocks-form](https://github.com/eea/volto-blocks-form)
as the [`@eeacms/volto-blocks-form`](https://github.com/eea/volto-blocks-form)
addon and reused in several other addons, so you can find integration examples
in addons such as
[volto-columns-block](https://github.com/eea/volto-columns-block),
[volto-accordion-block](https://github.com/rohberg/volto-accordion-block),
[@eeacms/volto-accordion-block](https://github.com/eea/volto-accordion-block),
[@eeacms/volto-grid-block](https://github.com/eea/volto-accordion-block), but
[`volto-columns-block`](https://github.com/eea/volto-columns-block),
[`volto-accordion-block`](https://github.com/rohberg/volto-accordion-block),
[`@eeacms/volto-accordion-block`](https://github.com/eea/volto-accordion-block),
[`@eeacms/volto-grid-block`](https://github.com/eea/volto-accordion-block), but
probably the simplest implementation to follow is in the
[@eeacms/volto-group-block](https://github.com/eea/volto-group-block)
[`@eeacms/volto-group-block`](https://github.com/eea/volto-group-block)
Notice that the `BlocksForm` component allows overriding the edit block
wrapper and allows passing a custom `blocksConfig` configuration object, for
Expand Down Expand Up @@ -507,6 +507,6 @@ You can also reuse the DragDropList component as a separate component:
</DragDropList>
```
Check the source code of volto-columns-block and
[volto-taxonomy](https://github.com/eea/volto-taxonomy/) for details on
Check the source code of `volto-columns-block` and
[`volto-taxonomy`](https://github.com/eea/volto-taxonomy/) for details on
how to reuse this component.
2 changes: 1 addition & 1 deletion docs/source/configuration/backend.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ myst:

# Backend configuration

## plone.volto
## `plone.volto`
In order to fully support all Volto features, the Plone backend content API needs to be prepared for Volto. The add-on `plone.volto` does all the heavy lifting for you and is ready to use in your own projects. We used it in our Getting Started section.

This package is slightly opinionated but provides the correct default settings for when
Expand Down
2 changes: 1 addition & 1 deletion docs/source/configuration/environmentvariables.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ As a result, your app will load the add-ons in the following order:
- `volto-slate`

```{important}
The `ADDONS` key is a Volto specific configuration. Simply setting `ADDONS` doesn't download the javascript package. This has to be covered by another way, either installing the addon package (with yarn add) or loading it as a development package with mrs-developer.
The `ADDONS` key is a Volto specific configuration. Simply setting `ADDONS` doesn't download the JavaScript package. This has to be covered by another way, either installing the addon package (with yarn add) or loading it as a development package with mrs-developer.
```

## BUILD_DIR
Expand Down
2 changes: 1 addition & 1 deletion docs/source/configuration/expanders.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ myst:
"description": "Configure the API expanders in Volto using the `settings.apiExpanders`"
"property=og:description": "Configure the API expanders in Volto using the `settings.apiExpanders`"
"property=og:title": "API expanders"
"keywords": "Volto, Plone, frontend, React, api expanders"
"keywords": "Volto, Plone, frontend, React, API expanders"
---

# API expanders
Expand Down
Loading

0 comments on commit 5b17e9c

Please sign in to comment.