Skip to content

Commit

Permalink
Merge branch 'main' into fix-field-sidebar-stealing-focus
Browse files Browse the repository at this point in the history
  • Loading branch information
dobri1408 authored May 8, 2024
2 parents 4518dd9 + 9e4f05f commit 7d26627
Show file tree
Hide file tree
Showing 72 changed files with 692 additions and 4,425 deletions.
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -398,3 +398,7 @@ start-test-acceptance-server-detached: ## Start Test Acceptance Server Main Fixt
.PHONY: stop-test-acceptance-server-detached
stop-test-acceptance-server-detached: ## Stop Test Acceptance Server Main Fixture (docker container) in a detached (daemon) mode
docker kill plone-client-acceptance-server

# include local overrides if present
-include Makefile.local
-include ../../../Makefile.local
2 changes: 1 addition & 1 deletion api/buildout.cfg
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[buildout]
index = https://pypi.org/simple/
extends =
http://dist.plone.org/release/6.0.10.1/versions.cfg
http://dist.plone.org/release/6.0.11/versions.cfg
version-constraints.cfg
versions.cfg
parts = instance plonesite site-packages test robot-server
Expand Down
48 changes: 27 additions & 21 deletions apps/plone/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -249,30 +249,34 @@
"@loadable/babel-plugin": "5.13.2",
"@loadable/webpack-plugin": "5.15.2",
"@plone/scripts": "workspace:*",
"@plone/types": "workspace:*",
"@plone/types": "1.0.0-alpha.11",
"@plone/volto-coresandbox": "workspace:*",
"@sinonjs/fake-timers": "^6.0.1",
"@storybook/addon-actions": "^6.5.15",
"@storybook/addon-controls": "6.5.15",
"@storybook/addon-docs": "^6.5.15",
"@storybook/addon-essentials": "^6.5.15",
"@storybook/addon-links": "^6.5.15",
"@storybook/addon-actions": "^8.0.4",
"@storybook/addon-controls": "^8.0.4",
"@storybook/addon-docs": "^8.0.4",
"@storybook/addon-essentials": "^8.0.4",
"@storybook/addon-links": "^8.0.4",
"@storybook/addon-webpack5-compiler-babel": "^3.0.3",
"@storybook/builder-webpack5": "^6.5.15",
"@storybook/manager-webpack5": "^6.5.15",
"@storybook/react": "^6.5.15",
"@storybook/react": "^8.0.4",
"@storybook/react-webpack5": "^8.0.4",
"@storybook/theming": "^8.0.4",
"@testing-library/cypress": "10.0.1",
"@testing-library/jest-dom": "6.4.2",
"@testing-library/react": "14.2.0",
"@testing-library/react-hooks": "8.0.1",
"@types/jest": "^29.5.8",
"@types/loadable__component": "^5.13.9",
"@types/lodash": "^4.14.201",
"@types/react": "^18",
"@types/react-dom": "^18",
"@types/react-router-dom": "^5.3.3",
"@types/react-test-renderer": "18.0.7",
"@types/uuid": "^9.0.2",
"@typescript-eslint/eslint-plugin": "7.1.1",
"@typescript-eslint/parser": "7.1.1",
"@typescript-eslint/eslint-plugin": "^7.7.0",
"@typescript-eslint/parser": "^7.7.0",
"autoprefixer": "10.4.8",
"axe-core": "4.4.2",
"babel-loader": "9.1.0",
Expand All @@ -288,16 +292,17 @@
"cypress-axe": "1.5.0",
"cypress-file-upload": "5.0.8",
"deep-freeze": "0.0.1",
"eslint": "8.49.0",
"eslint-config-prettier": "9.1.0",
"eslint-config-react-app": "7.0.1",
"eslint-import-resolver-alias": "1.1.2",
"eslint-import-resolver-babel-plugin-root-import": "1.1.1",
"eslint-plugin-import": "2.29.1",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-config-react-app": "^7.0.1",
"eslint-import-resolver-alias": "^1.1.2",
"eslint-import-resolver-babel-plugin-root-import": "^1.1.1",
"eslint-import-resolver-typescript": "^3.6.1",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jsx-a11y": "^6.7.1",
"eslint-plugin-prettier": "5.1.3",
"eslint-plugin-react": "7.33.2",
"eslint-plugin-react-hooks": "4.6.0",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-react": "^7.34.1",
"eslint-plugin-react-hooks": "^4.6.0",
"full-icu": "1.4.0",
"glob": "7.1.6",
"html-webpack-plugin": "5.5.0",
Expand Down Expand Up @@ -331,8 +336,9 @@
"release-it": "^17.1.1",
"semver": "^7.5.4",
"start-server-and-test": "1.14.0",
"storybook": "^8.0.4",
"style-loader": "3.3.1",
"stylelint": "16.2.1",
"stylelint": "^16.3.1",
"stylelint-config-idiomatic-order": "10.0.0",
"stylelint-prettier": "5.0.0",
"svg-loader": "0.0.2",
Expand All @@ -342,10 +348,10 @@
"ts-jest": "^26.4.2",
"ts-loader": "9.4.4",
"tsconfig": "*",
"typescript": "5.2.2",
"typescript": "^5.4.2",
"use-trace-update": "1.3.2",
"wait-on": "6.0.0",
"webpack": "5.76.1",
"webpack": "5.90.1",
"webpack-bundle-analyzer": "4.10.1",
"webpack-dev-server": "4.11.1",
"webpack-node-externals": "3.0.0",
Expand Down
2 changes: 1 addition & 1 deletion apps/plone/src/addons/volto-volto-project/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"eslint-config-react-app": "7.0.1",
"eslint-plugin-flowtype": "8.0.3",
"eslint-plugin-import": "2.28.1",
"eslint-plugin-jsx-a11y": "6.7.1",
"eslint-plugin-jsx-a11y": "^6.7.1",
"eslint-plugin-prettier": "5.0.0",
"eslint-plugin-react": "7.33.2",
"eslint-plugin-react-hooks": "4.6.0",
Expand Down
25 changes: 25 additions & 0 deletions docs/source/release-notes/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,31 @@ myst:

