Skip to content

Commit b625d18

Browse files
authored
Merge branch '6.0' into glossary-pnpm-workspace
2 parents 8d125d5 + a00af7a commit b625d18

File tree

3 files changed

+69
-6
lines changed

3 files changed

+69
-6
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -650,3 +650,9 @@ Plone 6.0 makes changes to two viewlet managers:
650650
One final change is that Plone 6.0 moves the `plone.footer` viewlet from `plone.app.layout/viewlets` to `plone.app.portlets`.
651651
The viewlet remains in manager `plone.portalfooter`.
652652
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

0 commit comments

Comments
 (0)