Skip to content

Commit

Permalink
Merge branch 'main' into fixA11yVideoBlockIssue
Browse files Browse the repository at this point in the history
  • Loading branch information
nileshgulia1 authored Sep 27, 2024
2 parents cd63f0e + d81a0d3 commit b071d0b
Show file tree
Hide file tree
Showing 134 changed files with 1,249 additions and 815 deletions.
30 changes: 29 additions & 1 deletion docs/source/configuration/how-to.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ then access any of its internal configuration to retrieve the configuration you
like:

```js
const absoluteUrl = `${config.settings.apiPath}/${content.url}`
const absoluteUrl = `${config.settings.apiPath}/${content.url}`;
```

Both the main project and individual add-ons can extend Volto's configuration registry.
Expand Down Expand Up @@ -150,3 +150,31 @@ export default function applyConfig(config) {

return config;
}
```

## `nonContentRoutes` and `nonContentRoutesPublic`

`nonContentRoutes` is a list of routes reserved in Volto for its functionality as a content management system.
These functions include user authentication and registration, changing settings through control panels, generating a site map, and other functions.
Examples of these routes include `/login`, `/register`, and `/\/controlpanel\/.*$/`.
Editors can't use them for content.
The HTML attribute class value `cms-ui` is applied to members of `nonContentRoutes`.
You can configure `nonContentRoutes` with either a regular expression or a string representing the end of the URI.

`nonContentRoutesPublic` is a subset of `nonContentRoutes`.
These routes are used for public sections of a Volto site that do not require authentication.
This subset includes `/login`, `/search`, and `/sitemap`.

The following example shows how to configure settings for `nonContentRoutes` and `nonContentRoutesPublic`.

```js
export default function applyConfig(config) {
config.settings = {
...config.settings,
nonContentRoutes:[....],
nonContentRoutesPublic: [....]
};

return config;
}
```
8 changes: 6 additions & 2 deletions docs/source/development/how-to-restrict-blocks.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,16 @@ The function has this signature:
block: BlockConfigBase;
navRoot: Content;
contentType: string;
user: Object
}) => boolean;
}
```

Where `properties` is the current object data and `block` is the block being evaluated in `BlockChooser`.
`navRoot` is the nearest navigation root object and `contentType` is the current content type.
`properties` is the current object data.
`block` is the block being evaluated in `BlockChooser`.
`navRoot` is the nearest navigation root object.
`contentType` is the current content type.
`user` is an object that represents the currently authenticated user.

In the following configuration example, you can restrict a block so that it cannot be added unless the content type is `News Item` or the content item is in a specific path in the content tree (`/folder`):

Expand Down
72 changes: 72 additions & 0 deletions docs/source/release-notes/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,78 @@ myst:

<!-- towncrier release notes start -->

## 18.0.0-alpha.43 (2024-09-13)

### Breaking

