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 c95c40c + facd3c9 commit 65d929a
Show file tree
Hide file tree
Showing 77 changed files with 2,591 additions and 421 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 @@ -16,9 +16,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 @@ -36,6 +77,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
Loading

0 comments on commit 65d929a

Please sign in to comment.