From 61fbe82b2fcf1fa51ef4636ae4b42b208340fcdd Mon Sep 17 00:00:00 2001
From: Wagner Trezub <60133113+Wagner3UB@users.noreply.github.com>
Date: Mon, 2 Oct 2023 21:42:08 +0200
Subject: [PATCH 01/11] a11y for checkboxes on the sharing page issue #5126
(#5201)
---
locales/ca/LC_MESSAGES/volto.po | 5 +++++
locales/de/LC_MESSAGES/volto.po | 5 +++++
locales/en/LC_MESSAGES/volto.po | 5 +++++
locales/es/LC_MESSAGES/volto.po | 5 +++++
locales/eu/LC_MESSAGES/volto.po | 5 +++++
locales/fi/LC_MESSAGES/volto.po | 5 +++++
locales/fr/LC_MESSAGES/volto.po | 5 +++++
locales/it/LC_MESSAGES/volto.po | 5 +++++
locales/ja/LC_MESSAGES/volto.po | 5 +++++
locales/nl/LC_MESSAGES/volto.po | 5 +++++
locales/pt/LC_MESSAGES/volto.po | 5 +++++
locales/pt_BR/LC_MESSAGES/volto.po | 5 +++++
locales/ro/LC_MESSAGES/volto.po | 5 +++++
locales/volto.pot | 7 ++++++-
locales/zh_CN/LC_MESSAGES/volto.po | 5 +++++
news/5201.bugfix | 1 +
src/components/manage/Sharing/Sharing.jsx | 18 ++++++++++++++++++
17 files changed, 95 insertions(+), 1 deletion(-)
create mode 100644 news/5201.bugfix
diff --git a/locales/ca/LC_MESSAGES/volto.po b/locales/ca/LC_MESSAGES/volto.po
index ad8b437acf..7e3dcf33e0 100644
--- a/locales/ca/LC_MESSAGES/volto.po
+++ b/locales/ca/LC_MESSAGES/volto.po
@@ -411,6 +411,11 @@ msgstr "Esteu segurs que voleu eliminar aquest grup de camps i tots els camps qu
msgid "Ascending"
msgstr "Ascendent"
+#: components/manage/Sharing/Sharing
+# defaultMessage: Assign the {role} role to {entry}
+msgid "Assign the {role} role to {entry}"
+msgstr ""
+
#: components/manage/Controlpanels/Rules/ConfigureRule
# defaultMessage: Assignments
msgid "Assignments"
diff --git a/locales/de/LC_MESSAGES/volto.po b/locales/de/LC_MESSAGES/volto.po
index 09772cb6d5..501400c73c 100644
--- a/locales/de/LC_MESSAGES/volto.po
+++ b/locales/de/LC_MESSAGES/volto.po
@@ -408,6 +408,11 @@ msgstr "Sind Sie sicher, dass Sie dieses Fieldset löschen möchten?"
msgid "Ascending"
msgstr "Aufsteigend"
+#: components/manage/Sharing/Sharing
+# defaultMessage: Assign the {role} role to {entry}
+msgid "Assign the {role} role to {entry}"
+msgstr ""
+
#: components/manage/Controlpanels/Rules/ConfigureRule
# defaultMessage: Assignments
msgid "Assignments"
diff --git a/locales/en/LC_MESSAGES/volto.po b/locales/en/LC_MESSAGES/volto.po
index 98e85b140d..50dce32990 100644
--- a/locales/en/LC_MESSAGES/volto.po
+++ b/locales/en/LC_MESSAGES/volto.po
@@ -402,6 +402,11 @@ msgstr ""
msgid "Ascending"
msgstr ""
+#: components/manage/Sharing/Sharing
+# defaultMessage: Assign the {role} role to {entry}
+msgid "Assign the {role} role to {entry}"
+msgstr ""
+
#: components/manage/Controlpanels/Rules/ConfigureRule
# defaultMessage: Assignments
msgid "Assignments"
diff --git a/locales/es/LC_MESSAGES/volto.po b/locales/es/LC_MESSAGES/volto.po
index aecc914419..595636eec5 100644
--- a/locales/es/LC_MESSAGES/volto.po
+++ b/locales/es/LC_MESSAGES/volto.po
@@ -413,6 +413,11 @@ msgstr "¿Esta seguro de querer eliminar este conjunto de campo incluyendo todos
msgid "Ascending"
msgstr "Ascendente"
+#: components/manage/Sharing/Sharing
+# defaultMessage: Assign the {role} role to {entry}
+msgid "Assign the {role} role to {entry}"
+msgstr ""
+
#: components/manage/Controlpanels/Rules/ConfigureRule
# defaultMessage: Assignments
msgid "Assignments"
diff --git a/locales/eu/LC_MESSAGES/volto.po b/locales/eu/LC_MESSAGES/volto.po
index 6f58787dde..f7e40a10b4 100644
--- a/locales/eu/LC_MESSAGES/volto.po
+++ b/locales/eu/LC_MESSAGES/volto.po
@@ -409,6 +409,11 @@ msgstr "Eremu-multzo hau eta bere eremu guztiak ezabatu nahi dituzu?"
msgid "Ascending"
msgstr "Goraka"
+#: components/manage/Sharing/Sharing
+# defaultMessage: Assign the {role} role to {entry}
+msgid "Assign the {role} role to {entry}"
+msgstr ""
+
#: components/manage/Controlpanels/Rules/ConfigureRule
# defaultMessage: Assignments
msgid "Assignments"
diff --git a/locales/fi/LC_MESSAGES/volto.po b/locales/fi/LC_MESSAGES/volto.po
index 56c0d48680..71412b10c2 100644
--- a/locales/fi/LC_MESSAGES/volto.po
+++ b/locales/fi/LC_MESSAGES/volto.po
@@ -413,6 +413,11 @@ msgstr "Haluatko varmasti poistaa tämän kenttäryhmän ja kaikki sen kentät?"
msgid "Ascending"
msgstr "Nouseva"
+#: components/manage/Sharing/Sharing
+# defaultMessage: Assign the {role} role to {entry}
+msgid "Assign the {role} role to {entry}"
+msgstr ""
+
#: components/manage/Controlpanels/Rules/ConfigureRule
# defaultMessage: Assignments
msgid "Assignments"
diff --git a/locales/fr/LC_MESSAGES/volto.po b/locales/fr/LC_MESSAGES/volto.po
index 469d73757b..49959616bd 100644
--- a/locales/fr/LC_MESSAGES/volto.po
+++ b/locales/fr/LC_MESSAGES/volto.po
@@ -419,6 +419,11 @@ msgstr "Voulez-vous vraiment supprimer ce groupe de champs et tous les champs de
msgid "Ascending"
msgstr "Ascendant"
+#: components/manage/Sharing/Sharing
+# defaultMessage: Assign the {role} role to {entry}
+msgid "Assign the {role} role to {entry}"
+msgstr ""
+
#: components/manage/Controlpanels/Rules/ConfigureRule
# defaultMessage: Assignments
msgid "Assignments"
diff --git a/locales/it/LC_MESSAGES/volto.po b/locales/it/LC_MESSAGES/volto.po
index cab54e43d5..e62c2bad73 100644
--- a/locales/it/LC_MESSAGES/volto.po
+++ b/locales/it/LC_MESSAGES/volto.po
@@ -402,6 +402,11 @@ msgstr "Sicuro di voler eliminare questo insieme di campi compresi tutti i campi
msgid "Ascending"
msgstr "Crescente"
+#: components/manage/Sharing/Sharing
+# defaultMessage: Assign the {role} role to {entry}
+msgid "Assign the {role} role to {entry}"
+msgstr "Assegnare il ruolo di {role} a {entry}"
+
#: components/manage/Controlpanels/Rules/ConfigureRule
# defaultMessage: Assignments
msgid "Assignments"
diff --git a/locales/ja/LC_MESSAGES/volto.po b/locales/ja/LC_MESSAGES/volto.po
index 3c8b38259f..287a210940 100644
--- a/locales/ja/LC_MESSAGES/volto.po
+++ b/locales/ja/LC_MESSAGES/volto.po
@@ -410,6 +410,11 @@ msgstr "Are you sure you want to delete this fieldset including all fields? (未
msgid "Ascending"
msgstr "昇順"
+#: components/manage/Sharing/Sharing
+# defaultMessage: Assign the {role} role to {entry}
+msgid "Assign the {role} role to {entry}"
+msgstr ""
+
#: components/manage/Controlpanels/Rules/ConfigureRule
# defaultMessage: Assignments
msgid "Assignments"
diff --git a/locales/nl/LC_MESSAGES/volto.po b/locales/nl/LC_MESSAGES/volto.po
index 73aa04c97f..c35ced2486 100644
--- a/locales/nl/LC_MESSAGES/volto.po
+++ b/locales/nl/LC_MESSAGES/volto.po
@@ -421,6 +421,11 @@ msgstr ""
msgid "Ascending"
msgstr "Oplopend"
+#: components/manage/Sharing/Sharing
+# defaultMessage: Assign the {role} role to {entry}
+msgid "Assign the {role} role to {entry}"
+msgstr ""
+
#: components/manage/Controlpanels/Rules/ConfigureRule
# defaultMessage: Assignments
msgid "Assignments"
diff --git a/locales/pt/LC_MESSAGES/volto.po b/locales/pt/LC_MESSAGES/volto.po
index b9872b68c0..53828a292f 100644
--- a/locales/pt/LC_MESSAGES/volto.po
+++ b/locales/pt/LC_MESSAGES/volto.po
@@ -410,6 +410,11 @@ msgstr "Tem a certeza que quer eliminar este conjunto de campos incluindo todos
msgid "Ascending"
msgstr "Ascendente"
+#: components/manage/Sharing/Sharing
+# defaultMessage: Assign the {role} role to {entry}
+msgid "Assign the {role} role to {entry}"
+msgstr ""
+
#: components/manage/Controlpanels/Rules/ConfigureRule
# defaultMessage: Assignments
msgid "Assignments"
diff --git a/locales/pt_BR/LC_MESSAGES/volto.po b/locales/pt_BR/LC_MESSAGES/volto.po
index 166b399a37..375652d850 100644
--- a/locales/pt_BR/LC_MESSAGES/volto.po
+++ b/locales/pt_BR/LC_MESSAGES/volto.po
@@ -412,6 +412,11 @@ msgstr "Você realmente deseja deletar este fieldset com todos os campos?"
msgid "Ascending"
msgstr "Ascendente"
+#: components/manage/Sharing/Sharing
+# defaultMessage: Assign the {role} role to {entry}
+msgid "Assign the {role} role to {entry}"
+msgstr "Atribuir o papel de {role} à {entry}"
+
#: components/manage/Controlpanels/Rules/ConfigureRule
# defaultMessage: Assignments
msgid "Assignments"
diff --git a/locales/ro/LC_MESSAGES/volto.po b/locales/ro/LC_MESSAGES/volto.po
index 1c911e4bea..ae607d5d64 100644
--- a/locales/ro/LC_MESSAGES/volto.po
+++ b/locales/ro/LC_MESSAGES/volto.po
@@ -402,6 +402,11 @@ msgstr "Sunteți sigur că doriți să ștergeți acest set de câmpuri, inclusi
msgid "Ascending"
msgstr "Crescător"
+#: components/manage/Sharing/Sharing
+# defaultMessage: Assign the {role} role to {entry}
+msgid "Assign the {role} role to {entry}"
+msgstr ""
+
#: components/manage/Controlpanels/Rules/ConfigureRule
# defaultMessage: Assignments
msgid "Assignments"
diff --git a/locales/volto.pot b/locales/volto.pot
index d750bd3086..b243ad1a4c 100644
--- a/locales/volto.pot
+++ b/locales/volto.pot
@@ -1,7 +1,7 @@
msgid ""
msgstr ""
"Project-Id-Version: Plone\n"
-"POT-Creation-Date: 2023-09-26T10:20:03.552Z\n"
+"POT-Creation-Date: 2023-10-02T11:59:20.013Z\n"
"Last-Translator: Plone i18n \n"
"Language-Team: Plone i18n \n"
"MIME-Version: 1.0\n"
@@ -404,6 +404,11 @@ msgstr ""
msgid "Ascending"
msgstr ""
+#: components/manage/Sharing/Sharing
+# defaultMessage: Assign the {role} role to {entry}
+msgid "Assign the {role} role to {entry}"
+msgstr ""
+
#: components/manage/Controlpanels/Rules/ConfigureRule
# defaultMessage: Assignments
msgid "Assignments"
diff --git a/locales/zh_CN/LC_MESSAGES/volto.po b/locales/zh_CN/LC_MESSAGES/volto.po
index b7ec2bc33c..50a87152f1 100644
--- a/locales/zh_CN/LC_MESSAGES/volto.po
+++ b/locales/zh_CN/LC_MESSAGES/volto.po
@@ -408,6 +408,11 @@ msgstr "确定要删除此包括所有字段的字段集?"
msgid "Ascending"
msgstr "上升"
+#: components/manage/Sharing/Sharing
+# defaultMessage: Assign the {role} role to {entry}
+msgid "Assign the {role} role to {entry}"
+msgstr ""
+
#: components/manage/Controlpanels/Rules/ConfigureRule
# defaultMessage: Assignments
msgid "Assignments"
diff --git a/news/5201.bugfix b/news/5201.bugfix
new file mode 100644
index 0000000000..f1fe216449
--- /dev/null
+++ b/news/5201.bugfix
@@ -0,0 +1 @@
+issue #5126 a11y for checkboxes on the sharing page @Wagner3UB
\ No newline at end of file
diff --git a/src/components/manage/Sharing/Sharing.jsx b/src/components/manage/Sharing/Sharing.jsx
index 1731de9ede..31d715ad0a 100644
--- a/src/components/manage/Sharing/Sharing.jsx
+++ b/src/components/manage/Sharing/Sharing.jsx
@@ -87,6 +87,10 @@ const messages = defineMessages({
id: 'Permissions have been updated successfully',
defaultMessage: 'Permissions have been updated successfully',
},
+ assignNewRoles: {
+ id: 'Assign the {role} role to {entry}',
+ defaultMessage: 'Assign the {role} role to {entry}',
+ },
});
/**
@@ -419,6 +423,20 @@ class SharingComponent extends Component {
)}
{typeof entry.roles[role.id] === 'boolean' && (
Date: Mon, 2 Oct 2023 21:52:34 +0200
Subject: [PATCH 02/11] Bypass reviewdog and install Vale directly (#5256)
---
.github/workflows/docs.yml | 19 ++++++++-----------
docs/source/contributing/branch-policy.md | 5 +++++
news/5256.documentation | 1 +
3 files changed, 14 insertions(+), 11 deletions(-)
create mode 100644 news/5256.documentation
diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml
index 801409da97..08763d2f3a 100644
--- a/.github/workflows/docs.yml
+++ b/.github/workflows/docs.yml
@@ -31,7 +31,9 @@ jobs:
run: pip install virtualenv
- name: pip install requirements
- run: pip install -r requirements-docs.txt
+ run: |
+ pip install -r requirements-docs.txt
+ sudo snap install --edge vale
- name: Check for broken links
run: make docs-linkcheckbroken
@@ -39,13 +41,8 @@ jobs:
- name: Build HTML documentation
run: make docs-html
- # Disable GHA vale checking, it started to fail with a gazillion of
- # violations. We need to review it closely
- # - uses: errata-ai/vale-action@reviewdog
- # with:
- # # debug: true
- # files: all
- # env:
- # # Required, set by GitHub actions automatically:
- # # https://docs.github.com/en/actions/security-guides/automatic-token-authentication#about-the-github_token-secret
- # GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
+ - name: Run vale
+ run: |
+ git clone https://github.com/errata-ai/Microsoft.git
+ cp -r ./Microsoft/Microsoft ./styles
+ vale --no-exit ./docs
diff --git a/docs/source/contributing/branch-policy.md b/docs/source/contributing/branch-policy.md
index 843ee8ba0b..bda1a0cae9 100644
--- a/docs/source/contributing/branch-policy.md
+++ b/docs/source/contributing/branch-policy.md
@@ -42,6 +42,11 @@ legacy
: At the moment of this writing, `15.x.x` is the current stable branch in git.
Upon the final release of version 16.0.0, the `15.x.x` branch line will become legacy.
+```{todo}
+See https://github.com/plone/volto/issues/5255
+```
+
+
## Translation contributing policy
Due to the nature of `main` and `16.x.x` branches, some developments that may land in `main` may not be backported to `16.x.x`. This means that many translations that may come with those developments will be useless in the `16.x.x` branch and thus porting them to `16.x.x` makes no sense.
diff --git a/news/5256.documentation b/news/5256.documentation
new file mode 100644
index 0000000000..1b7cf33e5e
--- /dev/null
+++ b/news/5256.documentation
@@ -0,0 +1 @@
+Reenable GHA vale checking, but with configuration from `plone/documentation`. It now runs Vale, but with the flag `--no-exit` which means "Don't return a nonzero exit code on errors." It also eliminates reviewdog as the test runner. @stevepiercy
From cb6b11e17f65a35f87e8d85bb8043b9924a460e4 Mon Sep 17 00:00:00 2001
From: David Glick
Date: Tue, 3 Oct 2023 11:10:02 +0200
Subject: [PATCH 03/11] Prefer resolving DNS to ipv4 (#5261)
---
news/5261.bugfix | 1 +
src/start-server.js | 4 ++++
2 files changed, 5 insertions(+)
create mode 100644 news/5261.bugfix
diff --git a/news/5261.bugfix b/news/5261.bugfix
new file mode 100644
index 0000000000..3a07358c10
--- /dev/null
+++ b/news/5261.bugfix
@@ -0,0 +1 @@
+Adjust DNS resolution to prefer IPv4 addresses when both IPv4 and IPv6 are resolved. @davisagli
diff --git a/src/start-server.js b/src/start-server.js
index 5e8fcc1449..52bdd7c343 100644
--- a/src/start-server.js
+++ b/src/start-server.js
@@ -1,10 +1,14 @@
/* eslint no-console: 0 */
+import dns from 'dns';
import http from 'http';
import app from './server';
import debug from 'debug';
export default function server() {
+ // If DNS returns both ipv4 and ipv6 addresses, prefer ipv4
+ dns.setDefaultResultOrder('ipv4first');
+
const server = http.createServer(app);
// const host = process.env.HOST || 'localhost';
const port = process.env.PORT || 3000;
From a911a098c5fb592c526587660672c28a0494a408 Mon Sep 17 00:00:00 2001
From: Victor Fernandez de Alba
Date: Tue, 3 Oct 2023 11:20:45 +0200
Subject: [PATCH 04/11] Release 17.0.1
---
CHANGELOG.md | 14 ++++++++++++++
news/5201.bugfix | 1 -
news/5251.documentation | 1 -
news/5253.documentation | 1 -
news/5256.documentation | 1 -
news/5261.bugfix | 1 -
package.json | 2 +-
packages/volto-slate/package.json | 2 +-
8 files changed, 16 insertions(+), 7 deletions(-)
delete mode 100644 news/5201.bugfix
delete mode 100644 news/5251.documentation
delete mode 100644 news/5253.documentation
delete mode 100644 news/5256.documentation
delete mode 100644 news/5261.bugfix
diff --git a/CHANGELOG.md b/CHANGELOG.md
index dd557d5b04..4adba034f7 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -8,6 +8,20 @@
+## 17.0.1 (2023-10-03)
+
+### Bugfix
+
+- issue #5126 a11y for checkboxes on the sharing page @Wagner3UB [#5201](https://github.com/plone/volto/issues/5201)
+- Adjust DNS resolution to prefer IPv4 addresses when both IPv4 and IPv6 are resolved. @davisagli [#5261](https://github.com/plone/volto/issues/5261)
+
+### Documentation
+
+- Fix tests and documentation broken because the renaming master->main @sneridagh [#5251](https://github.com/plone/volto/issues/5251)
+- Disable GHA vale checking, it started to fail with a gazillion of violations. @sneridagh [#5253](https://github.com/plone/volto/issues/5253)
+- Reenable GHA vale checking, but with configuration from `plone/documentation`. It now runs Vale, but with the flag `--no-exit` which means "Don't return a nonzero exit code on errors." It also eliminates reviewdog as the test runner. @stevepiercy [#5256](https://github.com/plone/volto/issues/5256)
+
+
## 17.0.0 (2023-09-30)
### Breaking
diff --git a/news/5201.bugfix b/news/5201.bugfix
deleted file mode 100644
index f1fe216449..0000000000
--- a/news/5201.bugfix
+++ /dev/null
@@ -1 +0,0 @@
-issue #5126 a11y for checkboxes on the sharing page @Wagner3UB
\ No newline at end of file
diff --git a/news/5251.documentation b/news/5251.documentation
deleted file mode 100644
index 5035416412..0000000000
--- a/news/5251.documentation
+++ /dev/null
@@ -1 +0,0 @@
-Fix tests and documentation broken because the renaming master->main @sneridagh
diff --git a/news/5253.documentation b/news/5253.documentation
deleted file mode 100644
index 2f9e4d5017..0000000000
--- a/news/5253.documentation
+++ /dev/null
@@ -1 +0,0 @@
-Disable GHA vale checking, it started to fail with a gazillion of violations. @sneridagh
diff --git a/news/5256.documentation b/news/5256.documentation
deleted file mode 100644
index 1b7cf33e5e..0000000000
--- a/news/5256.documentation
+++ /dev/null
@@ -1 +0,0 @@
-Reenable GHA vale checking, but with configuration from `plone/documentation`. It now runs Vale, but with the flag `--no-exit` which means "Don't return a nonzero exit code on errors." It also eliminates reviewdog as the test runner. @stevepiercy
diff --git a/news/5261.bugfix b/news/5261.bugfix
deleted file mode 100644
index 3a07358c10..0000000000
--- a/news/5261.bugfix
+++ /dev/null
@@ -1 +0,0 @@
-Adjust DNS resolution to prefer IPv4 addresses when both IPv4 and IPv6 are resolved. @davisagli
diff --git a/package.json b/package.json
index 235b3be503..605fe0bf56 100644
--- a/package.json
+++ b/package.json
@@ -9,7 +9,7 @@
}
],
"license": "MIT",
- "version": "17.0.0",
+ "version": "17.0.1",
"repository": {
"type": "git",
"url": "git@github.com:plone/volto.git"
diff --git a/packages/volto-slate/package.json b/packages/volto-slate/package.json
index 3aebc05b35..b676440ede 100644
--- a/packages/volto-slate/package.json
+++ b/packages/volto-slate/package.json
@@ -1,6 +1,6 @@
{
"name": "@plone/volto-slate",
- "version": "17.0.0",
+ "version": "17.0.1",
"description": "Slate.js integration with Volto",
"main": "src/index.js",
"author": "European Environment Agency: IDM2 A-Team",
From 44560e30bf8c90a7d3075b78087509fda2e137b3 Mon Sep 17 00:00:00 2001
From: Tisha Soumya
Date: Tue, 3 Oct 2023 18:51:18 +0530
Subject: [PATCH 05/11] CommentEditModal Storybook (#5091)
Co-authored-by: Tiberiu Ichim
---
news/5091.feature | 1 +
.../Comments/CommentEditModal.stories.jsx | 64 +++++++++++++++++++
2 files changed, 65 insertions(+)
create mode 100644 news/5091.feature
create mode 100644 src/components/theme/Comments/CommentEditModal.stories.jsx
diff --git a/news/5091.feature b/news/5091.feature
new file mode 100644
index 0000000000..1b224cda2c
--- /dev/null
+++ b/news/5091.feature
@@ -0,0 +1 @@
+Storybook CommentEditModal-@Tishasoumya
\ No newline at end of file
diff --git a/src/components/theme/Comments/CommentEditModal.stories.jsx b/src/components/theme/Comments/CommentEditModal.stories.jsx
new file mode 100644
index 0000000000..7a46b70612
--- /dev/null
+++ b/src/components/theme/Comments/CommentEditModal.stories.jsx
@@ -0,0 +1,64 @@
+import { injectIntl } from 'react-intl';
+import React from 'react';
+import CommentEditModalComponent from './CommentEditModal';
+import { RealStoreWrapper as Wrapper } from '@plone/volto/storybook';
+
+const IntlCommentEditModalComponent = injectIntl(CommentEditModalComponent);
+
+function StoryComponent(args) {
+ return (
+
+
+ {}}
+ onCancel={() => {}}
+ />
+
+ );
+}
+
+export const CommentEditModal = StoryComponent.bind({});
+
+CommentEditModal.args = {
+ open: true,
+ text: 'Comment Body',
+};
+
+export default {
+ title: 'Public components/Comments/CommentEdit Modal',
+ component: CommentEditModalComponent,
+ decorators: [
+ (Story) => (
+
+
+
+ ),
+ ],
+ argTypes: {
+ open: {
+ description: 'open/close modal',
+ },
+ id: {
+ description: 'id of the comment',
+ },
+ text: {
+ description: 'body of comment',
+ },
+ onCancel: {
+ description: 'cancel changing the comment',
+ },
+ onOk: {
+ description: 'save the change in the comment',
+ },
+ },
+};
From 4f6e75dee0ed742af66a075da64a1be63b1f18ce Mon Sep 17 00:00:00 2001
From: Tisha Soumya
Date: Tue, 3 Oct 2023 18:52:10 +0530
Subject: [PATCH 06/11] Storybook searchwidget (#5092)
Co-authored-by: Tiberiu Ichim
---
news/5092.feature | 1 +
.../SearchWidget/SearchWidget.stories.jsx | 36 +++++++++++++++++++
2 files changed, 37 insertions(+)
create mode 100644 news/5092.feature
create mode 100644 src/components/theme/SearchWidget/SearchWidget.stories.jsx
diff --git a/news/5092.feature b/news/5092.feature
new file mode 100644
index 0000000000..bb44bba61c
--- /dev/null
+++ b/news/5092.feature
@@ -0,0 +1 @@
+Storybook SearchWidget-@Tishasoumya
\ No newline at end of file
diff --git a/src/components/theme/SearchWidget/SearchWidget.stories.jsx b/src/components/theme/SearchWidget/SearchWidget.stories.jsx
new file mode 100644
index 0000000000..33390f9050
--- /dev/null
+++ b/src/components/theme/SearchWidget/SearchWidget.stories.jsx
@@ -0,0 +1,36 @@
+import { injectIntl } from 'react-intl';
+import React from 'react';
+import SearchWidgetComponent from './SearchWidget';
+import { RealStoreWrapper as Wrapper } from '@plone/volto/storybook';
+
+const IntlSearchWidgetComponent = injectIntl(SearchWidgetComponent);
+
+function StoryComponent(args) {
+ return (
+
+
+
+
+ );
+}
+
+export const SearchWidget = StoryComponent.bind({});
+
+export default {
+ title: 'Public components/SearchWidget',
+ component: SearchWidget,
+ decorators: [
+ (Story) => (
+
+
+
+ ),
+ ],
+};
From e5a985c8152b0dd3800bcab1ecf7854dad08a935 Mon Sep 17 00:00:00 2001
From: Tisha Soumya
Date: Tue, 3 Oct 2023 18:52:29 +0530
Subject: [PATCH 07/11] Storybook eventdetails (#5088)
Co-authored-by: Tiberiu Ichim
---
news/5088.feature | 1 +
.../EventDetails/EventDetails.stories.jsx | 88 +++++++++++++++++++
2 files changed, 89 insertions(+)
create mode 100644 news/5088.feature
create mode 100644 src/components/theme/EventDetails/EventDetails.stories.jsx
diff --git a/news/5088.feature b/news/5088.feature
new file mode 100644
index 0000000000..87e9335560
--- /dev/null
+++ b/news/5088.feature
@@ -0,0 +1 @@
+Storybook EventDetails-@Tishasoumya
\ No newline at end of file
diff --git a/src/components/theme/EventDetails/EventDetails.stories.jsx b/src/components/theme/EventDetails/EventDetails.stories.jsx
new file mode 100644
index 0000000000..3173585f01
--- /dev/null
+++ b/src/components/theme/EventDetails/EventDetails.stories.jsx
@@ -0,0 +1,88 @@
+import { injectIntl } from 'react-intl';
+import React from 'react';
+import EventDetailsComponent from './EventDetails';
+import { RealStoreWrapper as Wrapper } from '@plone/volto/storybook';
+
+const IntlEventDetailsComponent = injectIntl(EventDetailsComponent);
+
+function StoryComponent(args) {
+ return (
+
+
+ Hello World!
',
+ },
+ ...args,
+ }}
+ />
+
+ );
+}
+
+export const EventDetails = StoryComponent.bind({});
+EventDetails.args = {
+ attendees: ['John Doe', 'Mario Rossi'],
+ contact_email: 'test@example.com',
+ contact_name: 'John Doe',
+ contact_phone: '0123456789',
+ end: '2019-06-24T15:20:00+00:00',
+ event_url: 'https://www.example.com',
+ location: 'Volto, Plone',
+ open_end: false,
+ recurrence: 'RRULE:FREQ=DAILY;INTERVAL=7;COUNT=7',
+ start: '2019-06-23T15:20:00+00:00',
+ subjects: ['Guillotina', 'Volto'],
+ whole_day: false,
+};
+export default {
+ title: 'Public components/EventDetails',
+ component: EventDetails,
+ decorators: [
+ (Story) => (
+
+
+
+ ),
+ ],
+ argTypes: {
+ contact_email: {
+ description: 'email address',
+ },
+ contact_name: {
+ description: 'name of the attendee',
+ },
+ contact_phone: {
+ description: 'contact phone of the attendee',
+ },
+ end: {
+ control: { type: 'date' },
+ description: 'end date/time of the event',
+ },
+ event_url: {
+ description: 'event url',
+ },
+ start: {
+ control: { type: 'date' },
+ context: 'time',
+ description: 'start date/time of the event',
+ },
+ whole_day: {
+ description: 'whether the event will be whole day or not',
+ },
+ subjects: {
+ description: 'subjects covered in the event meetings',
+ },
+ },
+};
From a6a9e5dfe5b8df13e1f11377041b5d4ad3669b90 Mon Sep 17 00:00:00 2001
From: Tiberiu Ichim
Date: Tue, 3 Oct 2023 17:09:11 +0300
Subject: [PATCH 08/11] Make prettier checks .js in root and cypress folder
(#5260)
---
addon-registry.js | 14 ++-
cypress/fixtures/example.json | 2 +-
cypress/support/commands.js | 3 +-
cypress/support/reset-fixture.js | 6 +-
cypress/tests/core/basic/actions.js | 122 +++++++++++++-----------
cypress/tests/core/basic/contactForm.js | 29 +++---
cypress/tests/core/basic/view.js | 103 ++++++++++----------
cypress/tests/core/basic/workflow.js | 43 ++++-----
cypress/tests/core/content/delete.js | 35 ++++---
jest-extender-plugin.js | 4 +-
news/5260.bugfix | 1 +
package.json | 4 +-
pre-build-transpiling.js | 2 +-
razzle.config.js | 16 ++--
14 files changed, 192 insertions(+), 192 deletions(-)
create mode 100644 news/5260.bugfix
diff --git a/addon-registry.js b/addon-registry.js
index 62a40920e5..f39251ea55 100644
--- a/addon-registry.js
+++ b/addon-registry.js
@@ -101,16 +101,14 @@ function getAddonsLoaderChain(graph) {
*/
class AddonConfigurationRegistry {
constructor(projectRootPath) {
- const packageJson = (this.packageJson = require(path.join(
- projectRootPath,
- 'package.json',
- )));
+ const packageJson = (this.packageJson = require(
+ path.join(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',
- ));
+ this.voltoConfigJS = require(
+ path.join(projectRootPath, 'volto.config.js'),
+ );
} else {
this.voltoConfigJS = [];
}
diff --git a/cypress/fixtures/example.json b/cypress/fixtures/example.json
index da18d9352a..02e4254378 100644
--- a/cypress/fixtures/example.json
+++ b/cypress/fixtures/example.json
@@ -2,4 +2,4 @@
"name": "Using fixtures to represent data",
"email": "hello@cypress.io",
"body": "Fixtures are a great way to mock data for responses to routes"
-}
\ No newline at end of file
+}
diff --git a/cypress/support/commands.js b/cypress/support/commands.js
index f9f5af27da..5ecae1f031 100644
--- a/cypress/support/commands.js
+++ b/cypress/support/commands.js
@@ -126,8 +126,7 @@ Cypress.Commands.add(
body: bodyModifier({
...defaultParams.body,
image: {
- data:
- 'iVBORw0KGgoAAAANSUhEUgAAANcAAAA4CAMAAABZsZ3QAAAAM1BMVEX29fK42OU+oMvn7u9drtIPisHI4OhstdWZyt4fkcXX5+sAg74umMhNp86p0eJ7vNiKw9v/UV4wAAAAAXRSTlMAQObYZgAABBxJREFUeF7tmuty4yAMhZG4X2zn/Z92J5tsBJwWXG/i3XR6frW2Y/SBLIRAfaQUDNt8E5tLUt9BycfcKfq3R6Mlfyimtx4rzp+K3dtibXkor99zsEqLYZltblTecciogoh+TXfY1Ve4dn07rCDGG9dHSEEOg/GmXl0U1XDxTKxNK5De7BxsyyBr6gGm2/vPxKJ8F6f7BXKfRMp1xIWK9A+5ks25alSb353dWnDJN1k35EL5f8dVGifTf/4tjUuuFq7u4srmXC60yAmldLXIWbg65RKU87lcGxJCFqUPv0IacW0PmSivOZFLE908inPToMmii/roG+MRV/O8FU88i8tFsxV3a06MFUw0Qu7RmAtdV5/HVVaOVMTWNOWSwMljLhzhcB6XIS7OK5V6AvRDNN7t5VJWQs1J40UmalbK56usBG/CuCHSYuc+rkUGeMCViNRARPrzW52N3oQLe6WifNliSuuGaH3czbVNudI9s7ZLUCLHVwWlyES522o1t14uvmbblmVTKqFjaZYJFSTPP4dLL1kU1z7p0lzdbRulmEWLxoQX+z9ce7A8GqEEucllLxePuZwdJl1Lezu0hoswvTPt61DrFcRuujV/2cmlxaGBC7Aw6cpovGANwRiSdOAWJ5AGy4gLL64dl0QhUEAuEUNws+XxV+OKGPdw/hESGYF9XEGaFC7sNLMSXWJjHsnanYi87VK428N2uxpOjOFANcagLM5l+7mSycM8KknZpKLcGi6jmzWGr/vLurZ/0g4u9AZuAoeb5r1ceQhyiTPY1E4wUR6u/F3H2ojSpXMMriBPT9cezTto8Cx+MsglHL4fv1Rxrb1LVw9yvyQpJ3AhFnLZfuRLH2QsOG3FGGD20X/th/u5bFAt16Bt308KjF+MNOXgl/SquIEySX3GhaZvc67KZbDxcCDORz2N8yCWPaY5lyQZO7lQ29fnZbt3Xu6qoge4+DjXl/MocySPOp9rlvdyznahRyHEYd77v3LhugOXDv4J65QXfl803BDAdaWBEDhfVx7nKofjoVCgxnUAqw/UAUDPn788BDvQuG4TDtdtUPvzjSlXAB8DvaDOhhrmhwbywylXAm8CvaouikJTL93gs3y7Yy4VYbIxOHrcMizPqWOjqO9l3Uz52kibQy4xxOgqhJvD+w5rvokOcAlGvNCfeqCv1ste1stzLm0f71Iq3ZfTrPfuE5nhPtF+LvQE2lffQC7pYtQy3tdzdrKvd5TLVVzDetScS3nEKmmwDyt1Cev1kX3YfbvzNK4fzrlw+cB6vm+uiUgf2zdXI62241LawCb7Pi5FXFPF8KpzDoF/Sw2lg+GrHNbno1mhPu+VCF/vfMnw06PnUl6j48dVHD3jHNHPua+fc3o/5yp/zsGi0vYtzi3Pz5mHd4T6BWMIlewacd63AAAAAElFTkSuQmCC',
+ data: 'iVBORw0KGgoAAAANSUhEUgAAANcAAAA4CAMAAABZsZ3QAAAAM1BMVEX29fK42OU+oMvn7u9drtIPisHI4OhstdWZyt4fkcXX5+sAg74umMhNp86p0eJ7vNiKw9v/UV4wAAAAAXRSTlMAQObYZgAABBxJREFUeF7tmuty4yAMhZG4X2zn/Z92J5tsBJwWXG/i3XR6frW2Y/SBLIRAfaQUDNt8E5tLUt9BycfcKfq3R6Mlfyimtx4rzp+K3dtibXkor99zsEqLYZltblTecciogoh+TXfY1Ve4dn07rCDGG9dHSEEOg/GmXl0U1XDxTKxNK5De7BxsyyBr6gGm2/vPxKJ8F6f7BXKfRMp1xIWK9A+5ks25alSb353dWnDJN1k35EL5f8dVGifTf/4tjUuuFq7u4srmXC60yAmldLXIWbg65RKU87lcGxJCFqUPv0IacW0PmSivOZFLE908inPToMmii/roG+MRV/O8FU88i8tFsxV3a06MFUw0Qu7RmAtdV5/HVVaOVMTWNOWSwMljLhzhcB6XIS7OK5V6AvRDNN7t5VJWQs1J40UmalbK56usBG/CuCHSYuc+rkUGeMCViNRARPrzW52N3oQLe6WifNliSuuGaH3czbVNudI9s7ZLUCLHVwWlyES522o1t14uvmbblmVTKqFjaZYJFSTPP4dLL1kU1z7p0lzdbRulmEWLxoQX+z9ce7A8GqEEucllLxePuZwdJl1Lezu0hoswvTPt61DrFcRuujV/2cmlxaGBC7Aw6cpovGANwRiSdOAWJ5AGy4gLL64dl0QhUEAuEUNws+XxV+OKGPdw/hESGYF9XEGaFC7sNLMSXWJjHsnanYi87VK428N2uxpOjOFANcagLM5l+7mSycM8KknZpKLcGi6jmzWGr/vLurZ/0g4u9AZuAoeb5r1ceQhyiTPY1E4wUR6u/F3H2ojSpXMMriBPT9cezTto8Cx+MsglHL4fv1Rxrb1LVw9yvyQpJ3AhFnLZfuRLH2QsOG3FGGD20X/th/u5bFAt16Bt308KjF+MNOXgl/SquIEySX3GhaZvc67KZbDxcCDORz2N8yCWPaY5lyQZO7lQ29fnZbt3Xu6qoge4+DjXl/MocySPOp9rlvdyznahRyHEYd77v3LhugOXDv4J65QXfl803BDAdaWBEDhfVx7nKofjoVCgxnUAqw/UAUDPn788BDvQuG4TDtdtUPvzjSlXAB8DvaDOhhrmhwbywylXAm8CvaouikJTL93gs3y7Yy4VYbIxOHrcMizPqWOjqO9l3Uz52kibQy4xxOgqhJvD+w5rvokOcAlGvNCfeqCv1ste1stzLm0f71Iq3ZfTrPfuE5nhPtF+LvQE2lffQC7pYtQy3tdzdrKvd5TLVVzDetScS3nEKmmwDyt1Cev1kX3YfbvzNK4fzrlw+cB6vm+uiUgf2zdXI62241LawCb7Pi5FXFPF8KpzDoF/Sw2lg+GrHNbno1mhPu+VCF/vfMnw06PnUl6j48dVHD3jHNHPua+fc3o/5yp/zsGi0vYtzi3Pz5mHd4T6BWMIlewacd63AAAAAElFTkSuQmCC',
encoding: 'base64',
filename: 'image.png',
'content-type': 'image/png',
diff --git a/cypress/support/reset-fixture.js b/cypress/support/reset-fixture.js
index ebe6fffaf6..21d2152970 100644
--- a/cypress/support/reset-fixture.js
+++ b/cypress/support/reset-fixture.js
@@ -4,8 +4,7 @@ function setup() {
method: 'POST',
url: `${api_url}/RobotRemote`,
headers: { Accept: 'text/xml', 'content-type': 'text/xml' },
- body:
- 'run_keywordremote_zodb_setupplone.app.robotframework.testing.PLONE_ROBOT_TESTING',
+ body: 'run_keywordremote_zodb_setupplone.app.robotframework.testing.PLONE_ROBOT_TESTING',
}).then(() => cy.log('Setting up API fixture'));
}
@@ -15,8 +14,7 @@ function teardown() {
method: 'POST',
url: `${api_url}/RobotRemote`,
headers: { Accept: 'text/xml', 'content-type': 'text/xml' },
- body:
- 'run_keywordremote_zodb_teardownplone.app.robotframework.testing.PLONE_ROBOT_TESTING',
+ body: 'run_keywordremote_zodb_teardownplone.app.robotframework.testing.PLONE_ROBOT_TESTING',
}).then(() => cy.log('Tearing down API fixture'));
}
diff --git a/cypress/tests/core/basic/actions.js b/cypress/tests/core/basic/actions.js
index e5b238ad4b..58c87c0a3d 100644
--- a/cypress/tests/core/basic/actions.js
+++ b/cypress/tests/core/basic/actions.js
@@ -1,57 +1,69 @@
describe('actions Tests', () => {
- beforeEach(() => {
- cy.autologin();
- cy.createContent({
- contentType: 'Document',
- contentId: 'my-page-1',
- contentTitle: 'My Page-1',
- allow_discussion: true,
- }
- );
- cy.visit('/contents');
- });
- it('copy', function () {
- cy.get('tr[aria-label="/my-page-1"]').within(() => {
- cy.get('svg[class="icon dropdown-popup-trigger"]').click();
- });
- cy.get('a[class="item right-dropdown icon-align"]').eq(2).click();
- cy.get('button[class="ui button icon item"]').click();
- cy.visit('/contents');
- cy.get('tr[aria-label="/copy_of_my-page-1"]').within(()=>{
- cy.get('a[class="icon-align-name"]').should('have.attr', 'href', '/copy_of_my-page-1/contents');
- })
+ beforeEach(() => {
+ cy.autologin();
+ cy.createContent({
+ contentType: 'Document',
+ contentId: 'my-page-1',
+ contentTitle: 'My Page-1',
+ allow_discussion: true,
+ });
+ cy.visit('/contents');
+ });
+ it('copy', function () {
+ cy.get('tr[aria-label="/my-page-1"]').within(() => {
+ cy.get('svg[class="icon dropdown-popup-trigger"]').click();
+ });
+ cy.get('a[class="item right-dropdown icon-align"]').eq(2).click();
+ cy.get('button[class="ui button icon item"]').click();
+ cy.visit('/contents');
+ cy.get('tr[aria-label="/copy_of_my-page-1"]').within(() => {
+ cy.get('a[class="icon-align-name"]').should(
+ 'have.attr',
+ 'href',
+ '/copy_of_my-page-1/contents',
+ );
+ });
+ });
+ it('delete', function () {
+ cy.get('tr[aria-label="/my-page-1"]').within(() => {
+ cy.get('button[class="ui basic icon button"]').click({ multiple: true });
+ });
+ cy.get('button[class="ui button icon item"]').eq(6).click();
+ cy.get('button[class="ui primary button"]').findByText('Delete').click();
+ cy.visit('/contents');
+ cy.get('tr').should('not.contain', '/my-page-1');
+ });
+ it('cut', function () {
+ cy.get('tr[aria-label="/my-page-1"]').within(() => {
+ cy.get('svg[class="icon dropdown-popup-trigger"]').click();
+ });
+ cy.get('a[class="item right-dropdown icon-align"]').eq(1).click();
+ cy.get('button[class="ui button icon item"]').click();
+ cy.visit('/contents');
+ cy.get('tr[aria-label="/my-page-1"]').within(() => {
+ cy.get('a[class="icon-align-name"]').should(
+ 'have.attr',
+ 'href',
+ '/my-page-1/contents',
+ );
+ });
+ });
+ it('rename', function () {
+ cy.get('tr[aria-label="/my-page-1"]').within(() => {
+ cy.get('button[class="ui basic icon button"]').click({ multiple: true });
+ });
+ cy.get('button[class="ui button icon item"]').eq(0).click();
+ cy.get('#field-0_title').clear().type('my-page-rename');
+ cy.get('#field-0_id').clear().type('my-page-rename');
+ cy.get(
+ 'button[class="ui basic circular primary right floated button"]',
+ ).click();
+ cy.get('tr[aria-label="/my-page-rename"]').within(() => {
+ cy.get('a[class="icon-align-name"]').should(
+ 'have.attr',
+ 'href',
+ '/my-page-rename/contents',
+ );
+ });
});
- it('delete', function () {
- cy.get('tr[aria-label="/my-page-1"]').within(() => {
- cy.get('button[class="ui basic icon button"]').click({ multiple: true });
- });
- cy.get('button[class="ui button icon item"]').eq(6).click();
- cy.get('button[class="ui primary button"]').findByText('Delete').click();
- cy.visit('/contents');
- cy.get('tr').should('not.contain','/my-page-1');
-
- });
- it('cut', function () {
- cy.get('tr[aria-label="/my-page-1"]').within(() => {
- cy.get('svg[class="icon dropdown-popup-trigger"]').click();
- });
- cy.get('a[class="item right-dropdown icon-align"]').eq(1).click();
- cy.get('button[class="ui button icon item"]').click();
- cy.visit('/contents');
- cy.get('tr[aria-label="/my-page-1"]').within(()=>{
- cy.get('a[class="icon-align-name"]').should('have.attr', 'href', '/my-page-1/contents');
- })
- });
- it('rename', function () {
- cy.get('tr[aria-label="/my-page-1"]').within(() => {
- cy.get('button[class="ui basic icon button"]').click({ multiple: true });
- });
- cy.get('button[class="ui button icon item"]').eq(0).click();
- cy.get('#field-0_title').clear().type('my-page-rename');
- cy.get('#field-0_id').clear().type('my-page-rename');
- cy.get('button[class="ui basic circular primary right floated button"]').click();
- cy.get('tr[aria-label="/my-page-rename"]').within(()=>{
- cy.get('a[class="icon-align-name"]').should('have.attr', 'href', '/my-page-rename/contents');
- })
- })
- });
\ No newline at end of file
+});
diff --git a/cypress/tests/core/basic/contactForm.js b/cypress/tests/core/basic/contactForm.js
index 54fe9fc73e..4321312921 100644
--- a/cypress/tests/core/basic/contactForm.js
+++ b/cypress/tests/core/basic/contactForm.js
@@ -1,15 +1,16 @@
describe('Contact Form Tests', () => {
- beforeEach(() => {
- cy.visit('/');
- });
- it('renders contact Form', function () {
- cy.get('a:contains("Contact")').click();
- cy.get('input[name="name"]').type('Myname');
- cy.get('input[name="from"]').type('admin@admin.com');
- cy.get('input[name="subject"]').type('Loreum Ipsium');
- cy.get('textarea[name="message"]').type('Lorem Ipsum is simply dummy text of the printing and typesetting industry.');
-
-
- cy.get('button[class="ui basic primary right floated button"]').click();
- });
- });
\ No newline at end of file
+ beforeEach(() => {
+ cy.visit('/');
+ });
+ it('renders contact Form', function () {
+ cy.get('a:contains("Contact")').click();
+ cy.get('input[name="name"]').type('Myname');
+ cy.get('input[name="from"]').type('admin@admin.com');
+ cy.get('input[name="subject"]').type('Loreum Ipsium');
+ cy.get('textarea[name="message"]').type(
+ 'Lorem Ipsum is simply dummy text of the printing and typesetting industry.',
+ );
+
+ cy.get('button[class="ui basic primary right floated button"]').click();
+ });
+});
diff --git a/cypress/tests/core/basic/view.js b/cypress/tests/core/basic/view.js
index 00cc061e25..4d20f09cf0 100644
--- a/cypress/tests/core/basic/view.js
+++ b/cypress/tests/core/basic/view.js
@@ -1,55 +1,50 @@
describe('Add Content Tests', () => {
- beforeEach(() => {
- cy.intercept('GET', `/**/*?expand*`).as('content');
- // give a logged in editor and the site root
- cy.autologin();
- cy.visit('/');
- cy.wait('@content');
- });
-
- it('As editor I can change the view to Listing View', function () {
-
- cy.visit('/events');
- cy.get('#toolbar-more').click();
- cy.findByText('Listing view').click();
- cy.findByText('Album view').click();
- cy.visit('/events');
- cy.wait('@content');
- cy.wait(2000);
- cy.get('main').contains('Event').should('be.visible');
- });
-
- it('As editor I can change the view to Summary View', function () {
-
- cy.visit('/events');
- cy.get('#toolbar-more').click();
- cy.findByText('Listing view').click();
- cy.findByText('Summary view').click();
- cy.visit('/events');
- cy.wait('@content');
- cy.wait(2000);
- cy.get('main').contains('Event').should('be.visible');
- });
- it('As editor I can change the view to Tabular View', function () {
-
- cy.visit('/events');
- cy.get('#toolbar-more').click();
- cy.findByText('Listing view').click();
- cy.findByText('Tabular view').click();
- cy.visit('/events');
- cy.wait('@content');
- cy.wait(2000);
- cy.get('main').contains('Event').should('be.visible');
- });
- it('As editor I can change the view to Album View', function () {
-
- cy.visit('/events');
- cy.get('#toolbar-more').click();
- cy.findByText('Listing view').click();
- cy.visit('/events');
- cy.wait('@content');
- cy.wait(2000);
- cy.get('main').contains('Event').should('be.visible');
- });
- });
-
\ No newline at end of file
+ beforeEach(() => {
+ cy.intercept('GET', `/**/*?expand*`).as('content');
+ // give a logged in editor and the site root
+ cy.autologin();
+ cy.visit('/');
+ cy.wait('@content');
+ });
+
+ it('As editor I can change the view to Listing View', function () {
+ cy.visit('/events');
+ cy.get('#toolbar-more').click();
+ cy.findByText('Listing view').click();
+ cy.findByText('Album view').click();
+ cy.visit('/events');
+ cy.wait('@content');
+ cy.wait(2000);
+ cy.get('main').contains('Event').should('be.visible');
+ });
+
+ it('As editor I can change the view to Summary View', function () {
+ cy.visit('/events');
+ cy.get('#toolbar-more').click();
+ cy.findByText('Listing view').click();
+ cy.findByText('Summary view').click();
+ cy.visit('/events');
+ cy.wait('@content');
+ cy.wait(2000);
+ cy.get('main').contains('Event').should('be.visible');
+ });
+ it('As editor I can change the view to Tabular View', function () {
+ cy.visit('/events');
+ cy.get('#toolbar-more').click();
+ cy.findByText('Listing view').click();
+ cy.findByText('Tabular view').click();
+ cy.visit('/events');
+ cy.wait('@content');
+ cy.wait(2000);
+ cy.get('main').contains('Event').should('be.visible');
+ });
+ it('As editor I can change the view to Album View', function () {
+ cy.visit('/events');
+ cy.get('#toolbar-more').click();
+ cy.findByText('Listing view').click();
+ cy.visit('/events');
+ cy.wait('@content');
+ cy.wait(2000);
+ cy.get('main').contains('Event').should('be.visible');
+ });
+});
diff --git a/cypress/tests/core/basic/workflow.js b/cypress/tests/core/basic/workflow.js
index 0a58077af6..1df0027f3a 100644
--- a/cypress/tests/core/basic/workflow.js
+++ b/cypress/tests/core/basic/workflow.js
@@ -1,25 +1,24 @@
describe('workflow Tests', () => {
- beforeEach(() => {
- cy.autologin();
- cy.createContent({
- contentType: 'Document',
- contentId: 'my-page',
- contentTitle: 'My Page',
- allow_discussion: true,
- }
- );
- cy.visit('/contents');
+ beforeEach(() => {
+ cy.autologin();
+ cy.createContent({
+ contentType: 'Document',
+ contentId: 'my-page',
+ contentTitle: 'My Page',
+ allow_discussion: true,
});
- it('change workflow state recursively', function () {
- cy.get('tr[aria-label="/my-page"]').within(() => {
- cy.get('button[class="ui basic icon button"]').click({ multiple: true });
- })
- cy.get('button[class="ui button icon item"]').eq(1).click();
- cy.findByText('Select…').click();
- cy.findByText('Publish').click();
- cy.findByTitle('Save').click();
- cy.get('tr[aria-label="/my-page"]').within(() => {
- cy.get('td > div').should('contain','Published');
- })
+ cy.visit('/contents');
+ });
+ it('change workflow state recursively', function () {
+ cy.get('tr[aria-label="/my-page"]').within(() => {
+ cy.get('button[class="ui basic icon button"]').click({ multiple: true });
});
- });
\ No newline at end of file
+ cy.get('button[class="ui button icon item"]').eq(1).click();
+ cy.findByText('Select…').click();
+ cy.findByText('Publish').click();
+ cy.findByTitle('Save').click();
+ cy.get('tr[aria-label="/my-page"]').within(() => {
+ cy.get('td > div').should('contain', 'Published');
+ });
+ });
+});
diff --git a/cypress/tests/core/content/delete.js b/cypress/tests/core/content/delete.js
index 7b09f468c0..d724cf9df4 100644
--- a/cypress/tests/core/content/delete.js
+++ b/cypress/tests/core/content/delete.js
@@ -1,21 +1,20 @@
describe('delete Tests', () => {
- beforeEach(() => {
- cy.autologin();
- cy.createContent({
- contentType: 'Document',
- contentId: 'my-page',
- contentTitle: 'My Page',
- allow_discussion: true,
- }
- );
- cy.visit('/contents');
+ beforeEach(() => {
+ cy.autologin();
+ cy.createContent({
+ contentType: 'Document',
+ contentId: 'my-page',
+ contentTitle: 'My Page',
+ allow_discussion: true,
});
- it('delete', function () {
- cy.get('tr[aria-label="/my-page"]').within(() => {
- cy.get('button[class="ui basic icon button"]').click({ multiple: true });
- });
- cy.get('button[class="ui button icon item"]').eq(6).click();
- cy.get('button[class="ui primary button"]').findByText('Delete').click();
- cy.get('tr').should('not.contain','/my-page');
+ cy.visit('/contents');
+ });
+ it('delete', function () {
+ cy.get('tr[aria-label="/my-page"]').within(() => {
+ cy.get('button[class="ui basic icon button"]').click({ multiple: true });
});
- });
\ No newline at end of file
+ cy.get('button[class="ui button icon item"]').eq(6).click();
+ cy.get('button[class="ui primary button"]').findByText('Delete').click();
+ cy.get('tr').should('not.contain', '/my-page');
+ });
+});
diff --git a/jest-extender-plugin.js b/jest-extender-plugin.js
index 98128e1b08..e51fa8b2b2 100644
--- a/jest-extender-plugin.js
+++ b/jest-extender-plugin.js
@@ -16,7 +16,9 @@ module.exports = {
if (
fs.existsSync(`${projectRootPath}/${process.env.RAZZLE_JEST_CONFIG}`)
) {
- const jestConfig = require(`${projectRootPath}/${process.env.RAZZLE_JEST_CONFIG}`);
+ const jestConfig = require(
+ `${projectRootPath}/${process.env.RAZZLE_JEST_CONFIG}`,
+ );
config = { ...config, ...jestConfig };
}
// if not, use the sensible default, `jest.config.js`
diff --git a/news/5260.bugfix b/news/5260.bugfix
new file mode 100644
index 0000000000..4f8832297d
--- /dev/null
+++ b/news/5260.bugfix
@@ -0,0 +1 @@
+Configure the `prettier` and `prettier:fix` yarn commands to also include the root js files and the `cypress` subfolder @tiberiuichim
diff --git a/package.json b/package.json
index 605fe0bf56..9e40914fbe 100644
--- a/package.json
+++ b/package.json
@@ -44,8 +44,8 @@
"test:husky": "CI=true yarn test --bail --findRelatedTests",
"test:debug": "node --inspect node_modules/.bin/jest --runInBand",
"start:prod": "NODE_ENV=production node build/server.js",
- "prettier": "./node_modules/.bin/prettier --single-quote --check 'src/**/*.{js,jsx,ts,tsx,json}'",
- "prettier:fix": "./node_modules/.bin/prettier --single-quote --write 'src/**/*.{js,jsx,ts,tsx,json}'",
+ "prettier": "./node_modules/.bin/prettier --single-quote --check '{src,cypress}/**/*.{js,jsx,ts,tsx}' --check '*.js'",
+ "prettier:fix": "./node_modules/.bin/prettier --single-quote --write '{src,cypress}/**/*.{js,jsx,ts,tsx}' --write '*.js'",
"stylelint": "./node_modules/.bin/stylelint 'theme/**/*.{css,less}' 'src/**/*.{css,less}'",
"stylelint:overrides": "./node_modules/.bin/stylelint 'theme/**/*.overrides' 'src/**/*.overrides'",
"stylelint:fix": "yarn stylelint --fix && yarn stylelint:overrides --fix",
diff --git a/pre-build-transpiling.js b/pre-build-transpiling.js
index fe5a71db2b..d009282ea7 100644
--- a/pre-build-transpiling.js
+++ b/pre-build-transpiling.js
@@ -17,7 +17,7 @@ const offendingPackages = [
];
echo('\nPre-build transpiling to ES5 offending packages...\n');
-offendingPackages.forEach(pkg =>
+offendingPackages.forEach((pkg) =>
exec(
`NODE_ENV=production babel --presets=@babel/env ${pkg} --out-dir ${pkg}`,
),
diff --git a/razzle.config.js b/razzle.config.js
index d7dafc57f3..02d260852b 100644
--- a/razzle.config.js
+++ b/razzle.config.js
@@ -244,10 +244,8 @@ const defaultModify = ({
'lodash-es': path.dirname(require.resolve('lodash')),
};
- const [
- addonsThemeLoaderVariablesPath,
- addonsThemeLoaderMainPath,
- ] = createThemeAddonsLoader(registry.getCustomThemeAddons());
+ const [addonsThemeLoaderVariablesPath, addonsThemeLoaderMainPath] =
+ createThemeAddonsLoader(registry.getCustomThemeAddons());
// Automatic Theme Loading
if (registry.theme) {
@@ -258,12 +256,10 @@ const defaultModify = ({
config.resolve.alias['../../theme.config'] = themeConfigPath;
// We create an alias for each custom theme insertion point (variables, main)
- config.resolve.alias[
- 'addonsThemeCustomizationsVariables'
- ] = addonsThemeLoaderVariablesPath;
- config.resolve.alias[
- 'addonsThemeCustomizationsMain'
- ] = addonsThemeLoaderMainPath;
+ config.resolve.alias['addonsThemeCustomizationsVariables'] =
+ addonsThemeLoaderVariablesPath;
+ config.resolve.alias['addonsThemeCustomizationsMain'] =
+ addonsThemeLoaderMainPath;
}
config.performance = {
From 481350a1b1a301585255f73c72254cf533253c23 Mon Sep 17 00:00:00 2001
From: Jon Pentland
Date: Tue, 3 Oct 2023 16:10:13 +0200
Subject: [PATCH 09/11] Ensure .gitignore gets copied when running `yo
@plone/volto-addon` (#5258)
---
news/5258.bugfix | 1 +
.../generator-volto/generators/addon/index.js | 17 ++++++++++-------
.../templates/{.gitignore => .gitignorefile} | 0
3 files changed, 11 insertions(+), 7 deletions(-)
create mode 100644 news/5258.bugfix
rename packages/generator-volto/generators/addon/templates/{.gitignore => .gitignorefile} (100%)
diff --git a/news/5258.bugfix b/news/5258.bugfix
new file mode 100644
index 0000000000..efa2008829
--- /dev/null
+++ b/news/5258.bugfix
@@ -0,0 +1 @@
+Ensure .gitignore gets copied when running yo @plone/volto-addon @instification
diff --git a/packages/generator-volto/generators/addon/index.js b/packages/generator-volto/generators/addon/index.js
index 5fdf0ec41f..e2420dd424 100644
--- a/packages/generator-volto/generators/addon/index.js
+++ b/packages/generator-volto/generators/addon/index.js
@@ -207,11 +207,6 @@ Run "npm install -g @plone/generator-volto" to update.`,
}
install() {
- this.renderTemplate(
- `${this.templatePath()}/**/*`,
- this.destinationPath(),
- this.globals,
- );
// copy dotfiles
this.fs.copyTpl(
this.templatePath('.github/workflows'),
@@ -223,8 +218,16 @@ Run "npm install -g @plone/generator-volto" to update.`,
this.destinationPath('.yarn/releases'),
this.globals,
);
-
- this.fs.copy(this.templatePath('.*'), this.destinationPath());
+ this.fs.copyTpl(
+ this.templatePath('.gitignorefile'),
+ this.destinationPath('.gitignore'),
+ this.globals,
+ );
+ this.fs.copyTpl(this.templatePath(), this.destinationPath(), {
+ ...this.globals,
+ ignore: ['**/*.tpl', '**/*~', '**/.gitignorefile'],
+ dot: true,
+ });
}
end() {
diff --git a/packages/generator-volto/generators/addon/templates/.gitignore b/packages/generator-volto/generators/addon/templates/.gitignorefile
similarity index 100%
rename from packages/generator-volto/generators/addon/templates/.gitignore
rename to packages/generator-volto/generators/addon/templates/.gitignorefile
From 72944648cf358c6f6092363e3aff0b6c6b78ffaa Mon Sep 17 00:00:00 2001
From: Wesley Barroso Lopes
Date: Tue, 3 Oct 2023 11:12:19 -0300
Subject: [PATCH 10/11] Fix error: no such file or directory, open
'addon-testing-project/jsconfig.json' in addon clone command (#5245)
Co-authored-by: Tiberiu Ichim
---
packages/scripts/addon/generators.js | 24 ++++++++++++++++++++++--
packages/scripts/news/5239.bugfix | 1 +
2 files changed, 23 insertions(+), 2 deletions(-)
create mode 100644 packages/scripts/news/5239.bugfix
diff --git a/packages/scripts/addon/generators.js b/packages/scripts/addon/generators.js
index a21ea9c909..806ab0f4a6 100644
--- a/packages/scripts/addon/generators.js
+++ b/packages/scripts/addon/generators.js
@@ -74,9 +74,19 @@ export async function runGitGenerator({
branch,
});
+ // BBB: Maintains compatibility with
+ // @plone/generator-volto < 7.0.0-alpha.7
+ // In new versions of @plone/generator-volto we do not have jsconfig.json but tsconfig.json
+ let configFile;
+ if (fs.existsSync(`${destination}/jsconfig.json`)) {
+ configFile = 'jsconfig.json';
+ } else {
+ configFile = 'tsconfig.json';
+ }
+
await develop({
root: destination,
- configFile: 'jsconfig.json',
+ configFile: configFile,
output: 'addons',
});
@@ -163,9 +173,19 @@ export async function runLocalGenerator({
destination,
});
+ // BBB: Maintains compatibility with
+ // @plone/generator-volto < 7.0.0-alpha.7
+ // In new versions of @plone/generator-volto we do not have jsconfig.json but tsconfig.json
+ let configFile;
+ if (fs.existsSync(`${destination}/jsconfig.json`)) {
+ configFile = 'jsconfig.json';
+ } else {
+ configFile = 'tsconfig.json';
+ }
+
await develop({
root: destination,
- configFile: 'jsconfig.json',
+ configFile: configFile,
output: 'addons',
});
diff --git a/packages/scripts/news/5239.bugfix b/packages/scripts/news/5239.bugfix
new file mode 100644
index 0000000000..f8971746c5
--- /dev/null
+++ b/packages/scripts/news/5239.bugfix
@@ -0,0 +1 @@
+Fix error ``no such file or directory, open 'addon-testing-project/jsconfig.json'`` in addon clone command. @wesleybl
From 8fbf776f611deca89d1b8544d398e37684ac1414 Mon Sep 17 00:00:00 2001
From: Tisha Soumya
Date: Tue, 3 Oct 2023 20:48:49 +0530
Subject: [PATCH 11/11] Storybook Header (#5085)
Co-authored-by: Tiberiu Ichim
---
news/5085.feature | 1 +
.../theme/Header/Header.stories.jsx | 47 +++++++++++++++++++
2 files changed, 48 insertions(+)
create mode 100644 news/5085.feature
create mode 100644 src/components/theme/Header/Header.stories.jsx
diff --git a/news/5085.feature b/news/5085.feature
new file mode 100644
index 0000000000..2a5ccf64f0
--- /dev/null
+++ b/news/5085.feature
@@ -0,0 +1 @@
+storybook Header-@Tishasoumya
\ No newline at end of file
diff --git a/src/components/theme/Header/Header.stories.jsx b/src/components/theme/Header/Header.stories.jsx
new file mode 100644
index 0000000000..49d6357a8f
--- /dev/null
+++ b/src/components/theme/Header/Header.stories.jsx
@@ -0,0 +1,47 @@
+import { injectIntl } from 'react-intl';
+import React from 'react';
+import HeaderComponent from './Header';
+import { RealStoreWrapper as Wrapper } from '@plone/volto/storybook';
+
+const IntlHeaderComponent = injectIntl(HeaderComponent);
+
+function StoryComponent(args) {
+ return (
+
+
+
+
+ );
+}
+
+export const Default = StoryComponent.bind({});
+Default.args = {
+ token: '',
+};
+export const Auth = StoryComponent.bind({});
+Auth.args = {
+ token: '1234567890',
+};
+
+export default {
+ title: 'Public components/Header',
+ component: HeaderComponent,
+ decorators: [
+ (Story) => (
+
+
+
+ ),
+ ],
+ argTypes: {
+ token: 'Token for userSession',
+ },
+};