Skip to content

Commit 71d8e83

Browse files
authored
Merge branch '6.0' into classic-ui-autoforms
2 parents daf8ccb + f2f7d3c commit 71d8e83

File tree

12 files changed

+166
-19
lines changed

12 files changed

+166
-19
lines changed

.github/workflows/build_deploy.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ jobs:
1515
name: docs.plone.org
1616
url: https://docs.plone.org
1717
steps:
18-
- uses: actions/checkout@v3
18+
- uses: actions/checkout@v4
1919
- name: Setup Graphviz
20-
uses: ts-graphviz/setup-graphviz@v1
21-
- name: Set up Python 3.10
22-
uses: actions/setup-python@v4
20+
uses: ts-graphviz/setup-graphviz@v2
21+
- name: Set up Python 3.12
22+
uses: actions/setup-python@v5
2323
with:
24-
python-version: '3.10'
24+
python-version: '3.12'
2525
cache: 'pip'
2626
- name: Install dependencies
2727
run: |
@@ -39,11 +39,11 @@ jobs:
3939
run: make deploy
4040

4141
- name: Use Node.js ${{ env.node-version }}
42-
uses: actions/setup-node@v3
42+
uses: actions/setup-node@v4
4343
with:
4444
node-version: ${{ env.node-version }}
4545

46-
- uses: pnpm/action-setup@v2
46+
- uses: pnpm/action-setup@v3
4747
name: Install pnpm
4848
with:
4949
version: 8

.github/workflows/test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ jobs:
66
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
77
runs-on: ubuntu-latest
88
steps:
9-
- uses: actions/checkout@v1
9+
- uses: actions/checkout@v4
1010

1111
- name: Set up Python ${{ matrix.python-version }}
12-
uses: actions/setup-python@v4
12+
uses: actions/setup-python@v5
1313
with:
14-
python-version: "3.10"
14+
python-version: "3.12"
1515

1616
- name: Install dependencies
1717
run: |

.github/workflows/update_submodule.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# See https://github.com/plone/documentation/issues/1214 for current status
12
name: Get latest version of submodules and push back to 6.0 branch
23

34
on:

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ distclean: ## Clean docs build directory and Python virtual environment
3535

3636

3737
bin/python:
38-
python3 -m venv . || virtualenv --clear --python=python3 .
38+
python3 -m venv .
3939
bin/pip install -r requirements-initial.txt
4040
bin/pip install -r requirements.txt
4141

