Skip to content

Commit

Permalink
Merge branch 'master' into search_depth
Browse files Browse the repository at this point in the history
* master:
  feat(restapi): add emailSend action (#2042)
  Lazy load react-dropzone (#2044)
  Python3.9 compatibility (#2045)
  Multi-selected copy/paste blocks (#1951)
  Back to development
  Release 10.2.0
  Prepare for release
  Fix regression in the `getContent` action with the expandable missing (#2046)
  Generate language file of added missing German translations (#2036)
  Gh actions i18n (#2038)
  Back to development
  Release 10.1.0
  Prepare for release
  Update translations de (#2034)
  Update translations (#2033)
  • Loading branch information
sneridagh committed Dec 4, 2020
2 parents 467384e + 4985607 commit 1a5e0ac
Show file tree
Hide file tree
Showing 58 changed files with 1,103 additions and 93 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ jobs:
# node install
- run: yarn install --frozen-lockfile

# node code analysis
- run: yarn run prettier
- run: yarn run lint
- run: yarn run i18n:ci

# node test
- run: yarn test:ci

Expand Down
28 changes: 27 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Change Log

## 10.0.1 (unreleased)
## 10.2.1 (unreleased)

### Breaking

Expand All @@ -12,8 +12,34 @@

### Internal

## 10.2.0 (2020-12-04)

### Feature

- Generate language file of added missing German translations by @tisto. @ksuess
- Add emailSend action @nzambello

### Bugfix

- Fix regression in the `getContent` action with the expandable missing @sneridagh

- For python3.9 compatibility, install wheel package in build-backend targets @tiberiuichim

- lazy load react-dropzone @nileshgulia1

## 10.1.0 (2020-11-30)

### Feature

- Add missing German translations @tisto

## 10.0.0 (2020-11-30)

### Feature

- Provide operations on multiple-selected blocks: delete, cut/copy and paste. You can trigger the "multiselected blocks" by holding the shift key and clicking on another block. You can add/remove blocks to the selection with the Control key. Holding Control when you click on the Paste button doesn't clear the clipboard, so you can paste multiple times. The blocks clipboard uses the browser's local storage to synchronize between tabs. @tiberiuichim
- Allow reducers to be persisted using localstorage @tiberiuichim

### Breaking

- Removal of the Razzle patch that was introduced in 9.0.0 @sneridagh
Expand Down
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,15 @@ build-frontend:
build-backend: ## Build Plone 5.2
(cd api && python3 -m venv .)
(cd api && bin/pip install --upgrade pip)
(cd api && bin/pip install --upgrade wheel)
(cd api && bin/pip install -r requirements.txt)
(cd api && bin/buildout)

.PHONY: Build Plone 5.2 in specific port
build-backend-withport: ## Build Plone 5.2 with port
(cd api && python3 -m venv .)
(cd api && bin/pip install --upgrade pip)
(cd api && bin/pip install --upgrade wheel)
(cd api && bin/pip install -r requirements.txt)
(cd api && bin/buildout instance:http-address=$(INSTANCE_PORT))

Expand Down
1 change: 1 addition & 0 deletions api/buildout.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,4 @@ robotframework-selenium2library =
robotframework-seleniumlibrary =
robotframework-webpack=
selenium =
feedparser =
152 changes: 152 additions & 0 deletions cypress/integration/blocks-copypaste.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
if (Cypress.env('API') !== 'guillotina') {
describe('Blocks copy/paste', () => {
beforeEach(() => {
cy.autologin();
cy.createContent({
contentType: 'Document',
contentId: 'my-page',
contentTitle: 'My Page',
});
cy.visit('/my-page');
cy.waitForResourceToLoad('@navigation');
cy.waitForResourceToLoad('@breadcrumbs');
cy.waitForResourceToLoad('@actions');
cy.waitForResourceToLoad('@types');
cy.waitForResourceToLoad('my-page');
cy.navigate('/my-page/edit');
});

it('Copy/paste multiple blocks', () => {
// GIVEN: A page with multiple blocks
cy.get('.block.inner.text .public-DraftEditor-content').click();
cy.get('button.block-add-button').click();
cy.get('.blocks-chooser .title').contains('Common').click();
cy.get('.blocks-chooser .common').contains('Maps').click();
cy.get(`.block.maps .toolbar-inner .ui.input input`)
.type(
'<iframe src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d2525.497070288158!2d7.103133415464086!3d50.72926897951482!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x47bee17434076fc7%3A0x2e99668f581378c8!2sRiesstra%C3%9Fe+21%2C+53113+Bonn!5e0!3m2!1sde!2sde!4v1561386702097!5m2!1sde!2sde" width="600" height="450" frameborder="0" style="border:0" allowfullscreen></iframe>',
)
.type('{enter}');

cy.get('.block.inner.text .public-DraftEditor-content')
.click()
.type('Noam Avram Chomsky')
.get('span[data-text]')
.contains('Noam Avram Chomsky');

cy.get('.block.text [contenteditable]').click();

cy.get('#toolbar-save').click();

cy.get('a[aria-label="Edit"]').click();

// WHEN: I copy paste them
cy.get('.documentFirstHeading > .public-DraftStyleDefault-block')
.click()
.type('{shift}', { release: false });
cy.get('.block-editor-maps').click();
cy.get('#toolbar-copy-blocks').click();

cy.get('.block.inner.text .public-DraftEditor-content')
.type('{shift}')
.click();
cy.get('#toolbar-paste-blocks').click();

// THEN: the page will contain duplicated blocks
cy.get('.documentFirstHeading').should(($blocks) => {
expect($blocks).to.have.length(2);
});

cy.get('.block-editor-maps').should(($blocks) => {
expect($blocks).to.have.length(2);
});
});

it('Cut/paste multiple blocks', () => {
// GIVEN: A page with multiple blocks
cy.get('.block.inner.text .public-DraftEditor-content').click();
cy.get('button.block-add-button').click();
cy.get('.blocks-chooser .title').contains('Common').click();
cy.get('.blocks-chooser .common').contains('Maps').click();
cy.get(`.block.maps .toolbar-inner .ui.input input`)
.type(
'<iframe src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d2525.497070288158!2d7.103133415464086!3d50.72926897951482!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x47bee17434076fc7%3A0x2e99668f581378c8!2sRiesstra%C3%9Fe+21%2C+53113+Bonn!5e0!3m2!1sde!2sde!4v1561386702097!5m2!1sde!2sde" width="600" height="450" frameborder="0" style="border:0" allowfullscreen></iframe>',
)
.type('{enter}');

cy.get('.block.inner.text .public-DraftEditor-content')
.click()
.type('Noam Avram Chomsky')
.get('span[data-text]')
.contains('Noam Avram Chomsky');

cy.get('.block.text [contenteditable]').click();

cy.get('#toolbar-save').click();

cy.get('a[aria-label="Edit"]').click();

// WHEN: I cut paste them
cy.get('.documentFirstHeading > .public-DraftStyleDefault-block')
.click()
.type('{shift}', { release: false });
cy.get('.block-editor-maps').click();
cy.get('#toolbar-cut-blocks').click();

cy.get('.block.inner.text .public-DraftEditor-content')
.type('{shift}')
.click();
cy.get('#toolbar-paste-blocks').click();

// THEN: the page will contain only one of each blocks
cy.get('.documentFirstHeading').should(($blocks) => {
expect($blocks).to.have.length(1);
});

cy.get('.block-editor-maps').should(($blocks) => {
expect($blocks).to.have.length(1);
});
});

it('Delete multiple blocks', () => {
// GIVEN: A page with multiple blocks
cy.get('.block.inner.text .public-DraftEditor-content').click();
cy.get('button.block-add-button').click();
cy.get('.blocks-chooser .title').contains('Common').click();
cy.get('.blocks-chooser .common').contains('Maps').click();
cy.get(`.block.maps .toolbar-inner .ui.input input`)
.type(
'<iframe src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d2525.497070288158!2d7.103133415464086!3d50.72926897951482!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x47bee17434076fc7%3A0x2e99668f581378c8!2sRiesstra%C3%9Fe+21%2C+53113+Bonn!5e0!3m2!1sde!2sde!4v1561386702097!5m2!1sde!2sde" width="600" height="450" frameborder="0" style="border:0" allowfullscreen></iframe>',
)
.type('{enter}');

cy.get('.block.inner.text .public-DraftEditor-content')
.click()
.type('Noam Avram Chomsky')
.get('span[data-text]')
.contains('Noam Avram Chomsky');

cy.get('.block.text [contenteditable]').click();

cy.get('#toolbar-save').click();

cy.get('a[aria-label="Edit"]').click();

// WHEN: I delete them
cy.get('.documentFirstHeading > .public-DraftStyleDefault-block')
.click()
.type('{shift}', { release: false });
cy.get('.block-editor-maps').click();
cy.get('#toolbar-delete-blocks').click();

// THEN: the page will contain none of the blocks
cy.get('.documentFirstHeading').should(($blocks) => {
expect($blocks).to.have.length(0);
});

cy.get('.block-editor-maps').should(($blocks) => {
expect($blocks).to.have.length(0);
});
});
});
}
7 changes: 7 additions & 0 deletions docs/source/configuration/settings-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,3 +91,10 @@ This list is still incomplete, contributions are welcomed!
(for example content with lots of text) and you need to batch requests
anyway, if you want to be sure to display all the children.


## persistentReducers

!!! block ""

A list of reducer names that should use the browser's localstorage to
persist their data.
2 changes: 1 addition & 1 deletion locales/de.json

Large diffs are not rendered by default.

Loading

0 comments on commit 1a5e0ac

Please sign in to comment.