Skip to content

Commit

Permalink
Merge branch 'main' into fix_scrollToTop_SSR
Browse files Browse the repository at this point in the history
  • Loading branch information
Faakhir30 authored Dec 9, 2024
2 parents 0c34913 + 6b78429 commit efa614d
Show file tree
Hide file tree
Showing 13 changed files with 69 additions and 44 deletions.
17 changes: 17 additions & 0 deletions docs/source/release-notes/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,23 @@ myst:

<!-- towncrier release notes start -->

## 18.2.2 (2024-12-09)

### Bugfix

- Fixed circular import error in dev with HMR in core Blocks shadow customizations. @sneridagh [#6525](https://github.com/plone/volto/issues/6525)

## 18.2.1 (2024-12-09)

### Bugfix

- Fixes ICS download in non-public event content. @sneridagh [#6515](https://github.com/plone/volto/issues/6515)
- Fixed circular import error in dev with HMR in `App` component when imported in the main default config. @sneridagh [#6524](https://github.com/plone/volto/issues/6524)

### Internal

- Fix extension in files containing JSX. @sneridagh [#6520](https://github.com/plone/volto/issues/6520)

## 18.2.0 (2024-12-08)

### Internal
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.3 (2024-12-09)

### Internal

- Fix extension in files containing JSX. @sneridagh [#6520](https://github.com/plone/volto/issues/6520)

## 18.0.2 (2024-12-08)

### Internal
Expand Down
1 change: 0 additions & 1 deletion packages/volto-slate/news/6520.internal

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.2",
"version": "18.0.3",
"description": "Slate.js integration with Volto",
"main": "src/index.js",
"author": "European Environment Agency: IDM2 A-Team",
Expand Down
2 changes: 1 addition & 1 deletion packages/volto/.release-it.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"../scripts/prepublish.js": {}
},
"hooks": {
"before:bump": ["pnpm i18n", "pnpm build:types", "git add types"],
"before:bump": ["pnpm i18n"],
"after:bump": [
"pipx run towncrier build --draft --yes --version ${version} > .changelog.draft",
"pipx run towncrier build --yes --version ${version}",
Expand Down
17 changes: 17 additions & 0 deletions packages/volto/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,23 @@ myst:

<!-- towncrier release notes start -->

## 18.2.2 (2024-12-09)

### Bugfix

- Fixed circular import error in dev with HMR in core Blocks shadow customizations. @sneridagh [#6525](https://github.com/plone/volto/issues/6525)

## 18.2.1 (2024-12-09)

### Bugfix

- Fixes ICS download in non-public event content. @sneridagh [#6515](https://github.com/plone/volto/issues/6515)
- Fixed circular import error in dev with HMR in `App` component when imported in the main default config. @sneridagh [#6524](https://github.com/plone/volto/issues/6524)

### Internal

- Fix extension in files containing JSX. @sneridagh [#6520](https://github.com/plone/volto/issues/6520)

## 18.2.0 (2024-12-08)

### Internal
Expand Down
1 change: 0 additions & 1 deletion packages/volto/news/6515.bugfix

This file was deleted.

1 change: 0 additions & 1 deletion packages/volto/news/6520.internal

This file was deleted.

2 changes: 1 addition & 1 deletion packages/volto/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
}
],
"license": "MIT",
"version": "18.2.0",
"version": "18.2.2",
"repository": {
"type": "git",
"url": "[email protected]:plone/volto.git"
Expand Down
9 changes: 9 additions & 0 deletions packages/volto/src/config/Blocks.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -530,6 +530,15 @@ const requiredBlocks = ['title'];
const initialBlocks = {};
const initialBlocksFocus = {}; //{Document:'title'}

export function installDefaultBlocks(config) {
config.blocks.requiredBlocks = requiredBlocks;
config.blocks.blocksConfig = blocksConfig;
config.blocks.groupBlocksOrder = groupBlocksOrder;
config.blocks.initialBlocks = initialBlocks;
config.blocks.initialBlocksFocus = initialBlocksFocus;
config.blocks.showEditBlocksInBabelView = false;
}

export {
groupBlocksOrder,
requiredBlocks,
Expand Down
15 changes: 9 additions & 6 deletions packages/volto/src/config/Components.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@ import App from '@plone/volto/components/theme/App/App';
import PreviewImage from '@plone/volto/components/theme/PreviewImage/PreviewImage';
import Image from '@plone/volto/components/theme/Image/Image';

// Register components.
export const components = {
PreviewImage: { component: PreviewImage },
App: { component: App },
Image: { component: Image },
};
export function installDefaultComponents(config) {
config.components = {
PreviewImage: { component: PreviewImage },
App: { component: App },
Image: { component: Image },
};

return config;
}
25 changes: 7 additions & 18 deletions packages/volto/src/config/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import ConfigRegistry from '@plone/volto/registry';
import { parse as parseUrl } from 'url';
import { defaultWidget, widgetMapping } from './Widgets';
import {
Expand All @@ -9,14 +10,6 @@ import {
} from './Views';
import { nonContentRoutes } from './NonContentRoutes';
import { nonContentRoutesPublic } from './NonContentRoutesPublic';
import {
groupBlocksOrder,
requiredBlocks,
blocksConfig,
initialBlocks,
initialBlocksFocus,
} from './Blocks';
import { components } from './Components';
import { loadables } from './Loadables';
import { workflowMapping } from './Workflows';
import slots from './slots';
Expand All @@ -32,7 +25,8 @@ import {

import applyAddonConfiguration, { addonsInfo } from 'load-volto-addons';

import ConfigRegistry from '@plone/volto/registry';
import { installDefaultComponents } from './Components';
import { installDefaultBlocks } from './Blocks';

import { getSiteAsyncPropExtender } from '@plone/volto/helpers/Site';
import { registerValidators } from './validation';
Expand Down Expand Up @@ -206,17 +200,10 @@ let config = {
errorViews,
layoutViewsNamesMapping,
},
blocks: {
requiredBlocks,
blocksConfig,
groupBlocksOrder,
initialBlocks,
initialBlocksFocus,
showEditBlocksInBabelView: false,
},
blocks: {},
addonRoutes: [],
addonReducers: {},
components,
components: {},
slots: {},
utilities: {},
};
Expand Down Expand Up @@ -261,5 +248,7 @@ Object.entries(slots).forEach(([slotName, components]) => {
});

registerValidators(ConfigRegistry);
installDefaultComponents(ConfigRegistry);
installDefaultBlocks(ConfigRegistry);

applyAddonConfiguration(ConfigRegistry);
15 changes: 1 addition & 14 deletions packages/volto/types/config/Components.d.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1 @@
export namespace components {
namespace PreviewImage {
export { PreviewImage as component };
}
namespace App {
export { App as component };
}
namespace Image {
export { Image as component };
}
}
import PreviewImage_1 from '@plone/volto/components/theme/PreviewImage/PreviewImage';
import App_1 from '@plone/volto/components/theme/App/App';
import Image_1 from '@plone/volto/components/theme/Image/Image';
export function installDefaultComponents(config: any): any;

0 comments on commit efa614d

Please sign in to comment.