docs/backend/upgrading/version-specific-migration/upgrade-to-60.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -602,3 +602,57 @@ Please make sure you write valid JSON for the `template` option.
602602
```{seealso}
603603
See also the [TinyMCE 4 to 5 upgrade guide](https://www.tiny.cloud/docs/migration-from-4x/).
604604
```
605+
606+
## Viewlets
607+
608+
Plone 6.0 renames various viewlets or moves them to a different viewlet manager.
609+
This is because some viewlet names contained the name of a viewlet manager.
610+
This didn't always match the name of their actual viewlet manager, especially after moving them.
611+
Plone 6.0 removes such references from the viewlet names to avoid confusion.
612+
613+
- Plone 6.0 removes the `plone.header` viewlet from `plone.portaltop` manager, making it empty.
614+
- Plone 6.0 renames the `plone.abovecontenttitle.documentactions` viewlet to `plone.documentactions`, and moves it from manager `plone.belowcontentbody` to `plone.belowcontent`.
615+
- Plone 6.0 renames the `plone.abovecontenttitle.socialtags` viewlet to `plone.socialtags`.
616+
It remains in manager `plone.abovecontenttitle`.
617+
- Plone 6.0 renames the `plone.belowcontentbody.relateditems` viewlet to `plone.relateditems`.
618+
It remains in manager `plone.belowcontentbody`.
619+
- Plone 6.0 removes the `plone.manage_portlets_fallback` viewlet from the `plone.belowcontent` manager.
620+
- Plone 6.0 renames the `plone.belowcontenttitle.documentbyline` viewlet to `plone.documentbyline`.
621+
It remains in manager `plone.belowcontenttitle`.
622+
- Plone 6.0 renames the `plone.belowcontenttitle.keywords` viewlet to `plone.keywords`, and moves it from manager `plone.belowcontent` to `plone.belowcontentbody`.
623+
- Plone 6.0 adds the `plone.rights` viewlet in manager `plone.belowcontentbody`.
624+
625+
The names in the following table have had the namespace `plone.` removed from them for display purposes only.
626+
In your code, you should use the object's `plone.` namespace as a prefix.
627+
This table shows the same information, but in tabular form.
628+
629+
```{table} Viewlet changes from 5.2 to 6.0
630+
631+
| 5.2 viewlet name | 5.2 viewlet manager | 6.0 viewlet name | 6.0 viewlet manager |
632+
| ---------------- | ------------------- | ---------------- | ------------------- |
633+
| `header` | `portaltop` | | `portaltop` |
634+
| `abovecontenttitle.documentactions` | `belowcontentbody` | `documentactions` | `belowcontent` |
635+
| `abovecontenttitle.socialtags` | `abovecontenttitle` | `socialtags` | `abovecontenttitle` |
636+
| `belowcontentbody.relateditems` | `belowcontentbody` | `relateditems` | `belowcontentbody` |
637+
| `manage_portlets_fallback` | `belowcontent` | | `belowcontent` |
638+
| `belowcontenttitle.documentbyline` | `belowcontenttitle` | `documentbyline` | `belowcontenttitle` |
639+
| `belowcontenttitle.keywords` | `belowcontent` | `keywords` | `belowcontentbody` |
640+
| | `belowcontentbody` | `rights` | `belowcontentbody` |
641+
```
642+
643+
Plone 6.0 makes changes to two viewlet managers:
644+
645+
- Plone 6.0 removes the `plone.documentactions` (`IDocumentActions`) viewlet manager.
646+
In Plone 5.2 it was already empty.
647+
- Plone 6.0 adds the `plone.belowcontentdescription` (`IBelowContentDescription`) viewlet manager.
648+
By default this has no viewlets.
649+
650+
One final change is that Plone 6.0 moves the `plone.footer` viewlet from `plone.app.layout/viewlets` to `plone.app.portlets`.
651+
The viewlet remains in manager `plone.portalfooter`.
652+
It renders the portlets from the `plone.footerportlets` portlet manager.
653+
654+
## Boolean fields
655+
656+
Since `zope.schema==6.1.0`, all `zope.schema.Bool` fields must have a `required=False` attribute.
657+
This allows you to either tick or not tick the checkbox, submit the form, and process the field with either its value when ticked or `None` when unticked.
658+
Otherwise, you can't save the form without ticking the checkbox, which effectively makes the field value always `True`.

docs/classic-ui/icons.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,14 @@ To use a different icon than the system default, you can override the registrati
6767

6868
## Icon expression
6969

70-
```{todo}
71-
How does this work? We need an example here!
72-
```
73-
74-
- The field `icon_expression` is used again to define icons for actions, content types, and other purposes.
70+
- The field `icon_expr` is used again to define icons for actions, content types, and other purposes.
7571
- Use the icon name for icon expressions.
7672

73+
Example:
74+
75+
```xml
76+
<property name="icon_expr">string:list-check</property>
77+
```
7778

7879
(classic-ui-icons-icon-resolver-label)=
7980

docs/classic-ui/theming/from-scratch.md

Lines changed: 57 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ prefix = /++theme++plonetheme.munich
6666
doctype = <!DOCTYPE html>
6767
```
6868

69+
(classic-ui-from-scratch-bundle-registration-label)=
70+
6971
### Bundle registration
7072

7173
```xml
@@ -120,7 +122,61 @@ yarn dist
120122
- Tweak basic settings like rounded corners, shadows, and so on.
121123
- Set custom fonts
122124
- Define your own stuff
123-
- Import Boostrap (as basis)
125+
- Import Bootstrap (as basis)
126+
127+
128+
#### Minimal backend styling
129+
130+
When you create a theme from scratch, it is convenient to reuse the Barceloneta theme for:
131+
132+
- Plone toolbar
133+
- add and edit forms
134+
- control panels
135+
136+
To do so, follow this guide.
137+
138+
- Create a new CSS file in your theme, such as the following.
139+
140+
```scss
141+
@import "@plone/plonetheme-barceloneta-base/scss/variables.colors.plone";
142+
@import "@plone/plonetheme-barceloneta-base/scss/variables.colors.dark.plone";
143+
@import "@plone/plonetheme-barceloneta-base/scss/root_variables";
144+
@import "bootstrap/scss/bootstrap";
145+
146+
@import "@plone/plonetheme-barceloneta-base/scss/toolbar";
147+
@import "@plone/plonetheme-barceloneta-base/scss/controlpanels";
148+
@import "@plone/plonetheme-barceloneta-base/scss/forms";
149+
```
150+
151+
```{tip}
152+
See all the available [Barceloneta SCSS files](https://github.com/plone/plonetheme.barceloneta/tree/master/scss), and import the ones that you want to use.
153+
```
154+
155+
- Add `@plone/plonetheme-barceloneta-base` as a dependency.
156+
157+
```shell
158+
yarn add @plone/plonetheme-barceloneta-base
159+
```
160+
161+
- Add a script in {file}`package.json` to compile the CSS.
162+
163+
```json
164+
"css-compile-main": "sass --load-path=node_modules --style expanded --source-map --embed-sources --no-error-css plone.scss:../static/plone.css"
165+
```
166+
167+
```{tip}
168+
Look at [`plonetheme.barcelonta`'s {file}`package.json`](https://github.com/plone/plonetheme.barceloneta/blob/master/package.json) for a few more scripts that can prefix and minify your CSS and get a bundle for use in production.
169+
```
170+
171+
- Run the compilation.
172+
173+
```shell
174+
yarn run css-compile-main
175+
```
176+
177+
- Finally, {ref}`register the bundle <classic-ui-from-scratch-bundle-registration-label>`.
178+
179+
With this guide, you will save yourself quite some work on styling the toolbar, the add and edit forms, and control panels, while keeping the rest of your theming separate.
124180