- Move `Tags` component to the slot `belowContent`. @wesleybl [#6269](https://github.com/plone/volto/issues/6269)

### Feature

- Refactor AlbumView from class to functional component. @Tishasoumya-02 [#4077](https://github.com/plone/volto/issues/4077)
- Add setting `unwantedControlPanelsFields` and use it in the function `filterControlPanelsSchema`. @wesleybl [#4819](https://github.com/plone/volto/issues/4819)
- Refactor the `Register` component from class-based to functional. @Tishasoumya-02 [#4861](https://github.com/plone/volto/issues/4861)
- Refactor Toolbar/More component from class to functional component. @Tishasoumya-02 [#4955](https://github.com/plone/volto/issues/4955)
- Refactor Blocks/LeadImage/Edit component from class to functional component. @Tishasoumya-02 [#4959](https://github.com/plone/volto/issues/4959)
- Refactor Blocks/Video/Edit component from class to functional component. @Tishasoumya-02 [#4960](https://github.com/plone/volto/issues/4960)
- Refactor ControlPanel/Users/Aliases component , replacing class component lifecycle methods with functional hooks. @Tishasoumya-02 [#4985](https://github.com/plone/volto/issues/4985)
- Refactor Controlpanel databaseInformation from class component to functional component. @Tishasoumya-02 [#4986](https://github.com/plone/volto/issues/4986)
- Refactor ControlPanels/Groups RenderGroups from class components to functional component. @Tishasoumya-02 [#4993](https://github.com/plone/volto/issues/4993)
- Refactor AddonsControlpanel from class to functional components. @Tishasoumya [#4995](https://github.com/plone/volto/issues/4995)
- Refactor Preference/Change Password from class to functional component. @Tishasoumya-02 [#5044](https://github.com/plone/volto/issues/5044)
- Refactor Preference/PersonalPreferences from class to functional component. @Tishasoumya-02 [#5045](https://github.com/plone/volto/issues/5045)
- Refactor Preference/PersonalInformation from Class to Functional component. @Tishasoumya-02 [#5046](https://github.com/plone/volto/issues/5046)
- Refactor Contents/ContentsUploadModal & Storybook-@Tishasoumya-02 [#5047](https://github.com/plone/volto/issues/5047)
- Storybook test for ContentBreadcrumbs component. @Tishasoumya [#5048](https://github.com/plone/volto/issues/5048)
- Storybook Actions component test. @Tishasoumya-02 [#5049](https://github.com/plone/volto/issues/5049)
- Refactor Display from class to functional component. @Tishasoumya-02 [#5066](https://github.com/plone/volto/issues/5066)
- Refactor `ReferenceWidget` from class-based to functional component. @Tishasoumya [#5093](https://github.com/plone/volto/issues/5093)
- Refactor the table of contents block component from a class component to a functional component. @Prince0906 [#6167](https://github.com/plone/volto/issues/6167)
- Improved URL regex to allow non-public or intranet URLs, such as `https://intranet/` or `file://server/share`. @mamico [#6186](https://github.com/plone/volto/issues/6186)
- Refactor the `DatetimeWidget` component from a class component to a functional component. @Raman-Luhach [#6213](https://github.com/plone/volto/issues/6213)
- The schema for the `ContentsPropertiesModal` can be enhanced using the `contentPropertiesSchemaEnhancer` setting.
Also, the properties form is now prepopulated with values if all selected items share the same value. @davisagli [#6248](https://github.com/plone/volto/issues/6248)
- Pass the `user`, `navRoot` and `contentType` objects to the `restricted` function of the block settings. @wesleybl [#6264](https://github.com/plone/volto/issues/6264)

### Bugfix

- Fix search block showing no option select in sort on property @iRohitSingh [#5055](https://github.com/plone/volto/issues/5055)
- Displays validation error messages on control panel forms. @wesleybl [#5274](https://github.com/plone/volto/issues/5274)
- Fix `initialValue` block setting. @wesleybl [#5971](https://github.com/plone/volto/issues/5971)
- When user changes location, set the `userSession.token` value based on cookie. This fixes the login status not being properly determined by the application. @tiberiu-ichim [#6071](https://github.com/plone/volto/issues/6071)
- Fix `Teaser` block image override option to render external images and internal images pointing to image scales. @Tishasoumya-02 [#6147](https://github.com/plone/volto/issues/6147)
- Add Cypress test for search block sort on property. @iRohitSingh [#6226](https://github.com/plone/volto/issues/6226)
- Remove unused i18n message for SortOn component. @davisagli [#6230](https://github.com/plone/volto/issues/6230)
- Return a 302 response for server-side rendering of the Link view for unauthenticated users. @davisagli [#6235](https://github.com/plone/volto/issues/6235)
- Fix loading of .cjs in webpack. @davisagli [#6237](https://github.com/plone/volto/issues/6237)
- fixed change of form.ui.hovered when editing blocks, because if you have a FormBlock component inside another one,
onMouseOver fires for all stacked blocks and you cannot use the nested form. @giuliaghisini [#6240](https://github.com/plone/volto/issues/6240)
- Changed imports from relative to absolute to avoid type errors in add-on tests. @wesleybl [#6244](https://github.com/plone/volto/issues/6244)
- In the URL Management control panel, allow external URLs as targets. @davisagli [#6247](https://github.com/plone/volto/issues/6247)
- Disable save button when loading POST query @sabrina-bongiovanni [#6252](https://github.com/plone/volto/issues/6252)
- Fix `TypeError: values[0] is undefined` in Contents properties modal. @davisagli [#6258](https://github.com/plone/volto/issues/6258)
- Fix error in `SortOn` component when no sort is selected. @davisagli [#6273](https://github.com/plone/volto/issues/6273)
- Place actions storybook in correct path. @Tishasoumya-02 [#6275](https://github.com/plone/volto/issues/6275)
- Remove `Generate tabs for items other than folders` field from navigation control panel. @wesleybl [#6278](https://github.com/plone/volto/issues/6278)
- Fix error rendering empty grid blocks. @MAX-786 [#6279](https://github.com/plone/volto/issues/6279)
- Fixed instant error on click on an item of the "Order" tab @sneridagh [#6284](https://github.com/plone/volto/issues/6284)

### Internal

- Refactored the `SelectWidget` component to a functional component. @lorstenoplo [#5570](https://github.com/plone/volto/issues/5570)
- Allow setting the language for `make backend-docker-start`. Default is `en`. Added usage documentation in Contributing > Develop Volto core, and reorganized it. Cleaned up Configuration > Multilingual. @stevepiercy [#6231](https://github.com/plone/volto/issues/6231)
- Revert rename of `.gitkeep`. @stevepiercy [#6232](https://github.com/plone/volto/issues/6232)
- Upgrade Cypress to 13.13.2. @wesleybl [#6241](https://github.com/plone/volto/issues/6241)
- Complete upgrade Cypress to 13.13.2. Bump actions/upload-artifact@v1 to v4. @stevepiercy [#6242](https://github.com/plone/volto/issues/6242)
- Add `make i18n` command. @Faakhir30 [#6274](https://github.com/plone/volto/issues/6274)
- Update to Plone 6.0.13 @sneridagh [#6285](https://github.com/plone/volto/issues/6285)

### Documentation

- Fix redirect of link in documentation to testing Redux store blog post. @stevepiercy [#6239](https://github.com/plone/volto/issues/6239)
- Fix redirect to Docker documentation. @stevepiercy [#6262](https://github.com/plone/volto/issues/6262)
- Added upgrade guide notice about CookiePlone as the recommended way for generating projects and add-on boilerplate @sneridagh [#6286](https://github.com/plone/volto/issues/6286)

## 18.0.0-alpha.42 (2024-07-30)

### Breaking
Expand Down
52 changes: 38 additions & 14 deletions docs/source/upgrade-guide/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ For this purpose, we have developed a {ref}`new utility <upgrade-guide-new-depen
It is mandatory that you run the utility to make Volto version 18.0.0-alpha.21 or later work in your projects.
This opens the door to use {term}`pnpm` in projects, too, and other goodies.

```{versionremoved} 18.0.0-alpha.33
```{versionremoved} Volto 18.0.0-alpha.33
The setting `config.settings.serverConfig.extractScripts.errorPages` has been removed.
```

Expand All @@ -52,7 +52,7 @@ This setting is no longer necessary.

### New dependencies synchronizer

```{versionadded} 18.0.0-alpha.21
```{versionadded} Volto 18.0.0-alpha.21
```

```{versionadded} @plone/scripts 3.6.1
Expand Down Expand Up @@ -450,6 +450,30 @@ schema: {
The `Tags` component has been moved to the `belowContent` slot.
It now receives the `content` property instead of the `tags` property.


{upgrade-18-cookieplone-label}=

### Cookieplone is now the recommended project and add-on generator for Volto 18

```{versionadded} Volto 18.0.0-alpha.43
```

[Cookieplone](https://github.com/plone/cookieplone) is now the recommended way to develop Volto projects, using it as a boilerplate generator.
Cookieplone uses the frontend code installed using `pnpm` instead of `yarn`.
This affects the way that the Plone Release Team generates the Sponsored OSS Docker images, since they must be compatible with the `pnpm` setup.

Since Volto `18.0.0-alpha.43`, the Docker image [`plone-frontend`](https://hub.docker.com/r/plone/plone-frontend) uses `pnpm`.

For developers that won't migrate their boilerplate and code to the new setup with `pnpm` instead of `yarn`, the Release Team will generate a new Docker image named `plone-frontend:18-yarn` for the Volto 18 series of alpha releases.

Support for `yarn` will be dropped in Volto 19.

```{deprecated} Volto 18.0.0-alpha.43
The `yarn`-based generator [`@plone/generator-volto`](https://www.npmjs.com/package/@plone/generator-volto) package and project boilerplates generated from it are deprecated and will not receive any further updates.
The recommended way of generating a project boilerplate is [Cookieplone](https://github.com/plone/cookieplone).
Please update your code to use the `pnpm` based setup.
```

(volto-upgrade-guide-17.x.x)=

## Upgrading to Volto 17.x.x
Expand Down Expand Up @@ -501,7 +525,7 @@ Upgrade your local dependencies in projects and add-ons by editing your {file}`p

### TypeScript support in Volto

```{versionadded} 17.0.0-alpha.27
```{versionadded} Volto 17.0.0-alpha.27
```

We added full support of TypeScript in Volto core.
Expand Down Expand Up @@ -604,7 +628,7 @@ make develop

### Upgrade ESlint and use `@babel/eslint-parser`

```{versionchanged} 17.0.0-alpha.27
```{versionchanged} Volto 17.0.0-alpha.27
```

ESlint uses a library to parse the language under analysis.
Expand All @@ -617,7 +641,7 @@ Once upgraded, run the linters again to make sure that your code is free of viol

Technically not a breaking, the API nor the component contract has changed, but it's worth noting this change in here.

```{versionadded} 17.0.0-alpha.1
```{versionadded} Volto 17.0.0-alpha.1
The `BlockChooser` component now uses `popperjs` library to position itself in the screen.
It spawns at the end of the body instead of inner the block that called it.
This is better from the UI point of view, since any other element can take precedence in the CSS element flow, preventing the block chooser to get overlapped by anything else.
Expand Down Expand Up @@ -675,7 +699,7 @@ Check the official [Cypress Migration Guide](https://docs.cypress.io/guides/refe

### New Image component

```{versionadded} 17.0.0-alpha.21
```{versionadded} Volto 17.0.0-alpha.21
A new image component has been added to core to render optimized images.
It requires the latest version of `plone.restapi` (>=8.42.0) installed in the backend to work properly.
```
Expand Down Expand Up @@ -727,11 +751,11 @@ From Volto 16.0.0-alpha.15 onwards, `volto-slate` is integrated into Volto core
The previous text block `text` based on `draftJS` is now deprecated and is restricted (hidden) in Volto bootstrap.
This is a major change and should be planned in advance before you install 16.0.0-alpha.15 or later.

```{versionadded} 16.0.0-alpha.15
```{versionadded} Volto 16.0.0-alpha.15
`volto-slate` added to Volto core as the default text block.
```

```{deprecated} 16.0.0-alpha.15
```{deprecated} Volto 16.0.0-alpha.15
`text` text block based on `draftJS` is now deprecated and will be removed from core in Volto 18.
```

Expand Down Expand Up @@ -825,7 +849,7 @@ Version 16 is recommended.

### Upgraded to Razzle 4

```{versionadded} 16.0.0-alpha.38
```{versionadded} Volto 16.0.0-alpha.38
Volto has upgraded from Razzle 3 to Razzle 4.
You should perform these steps in case you are upgrading to this version or above.
```
Expand Down Expand Up @@ -1128,7 +1152,7 @@ It maintains signature compatibility with `registry.resolve`, but introduces new

See documentation for more information.

````{versionchanged} 16.0.0-alpha.23
````{versionchanged} Volto 16.0.0-alpha.23
The `component` argument changed in 16.0.0-alpha.23.
The `component` key has been flattened for simplification and now it's mapped directly to the `component` argument of `registerComponent`:

Expand Down Expand Up @@ -1207,7 +1231,7 @@ During the alpha stage, we received feedback and determined that it's too diffic
We decided it is best to deal with it as any other schema field and enhance it via schema enhancers.
This improves the developer experience, especially when dealing with variations that can provide their own styles and other schema fields.

```{deprecated} 16.0.0-alpha.46
```{deprecated} Volto 16.0.0-alpha.46
The options `enableStyling` and `stylesSchema` no longer work.
You need to provide them using your own block schema.
If you are extending an existing one, you should add it as a normal `schemaEnhancer` modification.
Expand All @@ -1224,7 +1248,7 @@ Since then, the add-on story has improved.
It now makes sense to extract this feature into its own add-on.
Integrate Sentry in your app with [`@plone-collective/volto-sentry`](https://www.npmjs.com/package/@plone-collective/volto-sentry).

```{versionchanged} 16.0.0.alpha.45
```{versionchanged} Volto 16.0.0.alpha.45
```

### Upgrade `husky` to latest version
Expand All @@ -1245,7 +1269,7 @@ You can copy over the Volto ones (take a look in Volto's `.husky` folder).

### Better defaults handling

````{versionadded} 16.0.0-alpha.51
````{versionadded} Volto 16.0.0-alpha.51
Prior to this version, we handled default values in schemas for blocks settings in a faulty and buggy manner.
The state inferred was not deterministic and depended on the fields with defaults present.
Expand Down Expand Up @@ -1361,7 +1385,7 @@ A new `@root` alias has been set up to replace the `~` alias.
Support for the `~` alias is still in place, but we now mark it as deprecated.
The use of `~` will be removed in Volto 16.

```{deprecated} 15.0
```{deprecated} Volto 15.0
```

## Upgrading to Volto 14.x.x
Expand Down
6 changes: 6 additions & 0 deletions packages/client/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@

<!-- towncrier release notes start -->

## 1.0.0-alpha.17 (2024-09-13)

### Documentation

- Add documentation about optional `token` parameter for `ploneClient` initialization. @MAX-786 [#6076](https://github.com/plone/volto/pull/6076)

## 1.0.0-alpha.16 (2024-06-06)

### Bugfix
Expand Down
1 change: 0 additions & 1 deletion packages/client/news/6076.documentation

This file was deleted.

2 changes: 1 addition & 1 deletion packages/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
}
],
"license": "MIT",
"version": "1.0.0-alpha.16",
"version": "1.0.0-alpha.17",
"repository": {
"type": "git",
"url": "[email protected]:plone/volto.git"
Expand Down
6 changes: 6 additions & 0 deletions packages/volto-slate/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@

<!-- towncrier release notes start -->

## 18.0.0-alpha.18 (2024-09-13)

### Feature

- Pass `user`, `navRoot` and `contentType` objects to the `restricted` function of the block settings. @wesleybl [#6264](https://github.com/plone/volto/issues/6264)

## 18.0.0-alpha.17 (2024-07-05)

### Feature
Expand Down
Loading

0 comments on commit b071d0b

Please sign in to comment.