Skip to content

Commit 95f1ee7

Browse files
authored
Merge branch '6.0' into classic-ui-autoforms
2 parents 8c26e91 + aec5216 commit 95f1ee7

32 files changed

+662
-350
lines changed

.github/ISSUE_TEMPLATE/new-issue-form.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ body:
1717
id: description
1818
attributes:
1919
label: Description
20-
description: Include include screenshots and any other helpful information.
20+
description: Include screenshots and any other helpful information.
2121
validations:
2222
required: true

.github/workflows/build_deploy.yml

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ on:
55
branches:
66
- "6.0"
77

8+
env:
9+
node-version: 20.x
10+
811
jobs:
912
build_deploy:
1013
runs-on: ubuntu-latest
@@ -35,31 +38,32 @@ jobs:
3538
- name: Prepare deploy
3639
run: make deploy
3740

38-
# node setup
39-
- name: Use Node.js 16
41+
- name: Use Node.js ${{ env.node-version }}
4042
uses: actions/setup-node@v3
4143
with:
42-
node-version: '16'
43-
- name: Install Yarn
44-
run: npm install -g yarn
45-
# node cache
46-
- name: Get yarn cache directory path
47-
id: yarn-cache-dir-path
48-
working-directory: submodules/volto
49-
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
44+
node-version: ${{ env.node-version }}
45+
46+
- uses: pnpm/action-setup@v2
47+
name: Install pnpm
48+
with:
49+
version: 8
50+
run_install: false
51+
52+
- name: Get pnpm store directory
53+
shell: bash
54+
run: |
55+
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
56+
5057
- uses: actions/cache@v3
51-
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
58+
name: Setup pnpm cache
5259
with:
53-
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
54-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
60+
path: ${{ env.STORE_PATH }}
61+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
5562
restore-keys: |
56-
${{ runner.os }}-yarn-
63+
${{ runner.os }}-pnpm-store-
5764
5865
- name: StoryBook build
59-
run: |
60-
cd submodules/volto
61-
yarn install --immutable
62-
yarn build-storybook -o ../../_build/html/storybook
66+
run: make storybook
6367

6468
- name: Deploy to server
6569
id: deploy

Makefile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ SPHINXOPTS ?=
77
PAPER ?=
88

99
# Internal variables.
10-
SPHINXBUILD = $(realpath bin/sphinx-build)
11-
SPHINXAUTOBUILD = $(realpath bin/sphinx-autobuild)
10+
SPHINXBUILD = "$(realpath bin/sphinx-build)"
11+
SPHINXAUTOBUILD = "$(realpath bin/sphinx-autobuild)"
1212
DOCS_DIR = ./docs/
1313
BUILDDIR = ../_build
1414
PAPEROPT_a4 = -D latex_paper_size=a4
@@ -196,8 +196,8 @@ linkcheckbroken: deps ## Run linkcheck and show only broken links
196196

197197
.PHONY: vale
198198
vale: deps ## Run Vale style, grammar, and spell checks
199-
vale sync
200-
vale --no-wrap $(VALEFILES)
199+
bin/vale sync
200+
bin/vale --no-wrap $(VALEFILES)
201201
@echo
202202
@echo "Vale is finished; look for any errors in the above output."
203203

@@ -235,11 +235,11 @@ netlify:
235235
ln -s ../submodules/volto/docs/source ./docs/volto
236236
ln -s ../submodules/plone.restapi ./docs/plone.restapi
237237
ln -s ../submodules/plone.api/docs ./docs/plone.api
238-
cd $(DOCS_DIR) && sphinx-build -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
238+
cd $(DOCS_DIR) && sphinx-build -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html && cp ./netlify_robots.txt $(BUILDDIR)/html/robots.txt
239239

240240
.PHONY: storybook
241241
storybook:
242-
cd submodules/volto && yarn && yarn build-storybook -o ../../_build/html/storybook
242+
cd submodules/volto && pnpm i && pnpm build:registry && pnpm --filter @plone/volto build-storybook -o ../../../../_build/html/storybook
243243

