Skip to content

Commit

Permalink
Merge branch 'main' into readme-reorg
Browse files Browse the repository at this point in the history
  • Loading branch information
stevepiercy committed Jan 27, 2024
2 parents 3cc1843 + 8f22dd7 commit 6585dcb
Show file tree
Hide file tree
Showing 62 changed files with 452 additions and 206 deletions.
14 changes: 1 addition & 13 deletions docs/source/addons/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -372,20 +372,8 @@ changed, to enable a custom Semantic theme inside the add-on:


```js
const analyzerPlugin = {
name: 'bundle-analyzer',
options: {
analyzerHost: '0.0.0.0',
analyzerMode: 'static',
generateStatsFile: true,
statsFilename: 'stats.json',
reportFilename: 'reports.html',
openAnalyzer: false,
},
};

const plugins = (defaultPlugins) => {
return defaultPlugins.concat([analyzerPlugin]);
return defaultPlugins;
};
const modify = (config, { target, dev }, webpack) => {
const themeConfigPath = `${__dirname}/theme/theme.config`;
Expand Down
2 changes: 1 addition & 1 deletion docs/source/client/future-improvements.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ The steps for this approach are as follows:
3. Render the component to string on the server
4. Pass the data from collected queries to TanStack Query cache hydration

Refer to official docs for more information: https://tanstack.com/query/v4/docs/react/guides/ssr
Refer to official docs for more information: https://tanstack.com/query/v4/docs/framework/react/guides/ssr

### Automatic caching approach

Expand Down
4 changes: 3 additions & 1 deletion docs/source/contributing/developing-core.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ myst:

This chapter describes how to develop Volto core and its libraries, packages, and apps as open source software contributions.

For how to develop a project using Volto, see {doc}`plone:install/index`.
```{seealso}
To create a full Plone project with both frontend and backend, see {doc}`plone:install/create-project` instead.
```


## Monorepo structure
Expand Down
9 changes: 5 additions & 4 deletions docs/source/recipes/color-picker-widget.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,12 +143,13 @@ The `name` key is mandatory in order to generate proper markup in the resultant

You can also use this selector, where an element with class names `block` and `teaser` with a child element whose HTML attribute `style` contains the value of `--background-color`:

```css
```scss
.block.teaser {
&[style*='--background-color'] {
padding: 20px 0;
}
```
padding: 20px 0;
}
}
```

```{seealso}
See the MDN CSS Reference for selectors.
Expand Down
27 changes: 16 additions & 11 deletions docs/source/recipes/creating-project.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,18 @@ myst:
"keywords": "Volto, Plone, frontend, React, new, volto project, basic"
---

# Creating a new Volto project
# Create a Volto project without a backend

This document shows how to create a Volto project with the frontend only when you have your own existing backend, such as Plone {term}`Classic UI`, {term}`Nick`, or {term}`Guillotina`.

```{seealso}
This document shows how to create a Volto project with the frontend only.
To create a full Plone project with both frontend and backend, see {doc}`plone:install/install-from-packages` instead.
To create a full Plone project with both frontend and backend, see {doc}`plone:install/create-project` instead.
To contribute to Volto, see {doc}`../contributing/developing-core`.
```

For using Volto for a project—in other words, use Volto as a library—you should use Volto's project generator `@plone/generator-volto`.
It's a boilerplate generator based in Yeoman that will provide you with the basic files and folder structure to bootstrap a Volto site.
It's a boilerplate project generator based on Yeoman that will provide you with the basic files and folder structure to bootstrap a Volto site.
In addition to bootstrapping stand-alone Volto projects, it can also bootstrap Volto add-ons.