125181

126182
#### Templates

docs/contributing/index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,10 @@ When a package is released with a new version, the release manager runs `towncri
8686
Because the log file is automatically generated, you should not edit it directly, except to make corrections, such as broken links.
8787

8888
To create a change log entry or news item, create a file in the `news` directory, located in the root of the package.
89+
8990
For Volto, its repository is in a monorepo structure, consisting of several packages in the `packages` folder.
9091
Thus for Volto and its packages, change log entries should be created in `packages/PACKAGE_NAME/news/`, which is the root of the package.
92+
When making a change to its documentation, set up, continuous integration, or other repository-wide items, place a change log entry in `packages/volto/news/` as a default.
9193

9294
The change log entry's format must be `###.type`, where `###` is the referenced GitHub issue or pull request number, `.` is the literal extension delimiter, and `type` is one of the following strings.
9395

docs/glossary.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -701,4 +701,33 @@ Nick
701701
predicate
702702
predicates
703703
In programming, a predicate is a test which returns `true` or `false`.
704+
705+
pnpm workspace
706+
workspace
707+
pnpm has built-in support for monorepositories (also known as multi-package repositories, multi-project repositories, or monolithic repositories).
708+
Workspaces provide support to manage multiple packages from your local file system from within a singular top-level, root package.
709+
710+
When you run `pnpm install` at the root of the repository, pnpm installs dependencies for all workspaces, ensuring consistency across the entire project.
711+
This centralized approach streamlines development, facilitates code sharing, and simplifies the maintenance of complex projects.
712+
713+
ESLint
714+
[ESLint](https://eslint.org/) statically analyzes your code to quickly find problems.
715+
It is built into most text editors and you can run ESLint as part of your continuous integration pipeline.
716+
717+
Stylelint
718+
[Stylelint](https://stylelint.io/) is a CSS linter that helps you avoid errors and enforce conventions.
719+
720+
Prettier
721+
[Prettier](https://prettier.io/) is an opinionated code formatter.
722+
723+
GitHub workflow
724+
GitHub workflows
725+
A [GitHub workflow](https://docs.github.com/en/actions/using-workflows) is a configurable automated process that will run one or more jobs.
726+
727+
husky
728+
[Husky](https://typicode.github.io/husky/) automatically lints your commit messages, code, and runs tests upon committing or pushing commits to a remote repository.
729+
730+
Jest
731+
[Jest](https://jestjs.io/) is a JavaScript testing framework.
732+
Volto uses Jest for unit tests.
704733
```

docs/install/create-project.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,10 @@ You will be presented with a series of prompts.
228228
You can accept the default values in square brackets (`[default-option]`) by hitting the {kbd}`Enter` key, or enter your preferred values.
229229
For ease of documentation, we will use the default values.
230230

231+
```{tip}
232+
See the cookiecutter's README for how to [Use options to avoid prompts](https://github.com/collective/cookiecutter-plone-starter/?tab=readme-ov-file#use-options-to-avoid-prompts).
233+
```
234+
231235
(avoid-plone-core-package-names)=
232236
233237
```{important}

0 commit comments

Comments
 (0)