<!-- towncrier release notes start -->

## 18.0.0-alpha.30 (2024-05-02)

### Bugfix

- Fix image disappears after pressing the Enter key on title field in image content-type. @iFlameing [#5973](https://github.com/plone/volto/issues/5973)
- Defines the last 4 parameters of the `asyncConnect` function with optional. @wesleybl [#5985](https://github.com/plone/volto/issues/5985)
- Fix server side sidebar rendering @sneridagh [#5993](https://github.com/plone/volto/issues/5993)

### Internal

- Update to use Plone 6.0.11 @sneridagh [#5989](https://github.com/plone/volto/issues/5989)
- Flexibilize the pins for all ESlint deps, in Volto and generators @sneridagh [#5991](https://github.com/plone/volto/issues/5991)
- Cleaned up useless injectIntl in DefaultView @pnicolli [#5994](https://github.com/plone/volto/issues/5994)

## 18.0.0-alpha.29 (2024-04-26)

### Feature

- Add Vite (client only, no SSR) build. Update Next.js 14.2.2 and Remix to 2.8.0 @sneridagh [#5970](https://github.com/plone/volto/issues/5970)

### Bugfix

- Add possibility to pass down `locale`, `messages` and `defaultLocale` properties inside the `customStore` object to `IntlProvider`. With this change we can control react-intl language provider from inside storybook and switch for example from english to german with storybook args. [#5976](https://github.com/plone/volto/issues/5976)
- Fix no router link in logo @sneridagh [#5981](https://github.com/plone/volto/issues/5981)

## 18.0.0-alpha.28 (2024-04-23)

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

<!-- towncrier release notes start -->

## 9.0.0-alpha.15 (2024-05-02)

### Internal

- Flexibilize the pins for all ESlint deps, in Volto and generators @sneridagh [#5991](https://github.com/plone/volto/issues/5991)

## 9.0.0-alpha.14 (2024-03-24)

### Internal
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
],
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn",
"react/react-in-jsx-scope": "off"
"react/react-in-jsx-scope": "off",
"jsx-a11y/label-has-associated-control": "off"
},
"globals": {
"root": true,
Expand Down
16 changes: 8 additions & 8 deletions packages/generator-volto/generators/addon/templates/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@
"devDependencies": {
"@plone/scripts": "^3.5.0",
"@babel/eslint-parser": "7.23.10",
"eslint": "8.57.0",
"eslint-config-prettier": "9.1.0",
"eslint-config-react-app": "7.0.1",
"eslint-plugin-flowtype": "8.0.3",
"eslint-plugin-import": "2.29.1",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-config-react-app": "^7.0.1",
"eslint-plugin-flowtype": "^8.0.3",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jsx-a11y": "^6.7.1",
"eslint-plugin-prettier": "5.1.3",
"eslint-plugin-react": "7.33.2",
"eslint-plugin-react-hooks": "4.6.0",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-react": "^7.33.2",
"eslint-plugin-react-hooks": "^4.6.0",
"postcss-less": "6.0.0",
"postcss-scss": "4.0.9",
"prettier": "3.2.5",
Expand Down
1 change: 1 addition & 0 deletions packages/generator-volto/news/5785.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Disable `jsx-a11y/label-has-associated-control` so that we can use `eslint-plugin-jsx-a11y` version 6.8.0 if it's pulled by other dependencies. @ichim-david
2 changes: 1 addition & 1 deletion packages/generator-volto/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
}
],
"license": "MIT",
"version": "9.0.0-alpha.14",
"version": "9.0.0-alpha.15",
"repository": {
"type": "git",
"url": "git+https://github.com/plone/generator-volto.git"
Expand Down
3 changes: 3 additions & 0 deletions packages/registry/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ module.exports = {
'plugin:import/recommended',
'plugin:import/typescript',
],
rules: {
'@typescript-eslint/no-explicit-any': 0,
},
},

// Node
Expand Down
1 change: 1 addition & 0 deletions packages/registry/news/6002.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix type for component registry components @sneridagh
2 changes: 1 addition & 1 deletion packages/registry/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export type ConfigData = {
};

type GetComponentResult = {
component: React.ComponentType;
component: React.ComponentType<any>;
};

export type ConfigType = InstanceType<typeof Config>;
Expand Down
10 changes: 10 additions & 0 deletions packages/types/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,16 @@

<!-- towncrier release notes start -->

## 1.0.0-alpha.11 (2024-04-26)

### Bugfix

- Better BlocksData definitions @sneridagh [#5979](https://github.com/plone/volto/issues/5979)

### Internal

- Saner defaults for building deps, switch default to cached, add `build:force` command @sneridagh [#5980](https://github.com/plone/volto/issues/5980)

## 1.0.0-alpha.10 (2024-04-05)

### Bugfix
Expand Down
1 change: 0 additions & 1 deletion packages/types/news/5979.bugfix

This file was deleted.

1 change: 0 additions & 1 deletion packages/types/news/5980.internal

This file was deleted.

2 changes: 1 addition & 1 deletion packages/types/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.0.0-alpha.10",
"version": "1.0.0-alpha.11",
"repository": {
"type": "git",
"url": "https://github.com/plone/volto.git"
Expand Down
3 changes: 2 additions & 1 deletion packages/volto/.eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
],
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn",
"react/react-in-jsx-scope": "off"
"react/react-in-jsx-scope": "off",
"jsx-a11y/label-has-associated-control": "off"
},
"settings": {
"import/resolver": {
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"],
"before:bump": ["pnpm i18n", "pnpm build:types", "git add types"],
"after:bump": [
"pipx run towncrier build --draft --yes --version ${version} > .changelog.draft && pipx run towncrier build --yes --version ${version}",
"make copyreleasenotestodocs"
Expand Down
25 changes: 25 additions & 0 deletions packages/volto/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,31 @@ myst:

<!-- towncrier release notes start -->

## 18.0.0-alpha.30 (2024-05-02)

### Bugfix

- Fix image disappears after pressing the Enter key on title field in image content-type. @iFlameing [#5973](https://github.com/plone/volto/issues/5973)
- Defines the last 4 parameters of the `asyncConnect` function with optional. @wesleybl [#5985](https://github.com/plone/volto/issues/5985)
- Fix server side sidebar rendering @sneridagh [#5993](https://github.com/plone/volto/issues/5993)

### Internal

- Update to use Plone 6.0.11 @sneridagh [#5989](https://github.com/plone/volto/issues/5989)
- Flexibilize the pins for all ESlint deps, in Volto and generators @sneridagh [#5991](https://github.com/plone/volto/issues/5991)
- Cleaned up useless injectIntl in DefaultView @pnicolli [#5994](https://github.com/plone/volto/issues/5994)

## 18.0.0-alpha.29 (2024-04-26)

### Feature

- Add Vite (client only, no SSR) build. Update Next.js 14.2.2 and Remix to 2.8.0 @sneridagh [#5970](https://github.com/plone/volto/issues/5970)

### Bugfix

- Add possibility to pass down `locale`, `messages` and `defaultLocale` properties inside the `customStore` object to `IntlProvider`. With this change we can control react-intl language provider from inside storybook and switch for example from english to german with storybook args. [#5976](https://github.com/plone/volto/issues/5976)
- Fix no router link in logo @sneridagh [#5981](https://github.com/plone/volto/issues/5981)

## 18.0.0-alpha.28 (2024-04-23)

### Bugfix
Expand Down
22 changes: 16 additions & 6 deletions packages/volto/cypress/support/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -716,11 +716,10 @@ Cypress.Commands.add('clearSlate', (selector) => {
return cy
.get(selector)
.focus()
.click({ force: true }) // fix sporadic failure this element is currently animating
.wait(1000)
.type('{selectAll}')
.wait(1000)
.type('{backspace}');
.click({ force: true })
.type('{selectAll}', { delay: 20 })
.type('{backspace}', { delay: 20 })
.wait(200);
});

Cypress.Commands.add('getSlate', (createNewSlate = false) => {
Expand Down Expand Up @@ -784,6 +783,15 @@ Cypress.Commands.add('typeInSlate', { prevSubject: true }, (subject, text) => {
);
});

Cypress.Commands.add(
'typeWithDelay',
{ prevSubject: 'element' },
(subject, text, options) => {
const delay = options && options.delay ? options.delay : 20;
cy.wrap(subject).type(text, { delay });
},
);

Cypress.Commands.add('lineBreakInSlate', { prevSubject: true }, (subject) => {
return (
cy
Expand Down Expand Up @@ -873,7 +881,9 @@ Cypress.Commands.add('addNewBlock', (blockName, createNewSlate = false) => {
});

Cypress.Commands.add('navigate', (route = '') => {
return cy.window().its('appHistory').invoke('push', route);
cy.intercept('GET', '**/*').as('navGetCall');
cy.window().its('appHistory').invoke('push', route);
cy.wait('@navGetCall');
});

Cypress.Commands.add('store', () => {
Expand Down
14 changes: 6 additions & 8 deletions packages/volto/cypress/tests/core/basic/locking.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,15 +96,16 @@ describe('Document locking', () => {

cy.visit('/logout');
cy.wait('@logout');
cy.findByRole('alert')
.get('.toast-inner-content')
.should('contain', 'You have been logged out');
cy.get('.toast-dismiss-action').click();

// As another editor I can see the locked document
cy.autologin('editor2', 'password');
cy.visit('/document');
cy.wait('@content');

cy.findByRole('alert')
.get('.toast-inner-content')
.contains('This item was locked by Editor 1 on');
cy.get('.toolbar-body').should('be.visible');

// As another editor I can unlock the document
cy.findByLabelText('Unlock').click();
Expand All @@ -114,14 +115,11 @@ describe('Document locking', () => {
cy.findByLabelText('Edit').click();

// As another editor I can edit the document
cy.clearSlateTitle().type('New title by Editor 2');
cy.clearSlateTitle().typeWithDelay('New title by Editor 2');
cy.get('#toolbar-save').click();
// cy.waitForResourceToLoad('document');
cy.wait('@saveDoc');
cy.wait('@getDoc');

// cy.pause();

cy.url().should('eq', Cypress.config().baseUrl + '/document');
cy.contains('New title by Editor 2');
cy.get('h1.documentFirstHeading').should('not.be.empty');
Expand Down
Loading

0 comments on commit 7d26627

Please sign in to comment.