1. Open a terminal and execute:
Expand All @@ -35,7 +38,7 @@ In addition to bootstrapping stand-alone Volto projects, it can also bootstrap V
```

2. Answer the questions when prompted, and provide the name of the new app (folder) to be created.
For the sake of this documentation, provide `myvoltoproject` as the project name then.
For the sake of this documentation, use `myvoltoproject` as the project name.

````{note}
You can run the generator with parameters to tailor your requirements.
Expand All @@ -44,20 +47,22 @@ In addition to bootstrapping stand-alone Volto projects, it can also bootstrap V
yo @plone/volto --help
```
or take a look at the [README](https://github.com/plone/volto/blob/main/packages/generator-volto/README.md) for more information.
```{seealso}
[`@plone/generator-volto` `README.md`](https://github.com/plone/volto/blob/main/packages/generator-volto/README.md).
```
````

3. Change directory to the newly created folder `myvoltoapp` (or the one you've chosen).
3. Change your working directory to the newly created folder `myvoltoproject` (or whatever name you entered).

```shell
cd myvoltoapp
cd myvoltoproject
```

4. The project is ready to be started, `@plone/generator-volto` already has run the dependencies installations for you.
4. `@plone/generator-volto` installed the dependencies for you.
Start the project.

```shell
yarn start
```

will start the development server, compiling and leaving the app ready at:
http://localhost:3000
This starts the development server, which compiles the project code, and when done, it serves the app at http://localhost:3000.
4 changes: 2 additions & 2 deletions docs/source/recipes/developing-a-project.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ myst:

# Developing a project

When you start developing a Plone project, it is recommended that you use Plone's cookiecutter boilerplate generator.
See {doc}`plone:install/install-from-packages` for more information.
When you start developing a Plone project, it is recommended that you use Plone's cookiecutter boilerplate project generator.
See {doc}`plone:install/create-project` for more information.

The generator will output the project folder structure.
It is organized in three folders named `frontend`, `backend`, and `devops`, each of which corresponds to its primary use.
Expand Down
68 changes: 68 additions & 0 deletions docs/source/release-notes/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,74 @@ myst:

<!-- towncrier release notes start -->

## 18.0.0-alpha.9 (2024-01-26)

### Feature

- Improve validation of IdWidget @tedw [#3716](https://github.com/plone/volto/issues/3716)

### Bugfix

- Removed unmaintained and unused razzle-plugin-bundle-analyze in favor of webpack-bundle-analyzer. @ichim-david
Updated extending Razzle from an add-on section to remove code that didn't belong to that recipe. @ichim-david [#5671](https://github.com/plone/volto/issues/5671)

### Internal

- Upgade `semantic-ui-react` to latest version (2.1.5) @sneridagh [#5632](https://github.com/plone/volto/issues/5632)

### Documentation

- Fixed redirect of `https://tanstack.com/query/v4/docs/react/guides/ssr` to `https://tanstack.com/query/v4/docs/framework/react/guides/ssr`. @stevepiercy [#5700](https://github.com/plone/volto/issues/5700)

## 18.0.0-alpha.8 (2024-01-25)

### Feature

- Add image preview in object browser widget. @robgietema [#5658](https://github.com/plone/volto/issues/5658)

### Bugfix

- Fix multilingual redirector where it doesn't take into account the stored cookie in SSR. @robgietema [#5628](https://github.com/plone/volto/issues/5628)
- Fix blocks chooser index and add a bit of breath to the left in the search input @sneridagh [#5647](https://github.com/plone/volto/issues/5647)
- Fix `links-to-item` should be a protected route. @iFlameing [#5666](https://github.com/plone/volto/issues/5666)
- Removed git merge conflicts from french volto.po locale file. @ichim-david [#5681](https://github.com/plone/volto/issues/5681)

### Documentation

- Clarify how to create a Volto project with the frontend only when you have your own existing backend. @stevepiercy [#3723](https://github.com/plone/volto/issues/3723)
- Enabled hyperlinking from narrative documentation to Storybook entries while developing, in Netlify preview builds, and when deployed to the main production Plone documentation. Documented usage and syntax in {ref}`link-to-storybook-entries-from-documentation`. @stevepiercy [#5599](https://github.com/plone/volto/issues/5599)
- Update cross-reference to main documentation from `install-from-packages` to `create-project`. @stevepiercy [#5654](https://github.com/plone/volto/issues/5654)
- Temporarily pin `sphinxcontrib-*help` dependencies so documentation can build. @stevepiercy [#5655](https://github.com/plone/volto/issues/5655)
- Pin Vale to 2.30.0 to allow build of documentation until we can upgrade to v3.x. @stevepiercy [#5656](https://github.com/plone/volto/issues/5656)
- Use correct Pygments lexer for SCSS. @stevepiercy [#5673](https://github.com/plone/volto/issues/5673)
- Fixed a broken reference to create a project in documentation. @stevepiercy [#5692](https://github.com/plone/volto/issues/5692)
- Align the project names in "Create a Volto project without a backend". @stevepiercy [#5694](https://github.com/plone/volto/issues/5694)

## 18.0.0-alpha.7 (2024-01-17)

### Feature

- Enhanced `ColorPickerWidget` with additional color definitions, saving it as an object instead of a string. @sneridagh [#5585](https://github.com/plone/volto/issues/5585)
- Allow to opt out of the nested prefixed name build in the custom CSS properties style name generator if an object is found in the style wrapper object. @sneridagh [#5586](https://github.com/plone/volto/issues/5586)

### Bugfix

- In the recurrence widget, set the vertical alignment of the `edit` button to `middle`. @Ravi-kumar9347 [#5359](https://github.com/plone/volto/issues/5359)
- Improve generation of type declarations. Fixes some key types propagation. @sneridagh [#5624](https://github.com/plone/volto/issues/5624)
- Unify start command, trigger `build:deps` command @sneridagh [#5633](https://github.com/plone/volto/issues/5633)
- Merge the StyleWrapper styles with the draggable props from b-D&D. @sneridagh
This fixes the D&D bug introduced in https://github.com/plone/volto/pull/5581 [#5652](https://github.com/plone/volto/issues/5652)

### Internal

- Add cypress tests for the "links-to-item" view of content items @jackahl [#5427](https://github.com/plone/volto/issues/5427)
- Polish po file handling @erral [#5542](https://github.com/plone/volto/issues/5542)
- Unify variables in `Makefile`s. @sneridagh [#5637](https://github.com/plone/volto/issues/5637)

### Documentation

- Clarified how CSS properties work. @stevepiercy [#5591](https://github.com/plone/volto/issues/5591)

## 18.0.0-alpha.6 (2024-01-02)

### Feature
Expand Down
6 changes: 6 additions & 0 deletions packages/registry/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@

<!-- towncrier release notes start -->

## 1.2.1 (2024-01-17)

### Bugfix

- Fix order of preference in addons-registry for the theme definition (THEME, volto.config.js, package.json) @sneridagh [#5649](https://github.com/plone/volto/issues/5649)

## 1.2.0 (2024-01-02)

### Feature
Expand Down
1 change: 0 additions & 1 deletion packages/registry/news/5649.bugfix

This file was deleted.

2 changes: 1 addition & 1 deletion packages/registry/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
],
"funding": "https://github.com/sponsors/plone",
"license": "MIT",
"version": "1.2.0",
"version": "1.2.1",
"repository": {
"type": "git",
"url": "https://github.com/plone/volto.git"
Expand Down
18 changes: 18 additions & 0 deletions packages/scripts/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,24 @@

<!-- towncrier release notes start -->

## 3.3.2 (2024-01-26)

### Bugfix

- handle addons that have not been migrated to the new structure of po files @erral [#5704](https://github.com/plone/volto/issues/5704)

## 3.3.1 (2024-01-23)

### Internal

- Fix `@plone/scripts` requires @sneridagh [#5687](https://github.com/plone/volto/issues/5687)

## 3.3.0 (2024-01-17)

### Internal

- Polish po file handling @erral [#5542](https://github.com/plone/volto/issues/5542)

## 3.2.1 (2024-01-11)

### Bugfix
Expand Down
29 changes: 24 additions & 5 deletions packages/scripts/i18n.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,11 @@ function poToJson({ registry, addonMode }) {
result[item.msgid] =
language === 'en'
? item.msgstr[0] ||
(item.comments[0]
(item.comments[0] && item.comments[0].startsWith('. Default: ')
? item.comments[0].replace('. Default: ', '')
: item.comments[0] &&
item.comments[0].startsWith('defaultMessage:')
? item.comments[0].replace('defaultMessage: ', '')
: '')
: item.msgstr[0];
}
Expand Down Expand Up @@ -270,7 +273,7 @@ function main({ addonMode }) {
if (!addonMode) {
let AddonConfigurationRegistry;
try {
// Detect where is the registry (if we are in Volto 18 or above)
// Detect where is the registry (if we are in Volto 18 or above for either core and projects)
if (
fs.existsSync(
path.join(
Expand All @@ -287,9 +290,25 @@ function main({ addonMode }) {
);
} else {
// We are in Volto 17 or below
AddonConfigurationRegistry = require(
path.join(projectRootPath, 'addon-registry'),
);
// Check if core Volto or project
if (
fs.existsSync(
path.join(projectRootPath, '/node_modules/@plone/volto'),
)
) {
// We are in a project
AddonConfigurationRegistry = require(
path.join(
projectRootPath,
'/node_modules/@plone/volto/addon-registry',
),
);
} else {
// We are in core (17 or below)
AddonConfigurationRegistry = require(
path.join(projectRootPath, 'addon-registry'),
);
}
}
} catch {
console.log(
Expand Down
1 change: 0 additions & 1 deletion packages/scripts/news/5542.internal

This file was deleted.

2 changes: 1 addition & 1 deletion packages/scripts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
}
],
"license": "MIT",
"version": "3.2.1",
"version": "3.3.2",
"repository": {
"type": "git",
"url": "git@github.com: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.6 (2024-01-25)

### Bugfix

- Fix code button in slate. @pbauer [#5668](https://github.com/plone/volto/issues/5668)

## 18.0.0-alpha.5 (2023-12-13)

### Feature
Expand Down
1 change: 0 additions & 1 deletion packages/volto-slate/news/5668.bugfix

This file was deleted.

2 changes: 1 addition & 1 deletion packages/volto-slate/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@plone/volto-slate",
"version": "18.0.0-alpha.5",
"version": "18.0.0-alpha.6",
"description": "Slate.js integration with Volto",
"main": "src/index.js",
"author": "European Environment Agency: IDM2 A-Team",
Expand Down

0 comments on commit 6585dcb

Please sign in to comment.