244244
.PHONY: all
245245
all: clean vale linkcheck html ## Clean docs build, then run vale and linkcheck, and build html

docs/_static/contributing/first-time-plone-git-workflow.svg

Lines changed: 1 addition & 0 deletions
Loading

docs/classic-ui/images.md

Lines changed: 35 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ tag = scale_util.tag(
114114
scale=None,
115115
height=None,
116116
width=None,
117-
direction="thumbnail"
117+
mode="scale"
118118
)
119119
```
120120

@@ -233,20 +233,44 @@ image_scale = scaling_util.publishTraverse(context.REQUEST, groups[1])
233233
```
234234

235235

236-
(classic-ui-images-scaling-direction-label)=
236+
(classic-ui-images-scaling-mode-label)=
237237

238-
## Scaling `direction`
238+
## Scaling `mode`
239239

240-
The default direction is `thumbnail`.
240+
```{versionchanged} 6.0
241+
Added `mode` to replace the deprecated `direction`.
242+
Added new option names for `mode` to align with CSS `background-size` values, and deprecated previous names `keep`, `thumbnail`, `scale-crop-to-fit`, `down`, `scale-crop-to-fill`, and `up`.
243+
```
244+
245+
Scaling is intended for the optimal display of images in a web browser.
246+
247+
To scale an image, you can use the `mode` parameter to control the scaling output.
248+
You must use either `width` or `height`, or both.
249+
250+
Three different scaling options are supported.
251+
They correspond to the CSS [`background-size`](https://developer.mozilla.org/en-US/docs/Web/CSS/background-size) values.
252+
253+
The possible options for `mode` are listed below, where the default option is `scale`.
254+
255+
`scale`
256+
: This is the default option.
257+
`scale` scales to the requested dimensions without cropping.
258+
The resulting image may have a different size than requested.
259+
This option requires both `width` and `height` to be specified.
260+
It does not scale up.
261+
262+
Deprecated option names: `keep`, `thumbnail`.
263+
264+
`contain`
265+
: `contain` starts by scaling the image either to the smaller dimension when you give both `width` and `height`, or to the only given dimension, then crops to the other dimension if needed.
266+
267+
Deprecated option names: `scale-crop-to-fit`, `down`.
241268

242-
Other options are:
269+
`cover`
270+
: `cover` scales the image either to the larger dimension when you give both `width` and `height`, or to the only given dimension, up to the size you specify.
271+
Despite the deprecated option name, it does not crop.
243272

244-
* `down`
245-
* `keep`
246-
* `scale-crop-to-fill`
247-
* `scale-crop-to-fit`
248-
* `thumbnail`
249-
* `up`
273+
Deprecated option names: `scale-crop-to-fill`, `up`.
250274

251275

252276
(classic-ui-images-permissions-label)=

docs/classic-ui/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ forms
5353
icons
5454
images
5555
layers
56+
mockup
5657
portlets
5758
recipes
5859
static-resources

docs/classic-ui/mockup.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
myst:
3+
html_meta:
4+
"description": "Mockup together with Patternslib are used to build the UI toolkit for Classic UI, a frontend for Plone."
5+
"property=og:description": "Mockup together with Patternslib are used to build the UI toolkit for Classic UI, a frontend for Plone."
6+
"property=og:title": "Mockup"
7+
"keywords": "Mockup, Patternslib, Classic UI, frontend, Plone"
8+
---
9+
10+
(mockup-label)=
11+
12+
# Mockup
13+
14+
{term}`Mockup` together with {term}`Patternslib` are used to build the UI toolkit for {term}`Classic UI`, a frontend for Plone.
15+
16+
View the [interactive documentation of Mockup](https://plone.github.io/mockup/).
17+
18+
For more information, visit the [Mockup repository on GitHub](https://github.com/plone/mockup).

docs/classic-ui/theming/barceloneta.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ To create an add-on package with a Plone Classic UI theme, you need to install t
2525
- [Python (>=3.8)](https://www.python.org/)
2626
- [plonecli](https://pypi.org/project/plonecli/)
2727

28-
Read more about how to install pre-requisites in {doc}`/install/install-from-packages`.
28+
Read more about how to install pre-requisites in {doc}`/install/create-project`.
2929

3030

3131
(classic-ui-theming-barceloneta-create-a-classic-ui-theme-add-on-package-label)=

docs/conf.py

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
"sphinx.ext.todo",
5050
"sphinx_copybutton",
5151
"sphinx_design",
52+
"sphinx_reredirects",
5253
"sphinx_sitemap",
5354
"sphinxcontrib.httpdomain", # plone.restapi
5455
"sphinxcontrib.httpexample", # plone.restapi
@@ -92,11 +93,14 @@
9293
r"https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS/Errors#Identifying_the_issue",
9394
r"https://docs.cypress.io/guides/references/migration-guide#Migrating-to-Cypress-version-10-0", # volto
9495
# Ignore unreliable sites
96+
r"https://chromewebstore.google.com/detail/react-developer-tools/fmkadmapgofadopljbjfkapdkoienihi", # TODO retest with latest Sphinx when upgrading theme. chromewebstore recently changed its URL and has "too many redirects".
97+
r"https://chromewebstore.google.com/detail/redux-devtools/lmhkpmbekcpmknklioeibfkpmmfibljd", # TODO retest with latest Sphinx when upgrading theme. chromewebstore recently changed its URL and has "too many redirects".
98+
r"https://stackoverflow.com", # volto and documentation # TODO retest with latest Sphinx.
9599
r"https://web.archive.org/", # volto
96100
r"https://www.youtube.com/playlist", # volto, TODO remove after installing sphinxcontrib.youtube
97101
]
98102
linkcheck_anchors = True
99-
linkcheck_timeout = 5
103+
linkcheck_timeout = 10
100104
linkcheck_retries = 1
101105

102106
# The suffix of source filenames.
@@ -127,6 +131,11 @@
127131
"plone.restapi/performance",
128132
"plone.restapi/src",
129133
"volto/contributing/branch-policy.md",
134+
"volto/contributing/install-docker.md",
135+
"volto/contributing/install-git.md",
136+
"volto/contributing/install-make.md",
137+
"volto/contributing/install-nodejs.md",
138+
"volto/contributing/install-operating-system.md",
130139
]
131140

132141
suppress_warnings = [
@@ -216,6 +225,16 @@
216225
notfound_template = "404.html"
217226

218227

228+
# -- sphinx-reredirects configuration ----------------------------------
229+
# https://documatt.com/sphinx-reredirects/usage.html
230+
redirects = {
231+
"contributing/plone-api": "/plone.api/contribute/index.html",
232+
"contributing/plone-restapi": "/plone.restapi/docs/source/contributing/index.html",
233+
"contributing/volto": "/volto/contributing/index.html",
234+
"install/install-from-packages": "/install/create-project.html",
235+
}
236+
237+
219238
# -- Options for HTML output -------------------------------------------------
220239

221240
# The theme to use for HTML and HTML Help pages. See the documentation for
@@ -322,8 +341,9 @@ def source_replace(app, docname, source):
322341
# Dict of replacements.
323342
source_replacements = {
324343
"{PLONE_BACKEND_MINOR_VERSION}": "6.0",
325-
"{PLONE_BACKEND_PATCH_VERSION}": "6.0.8",
326-
"{NVM_VERSION}": "0.39.3",
344+
"{PLONE_BACKEND_PATCH_VERSION}": "6.0.10.1",
345+
"{NVM_VERSION}": "0.39.5",
346+
"{SUPPORTED_PYTHON_VERSIONS}": "3.8, 3.9, 3.10, 3.11, or 3.12",
327347
}
328348

329349

docs/contributing/documentation/authors.md

Lines changed: 39 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,12 @@ Open `/_build/html/index.html` in a web browser.
5353

5454
### American English spelling, grammar, and syntax, and style guide
5555

56-
Spellings are enforced through [`Vale`](https://vale.sh/).
56+
[Vale](https://vale.sh/) is a linter for narrative text.
57+
It checks spelling, English grammar, and style guides.
5758
Plone uses American English.
5859

59-
Spelling is configured in {file}`Makefile`, {file}`.vale.ini`, and in files in `styles/Vocab/Plone/`.
60-
61-
Authors should add new words and proper names using correct casing to {file}`styles/Vocab/Plone/accept.txt`, sorted alphabetically and case-insensitive.
62-
6360
Vale also provides English grammar and syntax checking, as well as a Style Guide.
64-
We follow the [Microsoft Writing Style Guide](https://learn.microsoft.com/en-us/style-guide/welcome/).
61+
The Plone Documentation Team selected the [Microsoft Writing Style Guide](https://learn.microsoft.com/en-us/style-guide/welcome/) for its ease of use—especially for non-native English readers and writers—and attention to non-technical audiences.
6562

6663
To perform all these checks, run the following command.
6764

@@ -74,6 +71,41 @@ We also understand that contributors might not be fluent in English.
7471
We encourage contributors to make a reasonable effort, and to request a review of their pull request from community members who are fluent in English to fix grammar and syntax.
7572
Please ask!
7673

74+
```{note}
75+
More corrections to spellings and Vale's configuration are welcome by submitting a pull request.
76+
This is an easy way to become a contributor to Plone.
77+
See {ref}`authors-advanced-vale-usage-label` for details.
78+
```
79+
80+
81+
(authors-advanced-vale-usage-label)=
82+
83+
#### Advanced Vale usage
84+
85+
To have Vale check only a specific file or directory of files, you can issue [Vale commands](https://vale.sh/manual/) with options in a shell session.
86+
To allow this, you must either:
87+
88+
- activate your Python virtual environment
89+
- use the virtual environment path, such as `bin/vale`
90+
- install Vale using operating system's package manager
91+
92+
The Vale `Makefile` command automatically installs Vale into your Python virtual environment—which is also created via any documentation `Makefile` commands—when you invoke it for the first time.
93+
94+
Vale has [integrations](https://vale.sh/docs/integrations/guide/) with various IDEs.
95+
Integration might require installing Vale using operating system's package manager.
96+
97+
- [JetBrains](https://vale.sh/docs/integrations/jetbrains/)
98+
- [Vim](https://github.com/dense-analysis/ale)
99+
- [VS Code](https://github.com/errata-ai/vale-vscode)
100+
101+
Plone configures Vale in three places:
102+
103+
- {file}`.vale.ini` is Vale's configuration file.
104+
This file allows overriding rules or changing their severity.
105+
- {file}`Makefile` passes options to the `vale` command, such as the files Vale checks.
106+
- Plone documentation uses a custom spelling dictionary, with accepted and rejected spellings in `styles/Vocab/Plone`.
107+
Authors should add new words and proper names using correct casing to {file}`styles/Vocab/Plone/accept.txt`, sorted alphabetically and case-insensitive.
108+
77109

78110
(authors-linkcheck-label)=
79111

@@ -266,4 +298,5 @@ The Plone Documentation Team adopted additional guidelines.
266298
## General documentation writing references
267299

268300
- [Write the Docs - Documentation Guide](https://www.writethedocs.org/guide/)
301+
- [Creating effective technical documentation](https://developer.mozilla.org/en-US/blog/technical-writing/), Dipika Bhattacharya, Technical Writer at Mozilla Developer Network
269302
- [A Guide to Em Dashes, En Dashes, and Hyphens](https://www.merriam-webster.com/grammar/em-dash-en-dash-how-to-use)

0 commit comments

Comments
 (0)