Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into a11y-blocks-test
Browse files Browse the repository at this point in the history
  • Loading branch information
tedw87 committed Oct 10, 2024
2 parents 3f74d07 + f131c92 commit bc07350
Show file tree
Hide file tree
Showing 141 changed files with 4,445 additions and 2,338 deletions.
15 changes: 15 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
- [ ] I signed and returned the [Plone Contributor Agreement](https://plone.org/foundation/contributors-agreement), and received and accepted an invitation to join a team in the Plone GitHub organization.
- [ ] I verified there aren't other open [pull requests](https://github.com/plone/volto/pulls) for the same change.
- [ ] I followed the guidelines in [Contributing to Volto](https://6.docs.plone.org/volto/contributing/index.html).
- [ ] I succesfully ran [code linting checks](https://6.docs.plone.org/volto/contributing/linting.html) on my changes locally.
- [ ] I succesfully ran [unit tests](https://6.docs.plone.org/volto/contributing/testing.html) on my changes locally.
- [ ] I succesfully ran [acceptance tests](https://6.docs.plone.org/volto/contributing/acceptance-tests.html) on my changes locally.
- [ ] If needed, I added new tests for my changes.
- [ ] If needed, I added [documentation](https://6.docs.plone.org/volto/contributing/documentation.html#narrative-documentation) for my changes, either in the Storybook or narrative documentation.
- [ ] I included a [change log entry](https://6.docs.plone.org/contributing/index.html#contributing-change-log-label) in my commits.

-----

If your pull request closes an open issue, include the exact text below, immediately followed by the issue number. When your pull request gets merged, then that issue will close automatically.

Closes #
12 changes: 5 additions & 7 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ on:
paths:
- 'docs/**'
- 'styles/**'
- '.github/workflows/docs.yml'
- 'requirements-docs.txt'
- '.vale.ini'

jobs:
docs:
Expand All @@ -32,9 +35,7 @@ jobs:
run: pip install virtualenv

- name: pip install requirements
run: |
pip install -r requirements-docs.txt
sudo snap install --edge vale
run: pip install -r requirements-docs.txt

- name: Check for broken links
run: make docs-linkcheckbroken
Expand All @@ -43,7 +44,4 @@ jobs:
run: make docs-html

- name: Run vale
run: |
git clone https://github.com/errata-ai/Microsoft.git
cp -r ./Microsoft/Microsoft ./styles
vale --no-exit ./docs
run: make docs-vale VALEOPTS=--no-exit
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ include variables.mk
# Sphinx variables
# You can set these variables from the command line.
SPHINXOPTS ?=
VALEOPTS ?=
# Internal variables.
SPHINXBUILD = "$(realpath bin/sphinx-build)"
SPHINXAUTOBUILD = "$(realpath bin/sphinx-autobuild)"
Expand Down Expand Up @@ -120,7 +121,7 @@ docs-linkcheckbroken: bin/python docs-news ## Run linkcheck and show only broke
.PHONY: docs-vale
docs-vale: bin/python docs-news ## Install (once) and run Vale style, grammar, and spell checks
bin/vale sync
bin/vale --no-wrap $(VALEFILES)
bin/vale --no-wrap $(VALEOPTS) $(VALEFILES)
@echo
@echo "Vale is finished; look for any errors in the above output."

Expand Down
2 changes: 1 addition & 1 deletion apps/vite-ssr/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Plone on Vite with SSR mode

This is a proof of concept of a [Vite](https://vitejs.dev) build, using `@plone/client` and `@plone/components` libraries.
This is a proof of concept of a [Vite](https://vite.dev/) build, using `@plone/client` and `@plone/components` libraries.
This is intended to serve as both a playground for the development of both packages and as a demo of Plone using Vite built with server side rendering (SSR).

It also uses [TanStack Router](https://tanstack.com/router/latest/docs/framework/react/overview) for its routing library.
2 changes: 1 addition & 1 deletion apps/vite/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Plone on Vite

This is a proof of concept of a [Vite](https://vitejs.dev) build, using `@plone/client` and `@plone/components` libraries.
This is a proof of concept of a [Vite](https://vite.dev/) build, using `@plone/client` and `@plone/components` libraries.
This is intended to serve as both a playground for the development of both packages and as a demo of Plone using Vite.

It also uses [TanStack Router](https://tanstack.com/router/latest/docs/framework/react/overview) for its routing library.
3 changes: 3 additions & 0 deletions docs/source/addons/best-practices.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ a screenshot.
Ideally, the Readme should also include install instructions and details on any
possible settings.


(testing-the-add-on-label)=

## Testing the add-on

It is not easy, right now, to ship an add-on with a self-bootstraping and
Expand Down
24 changes: 14 additions & 10 deletions docs/source/contributing/developing-core.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ Volto has the following folder structure.
```


## Development pre-requisites
## Development prerequisites

To set up a Volto core development environment, your system must satisfy the following pre-requisites.
To set up a Volto core development environment, your system must satisfy the following prerequisites.

```{include} ./install-operating-system.md
```
Expand Down Expand Up @@ -330,13 +330,6 @@ By default, the use of TypeScript is required in Plone frontend libraries, Volto

The monorepository consists of several core libraries.

### Volto project generator

`@plone/generator-volto` is a Yeoman generator that helps you set up Volto via command line.
It generates all the boilerplate needed to start developing a Plone Volto project.
It is used by [CookieCutter Plone Starter](https://github.com/collective/cookiecutter-plone-starter), the recommended way to set up Plone projects.
The generator features an `addon` template for scaffolding Volto add-ons in your projects.

### Registry

`@plone/registry` provides support for building an add-on registry and infrastructure for JavaScript and TypeScript-based apps.
Expand All @@ -354,6 +347,17 @@ Used by Volto, you can also use it in other JavaScript frameworks and environmen

`@plone/volto-slate` is the glue package that provides support for the Slate library in Volto.

### Volto project generator

`@plone/generator-volto` is a Yeoman generator that helps you set up Volto via command line.
It generates all the boilerplate needed to start developing a Plone Volto project.
It is used by [CookieCutter Plone Starter](https://github.com/collective/cookiecutter-plone-starter), the recommended way to set up Plone projects.
The generator features an `addon` template for scaffolding Volto add-ons in your projects.

```{deprecated} 18.0.0-alpha.43
For Volto 18, `@plone/generator-volto` is replaced by [Cookieplone](https://github.com/plone/cookieplone).
```


## Supported frontends

Expand All @@ -362,7 +366,7 @@ Volto is the default frontend, and is React-based.
Classic UI is the Python-based, server-side rendered frontend.

In Volto's `apps` folder, you'll find a Volto project scaffolding that uses Volto as a library.
This is the same as that which you'll have when you run the Volto generator or `cookiecutter-plone-starter`.
This is the same as that which you'll have when you follow the instructions in {doc}`plone:install/create-project`).


## Experimental frontends
Expand Down
19 changes: 14 additions & 5 deletions docs/source/development/how-to-restrict-blocks.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,20 @@ The function has this signature:
}
```

`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.
`properties`
: The current object data.

`block`
: The block being evaluated in `BlockChooser`.

`navRoot`
: The nearest navigation root object.

`contentType`
: The current content type.

`user`
: 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
10 changes: 5 additions & 5 deletions docs/source/development/i18n.md
Original file line number Diff line number Diff line change
Expand Up @@ -204,10 +204,10 @@ If this was not the case, then all the translations in the customized components
You can add or override translated messages in your customizations by following the steps described in {ref}`override-i18n-messages`.
## Contribute translations for an unsupported language
(contribute-translations-for-an-unsupported-language-label)=
The Volto project welcomes all speakers from the world to include any language, which is not supported yet.
## Contribute translations for an unsupported language
If your language's `.po` file is not available in Volto, [open an issue in GitHub](https://github.com/plone/volto/issues).
Either you can create the `.po` file or we can do it for you.
After that, you can start contributing your translations.
```{seealso}
{ref}`contributing-plone-core-translations-translate-volto-label`
```
50 changes: 50 additions & 0 deletions docs/source/release-notes/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,56 @@ myst:

<!-- towncrier release notes start -->

## 18.0.0-alpha.45 (2024-10-08)

### Bugfix

- Added missing arg for `buildStyleClassNamesExtenders` @sneridagh [#6381](https://github.com/plone/volto/issues/6381)

### Documentation

- Removed pin on Vale for documentation spelling, grammar, and style checks, and upgrade to v3.x configuration.
Updated CI and `Makefile` to allow `VALEOPTS=--no-exit`. @stevepiercy [#6376](https://github.com/plone/volto/issues/6376)

## 18.0.0-alpha.44 (2024-10-03)

### Feature

- Added `config.settings.nonContentRoutesPublic` to avoid `isCmsUi` issues in these public routes. @giuliaghisini [#6173](https://github.com/plone/volto/issues/6173)
- Add language independent field icon. @iRohitSingh [#6297](https://github.com/plone/volto/issues/6297)
- Improve DiffField.jsx to render only the blocks on the page with better support for displaying HTML elements such as images. @dobri1408 [#6309](https://github.com/plone/volto/issues/6309)
- Updated Italian Italian translations. @gianniftp [#6342](https://github.com/plone/volto/issues/6342)
- Update Brazilian Portuguese translations. @ericof

### Bugfix

- Increase specificity of table header style selector to properly override colors for better contrast @jackahl [#2487](https://github.com/plone/volto/issues/2487)
- Change Form input:focus text color to the `textColor` value for a11y.
Add Cypress test for contact form inputs. @ThomasKindermann @tedw87 [#2570](https://github.com/plone/volto/issues/2570)
- Add missing `for` attribute to checkbox label to improve accessibility. @gomez [#6249](https://github.com/plone/volto/issues/6249)
- - Fixed build style classnames in edit mode. Also use buildStyleClassNamesExtenders. @giuliaghisini [#6259](https://github.com/plone/volto/issues/6259)
- Fetch `user` before pass it to the `restricted` function of the block settings. @wesleybl [#6293](https://github.com/plone/volto/issues/6293)
- - Join validation errors in one single toast and update errors from response. @cekk
- Toast content now has a <div> wrapper instead of a <p>. @cekk [#6295](https://github.com/plone/volto/issues/6295)
- Fixed findBlocks when no blocks are passed. @giuliaghisini [#6299](https://github.com/plone/volto/issues/6299)
- Fixed toolbar buttons not having a focus outline. @JeffersonBledsoe [#6313](https://github.com/plone/volto/issues/6313)
- fix: SidebarPopup close on ESC keypress @nileshgulia1 [#6315](https://github.com/plone/volto/issues/6315)
- Changed sidebar accordion text colour from @teal to @textColor. @JeffersonBledsoe [#6330](https://github.com/plone/volto/issues/6330)
- Labels accessibility for ArrayWidget, SelectWidget, TokenWidget. @folix-01 [#6332](https://github.com/plone/volto/issues/6332)
- Use lighter blue as link color in inverted tables to improve contrast for a11y @jackahl [#6334](https://github.com/plone/volto/issues/6334)

### Internal

- Added a pull request template as a checklist before submitting a PR. @stevepiercy [#6365](https://github.com/plone/volto/issues/6365)

### Documentation

- Update references to cookiecutter-plone-starter in docs. @davisagli [#6289](https://github.com/plone/volto/issues/6289)
- - Revised Cookieplone section in the Upgrade Guide. @stevepiercy [#6290](https://github.com/plone/volto/issues/6290)
- - Fix the MyST syntax for the label `upgrade-18-cookieplone-label`. @stevepiercy [#6360](https://github.com/plone/volto/issues/6360)
- Fixed spelling of prerequisites. @stevepiercy [#6362](https://github.com/plone/volto/issues/6362)
- Fix links to Vite website. @stevepiercy [#6366](https://github.com/plone/volto/issues/6366)

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

### Breaking
Expand Down
1 change: 1 addition & 0 deletions docs/source/theming/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@ theming-engine
theming-strategy
custom-styling
using-third-party-themes
theming-a-base-theme
```
46 changes: 46 additions & 0 deletions docs/source/theming/theming-a-base-theme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
myst:
html_meta:
"description": "Customize a base theme such as Volto Light Theme via SCSS."
"property=og:description": "Customize a base theme such as Volto Light Theme via SCSS."
"property=og:title": "Theming a base theme such as Volto Light Theme"
"keywords": "Volto, Plone, frontend, React, themes, Volto Light Theme"
---

# Customize a base theme

You can customize a base theme for your add-on.
The following examples use [Volto Light Theme](https://github.com/kitconcept/volto-light-theme) as a base theme.


## File structure

In your Volto add-on's {file}`src` folder, create a subfolder named {file}`theme`.
Inside {file}`theme` create two empty files named {file}`_main.scss` and {file}`_variables.scss`.
Refer to the following file system diagram.

```text
src/
├── components
├── index.js
└── theme
├── _main.scss
└── _variables.scss
```


## `_variables.scss`

{file}`_variables.scss` is where you can override SCSS variables of the base theme.

```scss
$text-color: #000;
$font-size: 18px;
$line-height: 24px;
```


## `_main.scss`

{file}`_main.scss` is where you should put all custom styles.
You can also include other SCSS or CSS files here.
39 changes: 37 additions & 2 deletions docs/source/upgrade-guide/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ If you shadowed the module {file}`packages/volto/src/helpers/FormValidation/Form
This prop must be assigned with the new prop passed down from the blocks engine `blocksErrors`.
If not passed down, the block can't display any field validation error.

```tsx
```jsx
// More component code above here

const {
Expand Down Expand Up @@ -451,7 +451,7 @@ 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}=
(upgrade-18-cookieplone-label)=

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

Expand All @@ -474,6 +474,41 @@ The recommended way of generating a project boilerplate is [Cookieplone](https:/
Please update your code to use the `pnpm` based setup.
```

### Update needed to project boilerplate generated with `@plone/generator-volto`

```{versionadded} Volto 18.0.0-alpha.42
Effective with Volto 18.0.0-alpha.42, a new feature introduced a breaking change in the boilerplates created using `@plone/generator-volto` 9.0.0-alpha.17 and earlier.
```

You need to change your {file}`razzle.config.js` file in the root of your boilerplate.

```diff
razzle.config.js
@@ -27,12 +27,14 @@ const customModifyWebpackConfig = ({
webpackConfig,
webpackObject,
options,
+ paths,
}) => {
const config = modifyWebpackConfig({
env: { target, dev },
webpackConfig,
webpackObject,
options,
+ paths,
});
// add custom code here..
return config;
```

The change involves adding a new `paths` argument to the `customModifyWebpackConfig` function.

### Added rule for ESlint to detect missing key property in iterators.

The `react/jsx-key` rule has been enabled in ESlint for catching missing `key` in JSX iterators.
You might catch some violations in your project or add-on code after running ESlint.
Adding the missing `key` property whenever the violation is reported will fix it.

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

## Upgrading to Volto 17.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.18 (2024-10-03)

### Bugfix

- Fixed client copy mutation, cleanup up move mutation for consistency @pnicolli [#6349](https://github.com/plone/volto/pull/6349)

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

### Documentation
Expand Down
1 change: 1 addition & 0 deletions packages/client/news/6373.internal
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Update Vite and vitest versions @sneridagh
1 change: 1 addition & 0 deletions packages/client/news/6382.internal
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Added watch script to package.json @pnicolli @deodorhunter
Loading

0 comments on commit bc07350

Please sign in to comment.