Skip to content

Commit

Permalink
Merge branch 'master' into linkcheck
Browse files Browse the repository at this point in the history
* master: (25 commits)
  Add projectId for Cypress dashboard (#3023)
  Docs: faster onboarding, identify running processes, improve internal proxy clarification (#3010)
  Pin pyOpenSSL to 21.1.0
  Back to development
  Release 14.7.0
  Prepare for release
  Fix changelog
  Look ma, no `momentjs`! (#2910)
  Back to development
  Release 14.6.0
  Prepare for release
  Fix ObjectWidget story (#3009)
  Use `volto.config.js` as dynamic configuration for addons. It adds up… (#3008)
  fix: enable url with 'underscore' char
  fix: fixed italian translations
  Back to development
  Release 14.5.0
  Prepare for release
  Chenges to lockfile not saved, apparently :/
  Fix `language-independent-field` CSS class styling (#3005)
  ...
  • Loading branch information
sneridagh committed Feb 2, 2022
2 parents 88f4124 + facd3c9 commit 9f397bf
Show file tree
Hide file tree
Showing 77 changed files with 2,562 additions and 392 deletions.
46 changes: 44 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Change Log

## 14.4.1 (unreleased)
## 14.7.1 (unreleased)

### Breaking

Expand All @@ -14,9 +14,50 @@

### Internal

- Lazyload react-beautiful-dnd @tiberiuichim
### Docs

Update documentation for internal proxy & other smaller reorganisation for quicker onboarding of
new users/evaluators. @fredvd

## 14.7.0 (2022-01-28)

### Feature

- Add `<FormattedDate>` and `<FormattedRelativeDate>` components. Check their Storybook stories for details. This is part of ongoing work to minimize the use of 'deprecated' momentjs. @sneridagh @tiberiuichim

### Internal

- Upgrade jest to latest release, 27 major. @tiberiuichim
- Lazyload momentjs. `parseDateTime` helper now requires passing the momentjs library @tiberiuichim

## 14.6.0 (2022-01-27)

### Feature

- Use `volto.config.js` as dynamic configuration for addons. It adds up to the `package.json` `addons` key, allowing dynamic load of addons (eg. via environment variables) @sneridagh

### Internal

- Fix ObjectListWidget story bug caused by lazyloading dnd libraries
@tiberiuichim

## 14.5.0 (2022-01-26)

### Feature

- VocabularyTermsWidget: Token is now on creation of term editable, but stays ineditable afterwards. @ksuess

### Bugfix

- Fix A11Y violations in Navigation @iRohitSingh
- Fix `language-independent-field` CSS class styling @sneridagh

### Internal

- Lazyload react-beautiful-dnd @tiberiuichim
- Lazyload react-dnd @tiberiuichim
- Improve docs on environment variables, add recipes @sneridagh
- Update p.restapi to 8.20.0 and plone.volto to 4.0.0a1 and plone.rest to 2.0.0a2 @sneridagh

## 14.4.0 (2022-01-21)

Expand All @@ -34,6 +75,7 @@

### Bugfix

- Fix ListingBlock to add "No results" message when there are no messages @erral
- Fix overflow table in Content view @giuliaghisini
- Fixed url validation in FormValidation to admit ip addresses. @giuliaghisini
- Upgrade to plone.restapi 8.19.0 (to support the language independent fields serialization) @sneridagh
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ MAKEFLAGS+=--no-builtin-rules

INSTANCE_PORT=8080
DOCKER_IMAGE=plone/plone-backend:5.2.6
KGS=plone.restapi==8.19.0 plone.app.iterate==4.0.2 plone.rest==2.0.0a1 plone.app.vocabularies==4.3.0 plone.volto==3.1.0a8
KGS=plone.restapi==8.20.0 plone.volto==4.0.0a2 plone.rest==2.0.0a2 plone.app.iterate==4.0.2 plone.app.vocabularies==4.3.0

# Recipe snippets for reuse

Expand Down Expand Up @@ -91,7 +91,7 @@ start-backend: ## Start Plone Backend

.PHONY: start-backend-docker
start-backend-docker:
docker run -it --rm --name=plone -p 8080:8080 -e SITE=Plone -e ADDONS="plone.volto" -e ZCML="plone.volto.cors" plone
docker run -it --rm -p 8080:8080 -e SITE=Plone -e ADDONS='$(KGS)' $(DOCKER_IMAGE)

.PHONY: start-backend-docker-guillotina
start-backend-docker-guillotina:
Expand Down
10 changes: 10 additions & 0 deletions __tests__/addon-registry.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ describe('AddonConfigurationRegistry', () => {
'test-addon',
'test-released-addon',
'test-released-source-addon',
'my-volto-config-addon',
'test-released-dummy',
'test-released-unmentioned',
]);
Expand Down Expand Up @@ -60,6 +61,13 @@ describe('AddonConfigurationRegistry', () => {
name: 'test-released-unmentioned',
packageJson: `${base}/node_modules/test-released-unmentioned/package.json`,
},
'my-volto-config-addon': {
addons: ['test-released-dummy'],
isPublishedPackage: false,
modulePath: `${base}/addons/my-volto-config-addon/src`,
name: 'my-volto-config-addon',
packageJson: `${base}/addons/my-volto-config-addon/package.json`,
},
'test-released-dummy': {
addons: ['test-released-unmentioned'],
isPublishedPackage: false,
Expand All @@ -74,6 +82,7 @@ describe('AddonConfigurationRegistry', () => {
const base = path.join(__dirname, 'fixtures', 'test-volto-project');
const reg = new AddonConfigurationRegistry(base);
expect(reg.getResolveAliases()).toStrictEqual({
'my-volto-config-addon': `${base}/addons/my-volto-config-addon/src`,
'test-addon': `${base}/addons/test-addon/src`,
'test-released-addon': `${base}/node_modules/test-released-addon`,
'test-released-dummy': `${base}/addons/test-released-dummy`,
Expand All @@ -98,6 +107,7 @@ describe('AddonConfigurationRegistry', () => {
'test-addon',
'test-released-addon',
'test-released-source-addon',
'my-volto-config-addon',
]);
});

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"name": "test-addon",
"customizationPaths": [
"src/custom-addons"
],
"addons": [
"test-released-dummy"
]
}
Empty file.
3 changes: 2 additions & 1 deletion __tests__/fixtures/test-volto-project/jsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
"compilerOptions": {
"paths": {
"test-addon": ["test-addon/src"],
"test-released-dummy": ["test-released-dummy"]
"test-released-dummy": ["test-released-dummy"],
"my-volto-config-addon": ["my-volto-config-addon/src"]
},
"baseUrl": "addons"
}
Expand Down
3 changes: 3 additions & 0 deletions __tests__/fixtures/test-volto-project/volto.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
addons: ['my-volto-config-addon'],
};
17 changes: 15 additions & 2 deletions addon-registry.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,26 @@ class AddonConfigurationRegistry {
projectRootPath,
'package.json',
)));
// Loads the dynamic config, if any
if (fs.existsSync(path.join(projectRootPath, 'volto.config.js'))) {
this.voltoConfigJS = require(path.join(
projectRootPath,
'volto.config.js',
));
} else {
this.voltoConfigJS = [];
}
this.resultantMergedAddons = [
...(packageJson.addons || []),
...(this.voltoConfigJS.addons || []),
];

this.projectRootPath = projectRootPath;
this.voltoPath =
packageJson.name === '@plone/volto'
? `${projectRootPath}`
: `${projectRootPath}/node_modules/@plone/volto`;
this.addonNames = (packageJson.addons || []).map((s) => s.split(':')[0]);
this.addonNames = this.resultantMergedAddons.map((s) => s.split(':')[0]);
this.packages = {};
this.customizations = new Map();

Expand All @@ -114,7 +127,7 @@ class AddonConfigurationRegistry {
this.initTestingPackages();

this.dependencyGraph = buildDependencyGraph(
packageJson.addons || [],
this.resultantMergedAddons,
(name) => {
this.initPublishedPackage(name);
return this.packages[name].addons || [];
Expand Down
5 changes: 3 additions & 2 deletions api/buildout.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,14 @@ eggs = ${instance:eggs}
setuptools =
zc.buildout =
# force to latest p.restapi
plone.restapi = 8.19.0
plone.restapi = 8.20.0
# new JSON only traversal
plone.rest = 2.0.0a1
plone.rest = 2.0.0a2
# Using working copy support in Volto requires it
plone.app.iterate = 4.0.2
# plone.volto requires it
plone.app.vocabularies = 4.3.0
pyOpenSSL = 21.0.0

plone.volto =
robotframework =
Expand Down
3 changes: 2 additions & 1 deletion cypress.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
"viewportWidth": 1280,
"ignoreTestFiles": ["*~"],
"integrationFolder": "cypress/tests/core",
"chromeWebSecurity": false
"chromeWebSecurity": false,
"projectId": "5iy5e2"
}
4 changes: 1 addition & 3 deletions cypress/tests/core-sandbox/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@ context('Search action tests', () => {
cy.navigate('/newsitem/edit');

// Add subject
cy.get('a:contains("Categorization")')
.click()
.get('.field-wrapper-subjects input')
cy.get('.field-wrapper-subjects input')
.type('garden', { force: true })
.type('{enter}');
cy.get('#toolbar-save').click();
Expand Down
139 changes: 70 additions & 69 deletions docs/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,75 +19,76 @@ extra_css:
- "stylesheets/pygments.css"

nav:
- Getting Started:
- Bootstrap Volto: "getting-started/install.md"
- Developer roadmap: "getting-started/roadmap.md"
- Learning resources: "getting-started/others.md"
- How does it work under the hood: "getting-started/howdoesitwork.md"
- Design principles: "design-principles/index.md"
- Style Guide: "style-guide/index.md"
- Configuration:
- What is configurable?: "configuration/how-to.md"
- Settings reference guide: "configuration/settings-reference.md"
- Zero config builds: "configuration/zero-config-builds.md"
- Internal proxy: "configuration/internalproxy.md"
- Backend configuration: "configuration/backend.md"
- Richeditor settings: "configuration/richeditor-settings.md"
- Multilingual: "configuration/multilingual.md"
- Working copy: "configuration/workingcopy.md"
- Environment variables: "configuration/environmentvariables.md"
- API expanders: "configuration/expanders.md"
- Theming & Semantic UI:
- About Semantic UI: "theming/about-semantic.md"
- Semantic UI Theming: "theming/semanticui-theming.md"
- Theming Engine: "theming/theming-engine.md"
- Theming strategy: "theming/theming-strategy.md"
- Custom styling: "theming/custom-styling.md"
- Use another theming engine: "theming/using-third-party-themes.md"
- Development recipes:
- Creating a project: "recipes/creating-project.md"
- Folder structure: "recipes/folder-structure.md"
- Customizing components: "recipes/customizing-components.md"
- Customizing views: "recipes/customizing-views.md"
- Creating new views: "recipes/creating-views.md"
- Internationalization: "recipes/i18n.md"
- Express middleware: "recipes/express.md"
- Lazy loading and code splitting: "recipes/lazyload.md"
- App component insertion point: "recipes/appextras.md"
- Context navigation component: "recipes/contextnavigation.md"
- Pluggables: "recipes/pluggables.md"
- Forms and widgets: "recipes/widget.md"
- Blocks:
- Introduction: "blocks/introduction.md"
- Anatomy: "blocks/anatomy.md"
- Settings: "blocks/settings.md"
- Edit components: "blocks/editcomponent.md"
- Extensions: "blocks/extensions.md"
- SSR: "blocks/ssr.md"
- Addons:
- Introduction: "addons/index.md"
- Internationalization: "addons/i18n.md"
- Best practices: "addons/best-practices.md"
- Backend integration: "backend/index.md"
- Deploying:
- Simple deployment: "deploying/simple.md"
- Using PM2: "deploying/pm2.md"
- Seamless mode: "deploying/seamless-mode.md"
- Using apache: "deploying/apache.md"
- Using sentry: "deploying/sentry.md"
- Performance improvements: "deploying/performance.md"
- Upgrade Guide: "upgrade-guide/index.md"
- Developer Guidelines:
- Language features: "developer-guidelines/language-features.md"
- Linting: "developer-guidelines/linting.md"
- React: "developer-guidelines/react.md"
- Redux: "developer-guidelines/redux.md"
- Routing: "developer-guidelines/routing.md"
- Testing: "developer-guidelines/testing.md"
- Acceptance tests: "developer-guidelines/acceptance-tests.md"
- Accessibility: "developer-guidelines/accessibility-guidelines.md"
- Contributing:
- Guidelines: "contributing/guidelines.md"
- Getting Started:
- Installing Volto: 'getting-started/install.md'
- Developer roadmap: 'getting-started/roadmap.md'
- Learning resources: 'getting-started/others.md'
- Configuration:
- What is configurable?: 'configuration/how-to.md'
- Settings reference guide: 'configuration/settings-reference.md'
- Zero config builds: 'configuration/zero-config-builds.md'
- Internal proxy: 'configuration/internalproxy.md'
- Dynamic Volto Addons Configuration: 'configuration/volto-config-js.md'
- Backend configuration: 'configuration/backend.md'
- Richeditor settings: 'configuration/richeditor-settings.md'
- Multilingual: 'configuration/multilingual.md'
- Working copy: 'configuration/workingcopy.md'
- Environment variables: 'configuration/environmentvariables.md'
- API expanders: 'configuration/expanders.md'
- Theming & Semantic UI:
- About Semantic UI: 'theming/about-semantic.md'
- Semantic UI Theming: 'theming/semanticui-theming.md'
- Theming Engine: 'theming/theming-engine.md'
- Theming strategy: 'theming/theming-strategy.md'
- Custom styling: 'theming/custom-styling.md'
- Use another theming engine: 'theming/using-third-party-themes.md'
- Development recipes:
- Creating a project: 'recipes/creating-project.md'
- Folder structure: 'recipes/folder-structure.md'
- Customizing components: 'recipes/customizing-components.md'
- Customizing views: 'recipes/customizing-views.md'
- Creating new views: 'recipes/creating-views.md'
- Internationalization: 'recipes/i18n.md'
- Express middleware: 'recipes/express.md'
- Lazy loading and code splitting: 'recipes/lazyload.md'
- Overriding i18n messages: 'recipes/overridei18n.md'
- App component insertion point: 'recipes/appextras.md'
- Context navigation component: 'recipes/contextnavigation.md'
- Pluggables: 'recipes/pluggables.md'
- Forms and widgets: 'recipes/widget.md'
- Blocks:
- Introduction: 'blocks/introduction.md'
- Anatomy: 'blocks/anatomy.md'
- Settings: 'blocks/settings.md'
- Edit components: 'blocks/editcomponent.md'
- Extensions: 'blocks/extensions.md'
- SSR: 'blocks/ssr.md'
- Addons:
- Introduction: 'addons/index.md'
- Internationalization: 'addons/i18n.md'
- Best practices: 'addons/best-practices.md'
- Backend integration: 'backend/index.md'
- Deploying:
- Simple deployment: 'deploying/simple.md'
- Using PM2: 'deploying/pm2.md'
- Seamless mode: 'deploying/seamless-mode.md'
- Using apache: 'deploying/apache.md'
- Using sentry: 'deploying/sentry.md'
- Performance improvements: 'deploying/performance.md'
- Upgrade Guide: 'upgrade-guide/index.md'
- Developer Guidelines:
- Design principles: 'developer-guidelines/design-principles.md'
- Style Guide: 'developer-guidelines/style-guide.md'
- Language features: 'developer-guidelines/language-features.md'
- Linting: 'developer-guidelines/linting.md'
- React: 'developer-guidelines/react.md'
- Redux: 'developer-guidelines/redux.md'
- Routing: 'developer-guidelines/routing.md'
- Testing: 'developer-guidelines/testing.md'
- Acceptance tests: 'developer-guidelines/acceptance-tests.md'
- Accessibility: 'developer-guidelines/accessibility-guidelines.md'
- Contributing:
- Guidelines: 'contributing/guidelines.md'

markdown_extensions:
- admonition
Expand Down
17 changes: 7 additions & 10 deletions docs/source/configuration/backend.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,20 @@ html_meta:
# Backend configuration

## plone.volto
<<<<<<< HEAD
In order to fully support all Volto features, the Plone backend content API needs to be prepared for Volto. The add'on `plone.volto` does all the heavy lifting for you and is ready to use in your own projects. We used it in our Getting Started section.

In order to fully support all Volto features, the Plone backend, needs to be prepared for
Volto. This involves configuration, add-ons installation and some patches to the core.
The add'on `plone.volto` does all the heavy lifting for you and it's ready to use
in your own projects. We used it in our Getting Started section.

However, this package is oppinionated and might not fit your needs, so if you want to
use your own integration package instead, just take a look at the features it provides,
This package is slightly opinionated but provides the correct default settings for when
you want to start with Volto. If you have advanced needs or want to move the setting to
your own integration package instead, just take a look at the features it provides,
copy the ones you need for your project and create your own integration package.

https://github.com/plone/plone.volto

!!! tip
From Volto 5.1 and above, Volto features an internal proxy to your API server. So
you don't have to deal with CORS. It's enabled by default, pointing to the server
specified in the `devProxyToApiPath` Volto settings (http://localhost:8080/Plone).
See [here](../configuration/internalproxy.md) for more details.
you don't have to deal with CORS issues. It's enabled by default, pointing to the server specified in the `devProxyToApiPath` Volto settings
(http://localhost:8080/Plone). See [here](../configuration/internalproxy.md) for more information.

## Install a Plone backend locally without Docker

Expand Down
Loading

0 comments on commit 9f397bf

Please sign in to comment.