From 4ea38067018f2bbd35566b4d70ed87e9362988ef Mon Sep 17 00:00:00 2001 From: Piero Nicolli Date: Fri, 5 Jul 2024 10:19:17 +0200 Subject: [PATCH 01/17] fix: upgrade dependencies --- package.json | 6 +++--- yarn.lock | 30 +++++++++++++++--------------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/package.json b/package.json index 19bbf735b..a1efad713 100644 --- a/package.json +++ b/package.json @@ -149,10 +149,10 @@ "volto-blocks-widget": "3.4.1", "volto-data-grid-widget": "2.3.1", "volto-dropdownmenu": "4.1.3", - "volto-editablefooter": "5.1.6", + "volto-editablefooter": "5.1.7", "volto-feedback": "0.3.2", - "volto-form-block": "3.8.6", - "volto-gdpr-privacy": "2.2.6", + "volto-form-block": "3.8.7", + "volto-gdpr-privacy": "2.2.7", "volto-google-analytics": "2.0.0", "volto-multilingual-widget": "3.2.1", "volto-querywidget-with-browser": "0.4.2", diff --git a/yarn.lock b/yarn.lock index 0d44e2025..7dbaca9d0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8214,10 +8214,10 @@ __metadata: volto-blocks-widget: 3.4.1 volto-data-grid-widget: 2.3.1 volto-dropdownmenu: 4.1.3 - volto-editablefooter: 5.1.6 + volto-editablefooter: 5.1.7 volto-feedback: 0.3.2 - volto-form-block: 3.8.6 - volto-gdpr-privacy: 2.2.6 + volto-form-block: 3.8.7 + volto-gdpr-privacy: 2.2.7 volto-google-analytics: 2.0.0 volto-multilingual-widget: 3.2.1 volto-querywidget-with-browser: 0.4.2 @@ -16104,15 +16104,15 @@ __metadata: languageName: node linkType: hard -"volto-editablefooter@npm:5.1.6": - version: 5.1.6 - resolution: "volto-editablefooter@npm:5.1.6" +"volto-editablefooter@npm:5.1.7": + version: 5.1.7 + resolution: "volto-editablefooter@npm:5.1.7" dependencies: react-outside-click-handler: 1.3.0 peerDependencies: "@plone/volto": ">=16.0.0-alpha.38" volto-blocks-widget: ">=3.4.0" - checksum: 0e479d49c417e4eac3d15d49752bab794647b24b7eb800dbfd841d351a681d34b1353a03a2c681c53c8be4cc4336b14b07a1320d4bae29ee2112402ce90edac4 + checksum: ad5642959ba751a6a805bff372d29fd228abf210e744f6cc5d3cc0e5c9b00570fde9c3b151057924e91156ef1f9d26e0703b533e05d7011ce215eb841e300b2b languageName: node linkType: hard @@ -16128,9 +16128,9 @@ __metadata: languageName: node linkType: hard -"volto-form-block@npm:3.8.6": - version: 3.8.6 - resolution: "volto-form-block@npm:3.8.6" +"volto-form-block@npm:3.8.7": + version: 3.8.7 + resolution: "volto-form-block@npm:3.8.7" dependencies: "@hcaptcha/react-hcaptcha": ^0.3.6 file-saver: ^2.0.5 @@ -16139,19 +16139,19 @@ __metadata: peerDependencies: "@plone/volto": ">=16.0.0-alpha.38" volto-subblocks: ^2.1.0 - checksum: b038d1b89ea93da7780a0ff20b6a34a3386ecd86a77fe049c3a2dbab593a7560b4f60b4c22e9bed52253bbd76c3313f05fdba1401aa7353773902e5ed729d133 + checksum: 8c014bdf2dc8774d7298466e9f7941df72be19172562dfdffefa125d85d802af5ff97d6764bdf8e5fa6aa07c29dd2e9634a104f9e1abaef562c4be647c680fd5 languageName: node linkType: hard -"volto-gdpr-privacy@npm:2.2.6": - version: 2.2.6 - resolution: "volto-gdpr-privacy@npm:2.2.6" +"volto-gdpr-privacy@npm:2.2.7": + version: 2.2.7 + resolution: "volto-gdpr-privacy@npm:2.2.7" dependencies: react-focus-lock: 2.9.4 volto-multilingual-widget: 3.2.1 peerDependencies: "@plone/volto": ">=16.0.0-alpha.38" - checksum: 604badfe7225ccc6783c05bada9fb03c07a66e673de6ca8bb681b9aedb48c2dd25213001f60a31e288811686dd41e28c0d38d95c8793df0b56ce5abe3b022087 + checksum: beb301d21ff8f831fd1c1b924830e2b23fea91050f139d0211c2f91a009e81ac336334df77a636245cb50c199fba8d88ba9742048c81befad20ef7c9d995b1b0 languageName: node linkType: hard From 91a58b6f124da03e10437c0ee4f48b9545d51ddf Mon Sep 17 00:00:00 2001 From: Piero Nicolli Date: Fri, 5 Jul 2024 10:19:25 +0200 Subject: [PATCH 02/17] docs: updated publiccode and release log --- RELEASE.md | 10 +--------- publiccode.yml | 4 ++-- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/RELEASE.md b/RELEASE.md index 80cd18da9..e7e7526f2 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -41,20 +41,12 @@ - ... --> -## Versione X.X.X (dd/mm/yyyy) - -### Migliorie - -- ... +## Versione 11.15.0 (05/07/2024) ### Novità - Le informazioni sulla data di inizio e fine incarico sul CT persona vengono ora mostrate subito dopo l'incarico. -### Fix - -- ... - ## Versione 11.14.0 (21/06/2024) ### Migliorie diff --git a/publiccode.yml b/publiccode.yml index 3a0eba041..8691a57f1 100644 --- a/publiccode.yml +++ b/publiccode.yml @@ -227,9 +227,9 @@ maintenance: name: io-Comune - Il sito AgID per Comuni ed Enti Pubblici platforms: - web -releaseDate: '2024-06-21' +releaseDate: '2024-07-05' softwareType: standalone/web -softwareVersion: 11.14.0 +softwareVersion: 11.15.0 url: 'https://github.com/italia/design-comuni-plone-theme' usedBy: - ASP Comuni Modenesi Area Nord From c69efe1a7017aa19ddd72606c149fd9967d909fd Mon Sep 17 00:00:00 2001 From: Piero Nicolli Date: Fri, 5 Jul 2024 10:19:55 +0200 Subject: [PATCH 03/17] chore: release v11.15.0 --- CHANGELOG.md | 19 +++++++++++++++++++ package.json | 2 +- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index aeb619298..32cb078e6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,24 @@ +## [11.15.0](https://github.com/RedTurtle/design-comuni-plone-theme/compare/v11.14.0...v11.15.0) (2024-07-05) + + +### Features + +* moved start and end date of incarico after incarico name ([#715](https://github.com/RedTurtle/design-comuni-plone-theme/issues/715)) ([c07c1ea](https://github.com/RedTurtle/design-comuni-plone-theme/commit/c07c1ea41b3534ad0c05ba2b9990c7b1c8f226ff)) +* update to volto 17.18.1 ([8896926](https://github.com/RedTurtle/design-comuni-plone-theme/commit/889692614b5728bd812754dea9191c5bcb127a0a)) + + +### Bug Fixes + +* updated form validation customization ([f3d2e72](https://github.com/RedTurtle/design-comuni-plone-theme/commit/f3d2e72b47c8ce33326d0b4b5ca87daf9e874668)) +* upgrade dependencies ([4ea3806](https://github.com/RedTurtle/design-comuni-plone-theme/commit/4ea38067018f2bbd35566b4d70ed87e9362988ef)) + + +### Documentation + +* updated publiccode and release log ([91a58b6](https://github.com/RedTurtle/design-comuni-plone-theme/commit/91a58b6f124da03e10437c0ee4f48b9545d51ddf)) + ## [11.14.0](https://github.com/RedTurtle/design-comuni-plone-theme/compare/v11.13.0...v11.14.0) (2024-06-21) diff --git a/package.json b/package.json index a1efad713..4caaab233 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "design-comuni-plone-theme", "description": "Volto Theme for Italia design guidelines", "license": "GPL-v3", - "version": "11.14.0", + "version": "11.15.0", "main": "src/index.js", "repository": { "type": "git", From 038ef5803af9bcb417fc757bb8ee6a57e065bad7 Mon Sep 17 00:00:00 2001 From: sabrina-bongiovanni <116291154+sabrina-bongiovanni@users.noreply.github.com> Date: Wed, 10 Jul 2024 11:52:36 +0200 Subject: [PATCH 04/17] feat: added date fields to incarico view (#711) * feat: added date fields to view * fix: added translations * fix: used injectLazyLibs instead of direct import * chore: cleanup runtime warnings * test: remove broken test that needs refactoring --------- Co-authored-by: Piero Nicolli Co-authored-by: Piero Nicolli --- RELEASE.md | 14 +++++ locales/de/LC_MESSAGES/volto.po | 4 +- locales/en/LC_MESSAGES/volto.po | 4 +- locales/es/LC_MESSAGES/volto.po | 4 +- locales/fr/LC_MESSAGES/volto.po | 4 +- locales/it/LC_MESSAGES/volto.po | 4 +- locales/volto.pot | 6 +- .../ItaliaTheme/View/Commons/Actions.jsx | 4 +- .../View/Commons/Argument/ArgumentIcon.jsx | 2 +- .../ItaliaTheme/View/Commons/Attachment.jsx | 2 +- .../ItaliaTheme/View/Commons/HelpBox.jsx | 2 +- .../ItaliaTheme/View/Commons/RenderBlocks.jsx | 7 ++- .../ItaliaTheme/View/Commons/Sharing.jsx | 2 +- .../View/Commons/__tests__/Dates.test.jsx | 2 +- .../View/IncaricoView/IncaricoView.jsx | 58 ++++++++++++++++--- .../View/PersonaView/PersonaRuolo.jsx | 10 ++-- .../IncaricoView.test__disabled.jsx} | 0 .../__tests__/ServizioTempiScadenze.test.jsx | 1 - 18 files changed, 99 insertions(+), 31 deletions(-) rename src/components/ItaliaTheme/View/{__tests__/IncaricoView.test.jsx => __disabled_tests__/IncaricoView.test__disabled.jsx} (100%) diff --git a/RELEASE.md b/RELEASE.md index e7e7526f2..4c7ffbc2d 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -41,6 +41,20 @@ - ... --> +## Versione X.X.X (dd/mm/yyyy) + +### Migliorie + +- Tutti i campi compilabili nel CT Incarico vengono ora visualizzati nella vista corrispondente. + +### Novità + +- ... + +### Fix + +- ... + ## Versione 11.15.0 (05/07/2024) ### Novità diff --git a/locales/de/LC_MESSAGES/volto.po b/locales/de/LC_MESSAGES/volto.po index 534ed2d12..4dd640ef0 100644 --- a/locales/de/LC_MESSAGES/volto.po +++ b/locales/de/LC_MESSAGES/volto.po @@ -1468,6 +1468,7 @@ msgstr "" msgid "data_conclusione" msgstr "" +#: components/ItaliaTheme/View/IncaricoView/IncaricoView #: components/ItaliaTheme/View/PersonaView/PersonaRuolo # defaultMessage: Ha fatto parte dell'organizzazione comunale come {incarico} fino al msgid "data_conclusione_incarico" @@ -1478,6 +1479,7 @@ msgstr "" msgid "data_inizio" msgstr "" +#: components/ItaliaTheme/View/IncaricoView/IncaricoView #: components/ItaliaTheme/View/PersonaView/PersonaRuolo # defaultMessage: Data di inizio dell'incarico msgid "data_inizio_incarico" @@ -1485,7 +1487,7 @@ msgstr "" #: components/ItaliaTheme/View/IncaricoView/IncaricoView #: components/ItaliaTheme/View/PersonaView/PersonaRuolo -# defaultMessage: Data insediamento +# defaultMessage: Data di insediamento msgid "data_insediamento" msgstr "" diff --git a/locales/en/LC_MESSAGES/volto.po b/locales/en/LC_MESSAGES/volto.po index 0473bd259..37646c569 100644 --- a/locales/en/LC_MESSAGES/volto.po +++ b/locales/en/LC_MESSAGES/volto.po @@ -1453,6 +1453,7 @@ msgstr "" msgid "data_conclusione" msgstr "" +#: components/ItaliaTheme/View/IncaricoView/IncaricoView #: components/ItaliaTheme/View/PersonaView/PersonaRuolo # defaultMessage: Ha fatto parte dell'organizzazione comunale come {incarico} fino al msgid "data_conclusione_incarico" @@ -1463,6 +1464,7 @@ msgstr "He was part of the municipal organization until" msgid "data_inizio" msgstr "" +#: components/ItaliaTheme/View/IncaricoView/IncaricoView #: components/ItaliaTheme/View/PersonaView/PersonaRuolo # defaultMessage: Data di inizio dell'incarico msgid "data_inizio_incarico" @@ -1470,7 +1472,7 @@ msgstr "" #: components/ItaliaTheme/View/IncaricoView/IncaricoView #: components/ItaliaTheme/View/PersonaView/PersonaRuolo -# defaultMessage: Data insediamento +# defaultMessage: Data di insediamento msgid "data_insediamento" msgstr "Settlement date" diff --git a/locales/es/LC_MESSAGES/volto.po b/locales/es/LC_MESSAGES/volto.po index 071c8a444..dfb16fe38 100644 --- a/locales/es/LC_MESSAGES/volto.po +++ b/locales/es/LC_MESSAGES/volto.po @@ -1462,6 +1462,7 @@ msgstr "" msgid "data_conclusione" msgstr "" +#: components/ItaliaTheme/View/IncaricoView/IncaricoView #: components/ItaliaTheme/View/PersonaView/PersonaRuolo # defaultMessage: Ha fatto parte dell'organizzazione comunale come {incarico} fino al msgid "data_conclusione_incarico" @@ -1472,6 +1473,7 @@ msgstr "Formó parte de la organización municipal hasta" msgid "data_inizio" msgstr "" +#: components/ItaliaTheme/View/IncaricoView/IncaricoView #: components/ItaliaTheme/View/PersonaView/PersonaRuolo # defaultMessage: Data di inizio dell'incarico msgid "data_inizio_incarico" @@ -1479,7 +1481,7 @@ msgstr "" #: components/ItaliaTheme/View/IncaricoView/IncaricoView #: components/ItaliaTheme/View/PersonaView/PersonaRuolo -# defaultMessage: Data insediamento +# defaultMessage: Data di insediamento msgid "data_insediamento" msgstr "Fecha de liquidación" diff --git a/locales/fr/LC_MESSAGES/volto.po b/locales/fr/LC_MESSAGES/volto.po index b1c156600..f4844923d 100644 --- a/locales/fr/LC_MESSAGES/volto.po +++ b/locales/fr/LC_MESSAGES/volto.po @@ -1470,6 +1470,7 @@ msgstr "" msgid "data_conclusione" msgstr "" +#: components/ItaliaTheme/View/IncaricoView/IncaricoView #: components/ItaliaTheme/View/PersonaView/PersonaRuolo # defaultMessage: Ha fatto parte dell'organizzazione comunale come {incarico} fino al msgid "data_conclusione_incarico" @@ -1480,6 +1481,7 @@ msgstr "Date de conclusion de la mission" msgid "data_inizio" msgstr "" +#: components/ItaliaTheme/View/IncaricoView/IncaricoView #: components/ItaliaTheme/View/PersonaView/PersonaRuolo # defaultMessage: Data di inizio dell'incarico msgid "data_inizio_incarico" @@ -1487,7 +1489,7 @@ msgstr "" #: components/ItaliaTheme/View/IncaricoView/IncaricoView #: components/ItaliaTheme/View/PersonaView/PersonaRuolo -# defaultMessage: Data insediamento +# defaultMessage: Data di insediamento msgid "data_insediamento" msgstr "Date de règlement" diff --git a/locales/it/LC_MESSAGES/volto.po b/locales/it/LC_MESSAGES/volto.po index b58f51bfc..d98bd98b2 100644 --- a/locales/it/LC_MESSAGES/volto.po +++ b/locales/it/LC_MESSAGES/volto.po @@ -1453,6 +1453,7 @@ msgstr "dal {dateStart} fino a conclusione" msgid "data_conclusione" msgstr "Data conclusione incarico" +#: components/ItaliaTheme/View/IncaricoView/IncaricoView #: components/ItaliaTheme/View/PersonaView/PersonaRuolo # defaultMessage: Ha fatto parte dell'organizzazione comunale come {incarico} fino al msgid "data_conclusione_incarico" @@ -1463,6 +1464,7 @@ msgstr "Ha fatto parte dell'organizzazione comunale come {incarico} fino al" msgid "data_inizio" msgstr "Data inizio incarico" +#: components/ItaliaTheme/View/IncaricoView/IncaricoView #: components/ItaliaTheme/View/PersonaView/PersonaRuolo # defaultMessage: Data di inizio dell'incarico msgid "data_inizio_incarico" @@ -1470,7 +1472,7 @@ msgstr "Data di inizio dell'incarico" #: components/ItaliaTheme/View/IncaricoView/IncaricoView #: components/ItaliaTheme/View/PersonaView/PersonaRuolo -# defaultMessage: Data insediamento +# defaultMessage: Data di insediamento msgid "data_insediamento" msgstr "Data di insediamento" diff --git a/locales/volto.pot b/locales/volto.pot index 2ad00fb76..1d8b895ab 100644 --- a/locales/volto.pot +++ b/locales/volto.pot @@ -1,7 +1,7 @@ msgid "" msgstr "" "Project-Id-Version: Plone\n" -"POT-Creation-Date: 2024-06-11T14:57:29.832Z\n" +"POT-Creation-Date: 2024-06-25T15:14:34.369Z\n" "Last-Translator: Plone i18n \n" "Language-Team: Plone i18n \n" "MIME-Version: 1.0\n" @@ -1455,6 +1455,7 @@ msgstr "" msgid "data_conclusione" msgstr "" +#: components/ItaliaTheme/View/IncaricoView/IncaricoView #: components/ItaliaTheme/View/PersonaView/PersonaRuolo # defaultMessage: Ha fatto parte dell'organizzazione comunale come {incarico} fino al msgid "data_conclusione_incarico" @@ -1465,6 +1466,7 @@ msgstr "" msgid "data_inizio" msgstr "" +#: components/ItaliaTheme/View/IncaricoView/IncaricoView #: components/ItaliaTheme/View/PersonaView/PersonaRuolo # defaultMessage: Data di inizio dell'incarico msgid "data_inizio_incarico" @@ -1472,7 +1474,7 @@ msgstr "" #: components/ItaliaTheme/View/IncaricoView/IncaricoView #: components/ItaliaTheme/View/PersonaView/PersonaRuolo -# defaultMessage: Data insediamento +# defaultMessage: Data di insediamento msgid "data_insediamento" msgstr "" diff --git a/src/components/ItaliaTheme/View/Commons/Actions.jsx b/src/components/ItaliaTheme/View/Commons/Actions.jsx index 171717446..053bc5f27 100644 --- a/src/components/ItaliaTheme/View/Commons/Actions.jsx +++ b/src/components/ItaliaTheme/View/Commons/Actions.jsx @@ -10,7 +10,7 @@ import { Button, } from 'design-react-kit'; import { toPublicURL } from '@plone/volto/helpers'; -import { Icon } from 'design-comuni-plone-theme/components/ItaliaTheme'; +import Icon from 'design-comuni-plone-theme/components/ItaliaTheme/Icons/Icon'; /** * Actions view component class. @@ -98,7 +98,7 @@ const Actions = (props) => { {socials.map((item, i) => { const commonButtonProps = { - icon: false, + icon: undefined, title: item.title, alt: item.title, 'aria-label': item.title, diff --git a/src/components/ItaliaTheme/View/Commons/Argument/ArgumentIcon.jsx b/src/components/ItaliaTheme/View/Commons/Argument/ArgumentIcon.jsx index 69870950f..86ba73b14 100644 --- a/src/components/ItaliaTheme/View/Commons/Argument/ArgumentIcon.jsx +++ b/src/components/ItaliaTheme/View/Commons/Argument/ArgumentIcon.jsx @@ -1,7 +1,7 @@ import React from 'react'; import { useIntl, defineMessages } from 'react-intl'; import PropTypes from 'prop-types'; -import { Icon } from 'design-comuni-plone-theme/components/ItaliaTheme'; +import Icon from 'design-comuni-plone-theme/components/ItaliaTheme/Icons/Icon'; /** * Dates view component class. diff --git a/src/components/ItaliaTheme/View/Commons/Attachment.jsx b/src/components/ItaliaTheme/View/Commons/Attachment.jsx index 435f3500c..b7b79b34d 100644 --- a/src/components/ItaliaTheme/View/Commons/Attachment.jsx +++ b/src/components/ItaliaTheme/View/Commons/Attachment.jsx @@ -3,7 +3,7 @@ import PropTypes from 'prop-types'; import { defineMessages, useIntl } from 'react-intl'; import { Card, CardBody, CardTitle } from 'design-react-kit'; import { flattenToAppURL } from '@plone/volto/helpers'; -import { Icon } from 'design-comuni-plone-theme/components/ItaliaTheme'; +import Icon from 'design-comuni-plone-theme/components/ItaliaTheme/Icons/Icon'; const messages = defineMessages({ attachment: { diff --git a/src/components/ItaliaTheme/View/Commons/HelpBox.jsx b/src/components/ItaliaTheme/View/Commons/HelpBox.jsx index 7636343ae..41a611458 100644 --- a/src/components/ItaliaTheme/View/Commons/HelpBox.jsx +++ b/src/components/ItaliaTheme/View/Commons/HelpBox.jsx @@ -2,7 +2,7 @@ import React from 'react'; import { useIntl, defineMessages } from 'react-intl'; import PropTypes from 'prop-types'; import { Callout, CalloutTitle } from 'design-react-kit'; -import { Icon } from 'design-comuni-plone-theme/components/ItaliaTheme'; +import Icon from 'design-comuni-plone-theme/components/ItaliaTheme/Icons/Icon'; import { RichText } from 'design-comuni-plone-theme/components/ItaliaTheme/View'; const HelpBox = ({ text }) => { diff --git a/src/components/ItaliaTheme/View/Commons/RenderBlocks.jsx b/src/components/ItaliaTheme/View/Commons/RenderBlocks.jsx index 19647d920..ec793a15a 100644 --- a/src/components/ItaliaTheme/View/Commons/RenderBlocks.jsx +++ b/src/components/ItaliaTheme/View/Commons/RenderBlocks.jsx @@ -67,9 +67,12 @@ const RenderBlocks = ({ if (Block != null) { return ( - + { - const { content } = props; +const IncaricoView = ({ content, moment: momentlib }) => { + const moment = momentlib.default; const intl = useIntl(); + return (
@@ -93,6 +103,38 @@ const IncaricoView = (props) => {
{content.tipologia_incarico.title}
)} + {content.data_inizio_incarico && ( + +
+ {moment(content.data_inizio_incarico).format('D-MM-YYYY')} +
+
+ )} + {content.data_conclusione_incarico && ( + +
+ {moment(content.data_conclusione_incarico).format('D-MM-YYYY')} +
+
+ )} + {content.data_insediamento && ( + +
+ {moment(content.data_insediamento).format('D-MM-YYYY')} +
+
+ )} {richTextHasContent(content.compensi) && ( { return ( <> {content?.incarichi_persona?.length > 0 && ( - <> + -
+

{content?.incarichi_persona[0]?.title}

{content?.incarichi_persona[0]?.atto_di_nomina && ( { )} )} - + )} {content.incarichi_persona?.length > 1 && ( diff --git a/src/components/ItaliaTheme/View/__tests__/IncaricoView.test.jsx b/src/components/ItaliaTheme/View/__disabled_tests__/IncaricoView.test__disabled.jsx similarity index 100% rename from src/components/ItaliaTheme/View/__tests__/IncaricoView.test.jsx rename to src/components/ItaliaTheme/View/__disabled_tests__/IncaricoView.test__disabled.jsx diff --git a/src/components/ItaliaTheme/View/__tests__/ServizioTempiScadenze.test.jsx b/src/components/ItaliaTheme/View/__tests__/ServizioTempiScadenze.test.jsx index f143d0a80..8ae271a68 100644 --- a/src/components/ItaliaTheme/View/__tests__/ServizioTempiScadenze.test.jsx +++ b/src/components/ItaliaTheme/View/__tests__/ServizioTempiScadenze.test.jsx @@ -14,7 +14,6 @@ const mockStore = configureStore(middlewares); // Warning: An update to Icon inside a test was not wrapped in act(...). // When testing, code that causes React state updates should be wrapped into act(...): jest.mock('design-comuni-plone-theme/components/ItaliaTheme/Icons/Icon'); -// loadables.push('rrule'); jest.mock('@plone/volto/helpers/Loadable/Loadable'); beforeAll( async () => From 1b9fde00f01f646eb27f088e09e662c9c1c8d9d6 Mon Sep 17 00:00:00 2001 From: Sara Bianchi <43245702+SaraBianchi@users.noreply.github.com> Date: Wed, 10 Jul 2024 12:11:47 +0200 Subject: [PATCH 05/17] feat: updated volto-form-block v3.9.2 (#709) * chore: updated volto-form-block v3.9.0 * chore: updated volto-form-block v3.9.1 * docs: updated release.md * fix: upgrade volto-form-block 3.9.2 * docs: fixed merge issues in RELEASE.md * fixed merge issues in RELEASE.md --------- Co-authored-by: Piero Nicolli --- RELEASE.md | 2 +- package.json | 2 +- yarn.lock | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/RELEASE.md b/RELEASE.md index 4c7ffbc2d..d040475c1 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -49,7 +49,7 @@ ### Novità -- ... +- Aggiunti due campi nel blocco Form che permettono di configurare un testo per l'intestazione e uno a piè di pagina nella mail inviata. ### Fix diff --git a/package.json b/package.json index 4caaab233..31fbca67b 100644 --- a/package.json +++ b/package.json @@ -151,7 +151,7 @@ "volto-dropdownmenu": "4.1.3", "volto-editablefooter": "5.1.7", "volto-feedback": "0.3.2", - "volto-form-block": "3.8.7", + "volto-form-block": "3.9.2", "volto-gdpr-privacy": "2.2.7", "volto-google-analytics": "2.0.0", "volto-multilingual-widget": "3.2.1", diff --git a/yarn.lock b/yarn.lock index 7dbaca9d0..9d4a725d3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8216,7 +8216,7 @@ __metadata: volto-dropdownmenu: 4.1.3 volto-editablefooter: 5.1.7 volto-feedback: 0.3.2 - volto-form-block: 3.8.7 + volto-form-block: 3.9.2 volto-gdpr-privacy: 2.2.7 volto-google-analytics: 2.0.0 volto-multilingual-widget: 3.2.1 @@ -16128,9 +16128,9 @@ __metadata: languageName: node linkType: hard -"volto-form-block@npm:3.8.7": - version: 3.8.7 - resolution: "volto-form-block@npm:3.8.7" +"volto-form-block@npm:3.9.2": + version: 3.9.2 + resolution: "volto-form-block@npm:3.9.2" dependencies: "@hcaptcha/react-hcaptcha": ^0.3.6 file-saver: ^2.0.5 @@ -16139,7 +16139,7 @@ __metadata: peerDependencies: "@plone/volto": ">=16.0.0-alpha.38" volto-subblocks: ^2.1.0 - checksum: 8c014bdf2dc8774d7298466e9f7941df72be19172562dfdffefa125d85d802af5ff97d6764bdf8e5fa6aa07c29dd2e9634a104f9e1abaef562c4be647c680fd5 + checksum: a47c5241bed9e5959241ccadd3992753718b0b1fae5f3104089600c5f0d2b71193d9c0a41235e7e9f3fadce9691a5c0bc14722d667cbcf8a1a5793a381c4a746 languageName: node linkType: hard From c1ce5ac3239b77b819909e224cbb07f0097230ea Mon Sep 17 00:00:00 2001 From: Piero Nicolli Date: Wed, 10 Jul 2024 14:50:59 +0200 Subject: [PATCH 06/17] fix: update to volto 17.18.2 --- .github/workflows/main.yml | 2 +- .github/workflows/performance.yml | 2 +- .github/workflows/prs.yml | 2 +- .github/workflows/release.yml | 2 +- Makefile | 2 +- package.json | 2 +- yarn.lock | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0d8b26435..ae636c29d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -31,7 +31,7 @@ jobs: build-args: | ADDON_NAME=design-comuni-plone-theme ADDON_PATH=design-comuni-plone-theme - VOLTO_VERSION=17.18.1 + VOLTO_VERSION=17.18.2 - name: Deploy to rancher uses: redturtle/rancher-deploy-action@v0.2.0 diff --git a/.github/workflows/performance.yml b/.github/workflows/performance.yml index 705028bc7..589e83620 100644 --- a/.github/workflows/performance.yml +++ b/.github/workflows/performance.yml @@ -31,7 +31,7 @@ jobs: build-args: | ADDON_NAME=design-comuni-plone-theme ADDON_PATH=design-comuni-plone-theme - VOLTO_VERSION=17.18.1 + VOLTO_VERSION=17.18.2 - name: Deploy to rancher uses: redturtle/rancher-deploy-action@v0.2.0 diff --git a/.github/workflows/prs.yml b/.github/workflows/prs.yml index fbed72d17..2b0ab1ab9 100644 --- a/.github/workflows/prs.yml +++ b/.github/workflows/prs.yml @@ -34,4 +34,4 @@ jobs: build-args: | ADDON_NAME=design-comuni-plone-theme ADDON_PATH=design-comuni-plone-theme - VOLTO_VERSION=17.18.1 + VOLTO_VERSION=17.18.2 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d8ca3a958..550f849bd 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -35,4 +35,4 @@ jobs: build-args: | ADDON_NAME=design-comuni-plone-theme ADDON_PATH=design-comuni-plone-theme - VOLTO_VERSION=17.18.1 + VOLTO_VERSION=17.18.2 diff --git a/Makefile b/Makefile index 223e4959c..1fbc8d57c 100644 --- a/Makefile +++ b/Makefile @@ -27,7 +27,7 @@ CURRENT_DIR:=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST)))) # ADDON ?= "design-comuni-plone-theme" PLONE_VERSION=6 -VOLTO_VERSION=17.18.1 +VOLTO_VERSION=17.18.2 ADDON_NAME='design-comuni-plone-theme' ADDON_PATH='design-comuni-plone-theme' diff --git a/package.json b/package.json index 31fbca67b..62f6233c5 100644 --- a/package.json +++ b/package.json @@ -198,7 +198,7 @@ "stylelint-prettier": "4.0.2" }, "peerDependencies": { - "@plone/volto": "17.18.1" + "@plone/volto": "17.18.2" }, "packageManager": "yarn@3.2.3" } diff --git a/yarn.lock b/yarn.lock index 9d4a725d3..b4dca4b73 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8231,7 +8231,7 @@ __metadata: volto-venue: 4.1.0 webpack-image-resize-loader: ^5.0.0 peerDependencies: - "@plone/volto": 17.18.1 + "@plone/volto": 17.18.2 languageName: unknown linkType: soft From 5ea19f65ffeac054e318c77014d4a0bab478415f Mon Sep 17 00:00:00 2001 From: Piero Nicolli Date: Wed, 10 Jul 2024 14:55:43 +0200 Subject: [PATCH 07/17] docs: updated publiccode and release log --- RELEASE.md | 6 +----- publiccode.yml | 4 ++-- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/RELEASE.md b/RELEASE.md index d040475c1..503a4ad94 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -41,7 +41,7 @@ - ... --> -## Versione X.X.X (dd/mm/yyyy) +## Versione 11.16.0 (10/07/2024) ### Migliorie @@ -51,10 +51,6 @@ - Aggiunti due campi nel blocco Form che permettono di configurare un testo per l'intestazione e uno a piè di pagina nella mail inviata. -### Fix - -- ... - ## Versione 11.15.0 (05/07/2024) ### Novità diff --git a/publiccode.yml b/publiccode.yml index 8691a57f1..ff8ab8420 100644 --- a/publiccode.yml +++ b/publiccode.yml @@ -227,9 +227,9 @@ maintenance: name: io-Comune - Il sito AgID per Comuni ed Enti Pubblici platforms: - web -releaseDate: '2024-07-05' +releaseDate: '2024-07-10' softwareType: standalone/web -softwareVersion: 11.15.0 +softwareVersion: 11.16.0 url: 'https://github.com/italia/design-comuni-plone-theme' usedBy: - ASP Comuni Modenesi Area Nord From 27eedb092b065f9ab7380a776ed0bba33f6083a5 Mon Sep 17 00:00:00 2001 From: Piero Nicolli Date: Wed, 10 Jul 2024 14:56:08 +0200 Subject: [PATCH 08/17] chore: release v11.16.0 --- CHANGELOG.md | 18 ++++++++++++++++++ package.json | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 32cb078e6..16ca31066 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,23 @@ +## [11.16.0](https://github.com/RedTurtle/design-comuni-plone-theme/compare/v11.15.0...v11.16.0) (2024-07-10) + + +### Features + +* added date fields to incarico view ([#711](https://github.com/RedTurtle/design-comuni-plone-theme/issues/711)) ([038ef58](https://github.com/RedTurtle/design-comuni-plone-theme/commit/038ef5803af9bcb417fc757bb8ee6a57e065bad7)) +* updated volto-form-block v3.9.2 ([#709](https://github.com/RedTurtle/design-comuni-plone-theme/issues/709)) ([1b9fde0](https://github.com/RedTurtle/design-comuni-plone-theme/commit/1b9fde00f01f646eb27f088e09e662c9c1c8d9d6)) + + +### Bug Fixes + +* update to volto 17.18.2 ([c1ce5ac](https://github.com/RedTurtle/design-comuni-plone-theme/commit/c1ce5ac3239b77b819909e224cbb07f0097230ea)) + + +### Documentation + +* updated publiccode and release log ([5ea19f6](https://github.com/RedTurtle/design-comuni-plone-theme/commit/5ea19f65ffeac054e318c77014d4a0bab478415f)) + ## [11.15.0](https://github.com/RedTurtle/design-comuni-plone-theme/compare/v11.14.0...v11.15.0) (2024-07-05) diff --git a/package.json b/package.json index 62f6233c5..6b85352b9 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "design-comuni-plone-theme", "description": "Volto Theme for Italia design guidelines", "license": "GPL-v3", - "version": "11.15.0", + "version": "11.16.0", "main": "src/index.js", "repository": { "type": "git", From fecf6c25281016e6e893c85bfcdce28e5d5967c7 Mon Sep 17 00:00:00 2001 From: Giulia Ghisini <51911425+giuliaghisini@users.noreply.github.com> Date: Thu, 11 Jul 2024 10:51:36 +0200 Subject: [PATCH 09/17] feat: Site settings to manage title, logo, favicon (#666) * feat: read site data from volto-site-settings * fix: site-settings * chore: updated volto-site-settings * fix: split text in BrandText * chore: volto-site-settings = 0.4.2 * chore: volto-site-settings = 0.4.3 * chore: updated RELEASE.md --------- Co-authored-by: Andrea Cecchi --- RELEASE.md | 6 +++ locales/volto.pot | 2 +- package.json | 6 ++- .../AppExtras/GenericAppExtras.jsx | 7 +--- .../AppExtras/SiteSettingsExtras.jsx | 35 +++++++++++++++++ .../ItaliaTheme/BrandText/BrandText.jsx | 38 +++++++++++++++---- .../BrandTextFooter/BrandTextFooter.jsx | 2 +- .../ItaliaTheme/Header/HeaderCenter.jsx | 12 ++---- .../Header/HeaderSlim/HeaderSlim.jsx | 15 ++++++-- src/components/ItaliaTheme/Logo/Logo.jsx | 22 +++++++---- .../ItaliaTheme/LogoFooter/LogoFooter.jsx | 14 +++++-- .../View/ServizioView/ServizioMetatag.jsx | 10 ++++- src/config/italiaConfig.js | 10 +++++ .../volto/helpers/Html/Html.jsx | 4 +- yarn.lock | 22 ++++++++--- 15 files changed, 157 insertions(+), 48 deletions(-) create mode 100644 src/components/ItaliaTheme/AppExtras/SiteSettingsExtras.jsx diff --git a/RELEASE.md b/RELEASE.md index 503a4ad94..bcb9313d6 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -41,6 +41,12 @@ - ... --> +## Versione x.x.x (dd/MM/yyyy) + +### Novità + +- Ora il titolo, sottotitolo, favicon, logo e logo del footer sono editabili dal pannello di controllo del Sito. Se non impostati, verranno usati quelli definiti dagli sviluppatori. + ## Versione 11.16.0 (10/07/2024) ### Migliorie diff --git a/locales/volto.pot b/locales/volto.pot index 1d8b895ab..3eec80484 100644 --- a/locales/volto.pot +++ b/locales/volto.pot @@ -3337,7 +3337,7 @@ msgid "search_startDate" msgstr "" #: helpers/Translations/searchBlockExtendedTranslations -# defaultMessage: Ricerca per: {searchedtext}. +# defaultMessage: Ricerca per: {searchedtext}. msgid "searchedFor" msgstr "" diff --git a/package.json b/package.json index 6b85352b9..7877ee10c 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,8 @@ "volto-querywidget-with-browser", "@eeacms/volto-taxonomy", "volto-feedback", - "volto-slimheader" + "volto-slimheader", + "volto-site-settings" ], "scripts": { "prepare": "husky install", @@ -158,11 +159,12 @@ "volto-querywidget-with-browser": "0.4.2", "volto-rss-block": "3.0.0", "volto-secondarymenu": "4.1.1", + "volto-site-settings": "0.4.3", "volto-slimheader": "0.1.2", "volto-social-settings": "3.0.0", "volto-subblocks": "2.1.0", "volto-subfooter": "3.1.1", - "volto-subsites": "4.0.1", + "volto-subsites": "4.0.2", "volto-venue": "4.1.0", "webpack-image-resize-loader": "^5.0.0" }, diff --git a/src/components/ItaliaTheme/AppExtras/GenericAppExtras.jsx b/src/components/ItaliaTheme/AppExtras/GenericAppExtras.jsx index 82d2bcfdf..bebd85b86 100644 --- a/src/components/ItaliaTheme/AppExtras/GenericAppExtras.jsx +++ b/src/components/ItaliaTheme/AppExtras/GenericAppExtras.jsx @@ -1,16 +1,13 @@ import React from 'react'; import { useSelector } from 'react-redux'; -import { useIntl } from 'react-intl'; import { useLocation } from 'react-router-dom'; -import { Helmet, BodyClass } from '@plone/volto/helpers'; +import { BodyClass } from '@plone/volto/helpers'; import { RemoveBodyClass } from 'design-comuni-plone-theme/components/ItaliaTheme'; -import { getSiteProperty } from 'design-comuni-plone-theme/helpers'; import ScrollToTop from 'design-comuni-plone-theme/components/ItaliaTheme/ScrollToTop/ScrollToTop'; import { SubsiteLoader } from 'volto-subsites'; import config from '@plone/volto/registry'; const GenericAppExtras = (props) => { - const intl = useIntl(); const location = useLocation(); const subsite = useSelector((state) => state.subsite?.data); @@ -19,7 +16,6 @@ const GenericAppExtras = (props) => { if (subsiteLoadable) { subsiteLoadable.load(); } - const siteTitle = subsite?.title ?? getSiteProperty('siteTitle', intl.locale); const FORCE_PUBLIC_UI = ['/sitemap', '/search']; const isPublicUI = FORCE_PUBLIC_UI.reduce( @@ -29,7 +25,6 @@ const GenericAppExtras = (props) => { return ( <> - {isPublicUI && ( <> diff --git a/src/components/ItaliaTheme/AppExtras/SiteSettingsExtras.jsx b/src/components/ItaliaTheme/AppExtras/SiteSettingsExtras.jsx new file mode 100644 index 000000000..b6d752317 --- /dev/null +++ b/src/components/ItaliaTheme/AppExtras/SiteSettingsExtras.jsx @@ -0,0 +1,35 @@ +/* +CUSTOMIZATIONS: +- get defaultValue from siteProperties +*/ + +import React from 'react'; +import { useIntl } from 'react-intl'; +import { Helmet } from '@plone/volto/helpers'; +import { SiteProperty } from 'volto-site-settings'; +import { getSiteProperty } from 'design-comuni-plone-theme/helpers'; + +const SiteSettingsExtras = (props) => { + const intl = useIntl(); + let siteTitle = SiteProperty({ + property: 'site_title', + getValue: true, + defaultValue: getSiteProperty('siteTitle', intl.locale), + }); + + const parentSiteTitle = SiteProperty({ + property: 'site_title', + getValue: true, + getParent: true, + defaultValue: getSiteProperty('parentSiteTitle', intl.locale), + }); + + if (parentSiteTitle !== siteTitle) { + siteTitle = siteTitle + ' - ' + parentSiteTitle; + } + + siteTitle = siteTitle.replaceAll('\\n', ' - '); + + return ; +}; +export default SiteSettingsExtras; diff --git a/src/components/ItaliaTheme/BrandText/BrandText.jsx b/src/components/ItaliaTheme/BrandText/BrandText.jsx index 2372068a3..8bf4622c6 100644 --- a/src/components/ItaliaTheme/BrandText/BrandText.jsx +++ b/src/components/ItaliaTheme/BrandText/BrandText.jsx @@ -1,18 +1,42 @@ import React from 'react'; import cx from 'classnames'; import { useIntl } from 'react-intl'; +import { SiteProperty } from 'volto-site-settings'; import { getSiteProperty } from 'design-comuni-plone-theme/helpers'; -const BrandText = ({ mobile = false, subsite }) => { +const BrandText = ({ mobile = false, getParent = false }) => { const intl = useIntl(); + let title = SiteProperty({ + property: 'site_title', + defaultValue: getSiteProperty('siteTitle', intl.locale), + getValue: true, + getParent: getParent, + }); + + const description = SiteProperty({ + property: 'site_subtitle', + defaultValue: getSiteProperty('siteSubtitle', intl.locale), + getValue: true, + getParent: getParent, + }); + const titleSplit = title?.split('\n') ?? null; + title = titleSplit?.map((t, i) => ( + <> + {t} + {i < titleSplit.length - 1 &&
} + + )); + return (
-

- {subsite?.title || getSiteProperty('siteTitle', intl.locale)} -

-

- {subsite?.description || getSiteProperty('siteSubtitle', intl.locale)} -

+ {title &&
{title}
} + {description && ( +
+ {description} +
+ )}
); }; diff --git a/src/components/ItaliaTheme/BrandTextFooter/BrandTextFooter.jsx b/src/components/ItaliaTheme/BrandTextFooter/BrandTextFooter.jsx index 104a02cea..bf6c13fa8 100644 --- a/src/components/ItaliaTheme/BrandTextFooter/BrandTextFooter.jsx +++ b/src/components/ItaliaTheme/BrandTextFooter/BrandTextFooter.jsx @@ -2,7 +2,7 @@ import React from 'react'; import { BrandText } from 'design-comuni-plone-theme/components/ItaliaTheme'; const BrandTextFooter = () => { - return ; + return ; }; export default BrandTextFooter; diff --git a/src/components/ItaliaTheme/Header/HeaderCenter.jsx b/src/components/ItaliaTheme/Header/HeaderCenter.jsx index 7637e57a1..745c413aa 100644 --- a/src/components/ItaliaTheme/Header/HeaderCenter.jsx +++ b/src/components/ItaliaTheme/Header/HeaderCenter.jsx @@ -30,14 +30,6 @@ const messages = defineMessages({ const HeaderCenter = () => { const intl = useIntl(); const subsite = useSelector((state) => state.subsite?.data); - const logoSubsite = subsite?.subsite_logo && ( -
- {intl.formatMessage(messages.logoSubsiteAlt)} -
- ); return (
@@ -47,7 +39,9 @@ const HeaderCenter = () => { href={subsite?.['@id'] ? flattenToAppURL(subsite['@id']) : '/'} title={intl.formatMessage(messages.subsiteUniversalLink)} > - {subsite?.subsite_logo ? logoSubsite : } +
diff --git a/src/components/ItaliaTheme/Header/HeaderSlim/HeaderSlim.jsx b/src/components/ItaliaTheme/Header/HeaderSlim/HeaderSlim.jsx index 775e2f06a..cfa0a5436 100644 --- a/src/components/ItaliaTheme/Header/HeaderSlim/HeaderSlim.jsx +++ b/src/components/ItaliaTheme/Header/HeaderSlim/HeaderSlim.jsx @@ -14,6 +14,7 @@ import { } from 'design-react-kit'; import { useIntl } from 'react-intl'; import { getSiteProperty } from 'design-comuni-plone-theme/helpers'; +import { SiteProperty } from 'volto-site-settings'; const HeaderSlim = () => { const subsite = useSelector((state) => state.subsite?.data); @@ -23,9 +24,15 @@ const HeaderSlim = () => { ? '/' : getSiteProperty('parentSiteURL', intl.locale); - const parentSiteTile = subsite - ? getSiteProperty('subsiteParentSiteTitle', intl.locale) - : getSiteProperty('parentSiteTitle', intl.locale); + const staticParentSiteTitle = getSiteProperty('parentSiteTitle', intl.locale); + + const parentSiteTile = SiteProperty({ + property: 'site_title', + forceValue: subsite ? null : staticParentSiteTitle, + defaultValue: staticParentSiteTitle, + getValue: true, + getParent: true, + }); const target = subsite ? null : '_blank'; return ( @@ -37,7 +44,7 @@ const HeaderSlim = () => { target={target} rel="noopener noreferrer" > - {parentSiteTile} + {parentSiteTile.replaceAll('\\n', ' - ')} diff --git a/src/components/ItaliaTheme/Logo/Logo.jsx b/src/components/ItaliaTheme/Logo/Logo.jsx index cfb885a43..d81a32ff4 100644 --- a/src/components/ItaliaTheme/Logo/Logo.jsx +++ b/src/components/ItaliaTheme/Logo/Logo.jsx @@ -10,9 +10,10 @@ * Note the icon class. */ -/* SVG example */ -// import { Icon } from 'design-comuni-plone-theme/components/ItaliaTheme'; -// const Logo = () => ; +/* SVG example + import { Icon } from 'design-comuni-plone-theme/components/ItaliaTheme'; + const Logo = () => ; +*/ /* PNG example using https://www.npmjs.com/package/webpack-image-resize-loader * * works, but some issues with prettier and jest @@ -20,9 +21,16 @@ // eslint-disable-next-line import/no-unresolved //import logo from './logo.png?width=164'; import logo from './logo.png'; +import { SiteProperty } from 'volto-site-settings'; -const Logo = () => ( - Logo -); - +const Logo = ({ alt = 'Logo' }) => { + return ( + + ); +}; export default Logo; diff --git a/src/components/ItaliaTheme/LogoFooter/LogoFooter.jsx b/src/components/ItaliaTheme/LogoFooter/LogoFooter.jsx index afea16624..62ead62a1 100644 --- a/src/components/ItaliaTheme/LogoFooter/LogoFooter.jsx +++ b/src/components/ItaliaTheme/LogoFooter/LogoFooter.jsx @@ -12,9 +12,17 @@ // eslint-disable-next-line import/no-unresolved import logo from '../Logo/logo.png'; +import { SiteProperty } from 'volto-site-settings'; -const LogoFooter = () => ( - Logo -); +const LogoFooter = () => { + return ( + + ); +}; export default LogoFooter; diff --git a/src/components/ItaliaTheme/View/ServizioView/ServizioMetatag.jsx b/src/components/ItaliaTheme/View/ServizioView/ServizioMetatag.jsx index c69b858ba..ce9be0f2b 100644 --- a/src/components/ItaliaTheme/View/ServizioView/ServizioMetatag.jsx +++ b/src/components/ItaliaTheme/View/ServizioView/ServizioMetatag.jsx @@ -1,4 +1,6 @@ +import { useIntl } from 'react-intl'; import { Helmet, toPublicURL, isInternalURL } from '@plone/volto/helpers'; +import { SiteProperty } from 'volto-site-settings'; import { getSiteProperty } from 'design-comuni-plone-theme/helpers'; import { richTextHasContent } from 'design-comuni-plone-theme/components/ItaliaTheme/View'; @@ -13,7 +15,13 @@ const fieldDataToPlainText = (field) => { }; const ServizioMetatag = ({ content }) => { - const siteTitle = getSiteProperty('siteTitle'); + const intl = useIntl(); + let siteTitle = SiteProperty({ + property: 'site_title', + getValue: true, + defaultTitle: getSiteProperty('siteTitle', intl.locale), + }); + siteTitle = siteTitle.replaceAll('\\n', ' - '); const schemaOrg = { '@context': 'https://schema.org', diff --git a/src/config/italiaConfig.js b/src/config/italiaConfig.js index 04388f85a..e652516d6 100644 --- a/src/config/italiaConfig.js +++ b/src/config/italiaConfig.js @@ -35,6 +35,8 @@ import GenericAppExtras from 'design-comuni-plone-theme/components/ItaliaTheme/A import PageLoader from 'design-comuni-plone-theme/components/ItaliaTheme/AppExtras/PageLoader'; import TrackFocus from 'design-comuni-plone-theme/components/ItaliaTheme/AppExtras/TrackFocus'; import redraft from 'redraft'; + +import SiteSettingsExtras from 'design-comuni-plone-theme/components/ItaliaTheme/AppExtras/SiteSettingsExtras'; import { loadables as ItaliaLoadables } from 'design-comuni-plone-theme/config/loadables'; // CTs icons @@ -298,6 +300,10 @@ export default function applyConfig(voltoConfig) { match: '', component: TrackFocus, }, + { + match: '', + component: SiteSettingsExtras, + }, ], maxFileUploadSize: null, 'volto-blocks-widget': { @@ -518,6 +524,10 @@ export default function applyConfig(voltoConfig) { ...config.components, BlockExtraTags: { component: () => null }, }; + config.registerComponent({ + name: 'SiteSettingsExtras', + component: SiteSettingsExtras, + }); // REDUCERS config.addonReducers = { diff --git a/src/customizations/volto/helpers/Html/Html.jsx b/src/customizations/volto/helpers/Html/Html.jsx index aad254fb7..9d0036720 100644 --- a/src/customizations/volto/helpers/Html/Html.jsx +++ b/src/customizations/volto/helpers/Html/Html.jsx @@ -4,7 +4,7 @@ */ /* CUSTOMIZATIONS: - - Add + - Rimosso perchè creato da volto-site-settings - Add shrink-to-fit=no in viewport meta - Remove link for manifest and svg/apple icons */ @@ -122,7 +122,7 @@ class Html extends Component { })};`, }} /> - + {/* */} =16.0.0-alpha.38" - checksum: 0796a9f77c2a4666898ecc6d23af3d7c15afe9053a6ea2f690db0cb93082327143225f02620591033b335b94f0fa7f78fed458157cdb1142cf47739e5678b8ae + checksum: 77408b4ea19f9ca4d659544b2ddc87fb0a62e64eeba3a6fa6a3e9acd62b1f23fe5a31c0d483d2486016fdbe88e153b835150cc85318f06e0a4f113d8ac934b42 languageName: node linkType: hard From cd96ee0c77e2bb91225528db7c85ffdf824f66d5 Mon Sep 17 00:00:00 2001 From: sabrina-bongiovanni <116291154+sabrina-bongiovanni@users.noreply.github.com> Date: Fri, 12 Jul 2024 17:41:38 +0200 Subject: [PATCH 10/17] fix: added check for subsite to path in venue query for events search filter (#718) --- RELEASE.md | 4 ++++ .../ItaliaTheme/Blocks/EventSearch/DefaultFilters.js | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/RELEASE.md b/RELEASE.md index bcb9313d6..4f9b70bc1 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -47,6 +47,10 @@ - Ora il titolo, sottotitolo, favicon, logo e logo del footer sono editabili dal pannello di controllo del Sito. Se non impostati, verranno usati quelli definiti dagli sviluppatori. +### Fix + +- Ripristinato il funzionamento del filtro luogo nella ricerca eventi. + ## Versione 11.16.0 (10/07/2024) ### Migliorie diff --git a/src/components/ItaliaTheme/Blocks/EventSearch/DefaultFilters.js b/src/components/ItaliaTheme/Blocks/EventSearch/DefaultFilters.js index 2fcced8e4..99e926332 100644 --- a/src/components/ItaliaTheme/Blocks/EventSearch/DefaultFilters.js +++ b/src/components/ItaliaTheme/Blocks/EventSearch/DefaultFilters.js @@ -36,6 +36,8 @@ const DefaultFilters = () => { const intl = useIntl(); moment.locale(intl.locale); const subsite = useSelector((state) => state.subsite?.data); + const isSubsiteValid = subsite && Object.keys(subsite).length > 0; + const path = isSubsiteValid ? flattenToAppURL(subsite['@id']) : '/'; return { text_filter: { @@ -68,7 +70,7 @@ const DefaultFilters = () => { isSearchable: true, options: { dispatch: { - path: subsite ? flattenToAppURL(subsite['@id']) : '/', + path: path, portal_types: ['Venue'], fullobjects: 0, b_size: 10000, From f1869233022ba4372b78c8b404034b1e97b708e2 Mon Sep 17 00:00:00 2001 From: Piero Nicolli Date: Mon, 15 Jul 2024 13:07:09 +0200 Subject: [PATCH 11/17] fix: backward compatibility for new site settings panel --- locales/volto.pot | 4 +- .../ItaliaTheme/BrandText/BrandText.jsx | 44 +++++++++++-------- .../ItaliaTheme/Header/HeaderCenter.jsx | 9 ++-- .../Header/HeaderSlim/HeaderSlim.jsx | 24 ++++++---- src/components/ItaliaTheme/Logo/Logo.jsx | 4 +- .../View/ServizioView/ServizioMetatag.jsx | 14 +++--- .../theme/Navigation/Navigation.jsx | 11 ++--- 7 files changed, 67 insertions(+), 43 deletions(-) diff --git a/locales/volto.pot b/locales/volto.pot index 3eec80484..713ffa9bd 100644 --- a/locales/volto.pot +++ b/locales/volto.pot @@ -1,7 +1,7 @@ msgid "" msgstr "" "Project-Id-Version: Plone\n" -"POT-Creation-Date: 2024-06-25T15:14:34.369Z\n" +"POT-Creation-Date: 2024-07-15T11:07:19.251Z\n" "Last-Translator: Plone i18n \n" "Language-Team: Plone i18n \n" "MIME-Version: 1.0\n" @@ -3337,7 +3337,7 @@ msgid "search_startDate" msgstr "" #: helpers/Translations/searchBlockExtendedTranslations -# defaultMessage: Ricerca per: {searchedtext}. +# defaultMessage: Ricerca per: {searchedtext}. msgid "searchedFor" msgstr "" diff --git a/src/components/ItaliaTheme/BrandText/BrandText.jsx b/src/components/ItaliaTheme/BrandText/BrandText.jsx index 8bf4622c6..99a9804a8 100644 --- a/src/components/ItaliaTheme/BrandText/BrandText.jsx +++ b/src/components/ItaliaTheme/BrandText/BrandText.jsx @@ -4,21 +4,31 @@ import { useIntl } from 'react-intl'; import { SiteProperty } from 'volto-site-settings'; import { getSiteProperty } from 'design-comuni-plone-theme/helpers'; -const BrandText = ({ mobile = false, getParent = false }) => { +const BrandText = ({ mobile = false, subsite, getParent = false }) => { const intl = useIntl(); - let title = SiteProperty({ - property: 'site_title', - defaultValue: getSiteProperty('siteTitle', intl.locale), - getValue: true, - getParent: getParent, - }); + // TODO DEPRECATED: remove and only use SiteProperty + const deprecatedSiteTitle = + subsite?.title || getSiteProperty('siteTitle', intl.locale); + let title = + deprecatedSiteTitle || + SiteProperty({ + property: 'site_title', + defaultValue: getSiteProperty('siteTitle', intl.locale), + getValue: true, + getParent: getParent, + }); - const description = SiteProperty({ - property: 'site_subtitle', - defaultValue: getSiteProperty('siteSubtitle', intl.locale), - getValue: true, - getParent: getParent, - }); + // TODO DEPRECATED: remove and only use SiteProperty + const deprecatedSiteSubtitle = + subsite?.description || getSiteProperty('siteSubtitle', intl.locale); + const description = + deprecatedSiteSubtitle || + SiteProperty({ + property: 'site_subtitle', + defaultValue: getSiteProperty('siteSubtitle', intl.locale), + getValue: true, + getParent: getParent, + }); const titleSplit = title?.split('\n') ?? null; title = titleSplit?.map((t, i) => ( <> @@ -29,13 +39,11 @@ const BrandText = ({ mobile = false, getParent = false }) => { return (
- {title &&
{title}
} + {title &&

{title}

} {description && ( -
+

{description} -

+

)}
); diff --git a/src/components/ItaliaTheme/Header/HeaderCenter.jsx b/src/components/ItaliaTheme/Header/HeaderCenter.jsx index 745c413aa..5f8ecd4c0 100644 --- a/src/components/ItaliaTheme/Header/HeaderCenter.jsx +++ b/src/components/ItaliaTheme/Header/HeaderCenter.jsx @@ -30,6 +30,11 @@ const messages = defineMessages({ const HeaderCenter = () => { const intl = useIntl(); const subsite = useSelector((state) => state.subsite?.data); + const logoSubsite = subsite?.subsite_logo && ( +
+ +
+ ); return (
@@ -39,9 +44,7 @@ const HeaderCenter = () => { href={subsite?.['@id'] ? flattenToAppURL(subsite['@id']) : '/'} title={intl.formatMessage(messages.subsiteUniversalLink)} > - + {subsite?.subsite_logo ? logoSubsite : }
diff --git a/src/components/ItaliaTheme/Header/HeaderSlim/HeaderSlim.jsx b/src/components/ItaliaTheme/Header/HeaderSlim/HeaderSlim.jsx index cfa0a5436..2e2c76461 100644 --- a/src/components/ItaliaTheme/Header/HeaderSlim/HeaderSlim.jsx +++ b/src/components/ItaliaTheme/Header/HeaderSlim/HeaderSlim.jsx @@ -26,13 +26,20 @@ const HeaderSlim = () => { const staticParentSiteTitle = getSiteProperty('parentSiteTitle', intl.locale); - const parentSiteTile = SiteProperty({ - property: 'site_title', - forceValue: subsite ? null : staticParentSiteTitle, - defaultValue: staticParentSiteTitle, - getValue: true, - getParent: true, - }); + // TODO DEPRECATED use only SiteProperty + const deprecatedSubsiteParentSiteTitle = getSiteProperty( + 'subsiteParentSiteTitle', + intl.locale, + ); + + const parentSiteTitle = + deprecatedSubsiteParentSiteTitle || + SiteProperty({ + property: 'site_title', + defaultValue: getSiteProperty('subsiteParentSiteTitle', intl.locale), + getValue: true, + getParent: true, + }); const target = subsite ? null : '_blank'; return ( @@ -44,7 +51,8 @@ const HeaderSlim = () => { target={target} rel="noopener noreferrer" > - {parentSiteTile.replaceAll('\\n', ' - ')} + {!subsite && staticParentSiteTitle} + {subsite && parentSiteTitle.replaceAll('\\n', ' - ')} diff --git a/src/components/ItaliaTheme/Logo/Logo.jsx b/src/components/ItaliaTheme/Logo/Logo.jsx index d81a32ff4..1121e0a26 100644 --- a/src/components/ItaliaTheme/Logo/Logo.jsx +++ b/src/components/ItaliaTheme/Logo/Logo.jsx @@ -23,12 +23,12 @@ import logo from './logo.png'; import { SiteProperty } from 'volto-site-settings'; -const Logo = ({ alt = 'Logo' }) => { +const Logo = ({ alt = 'Logo', className }) => { return ( ); diff --git a/src/components/ItaliaTheme/View/ServizioView/ServizioMetatag.jsx b/src/components/ItaliaTheme/View/ServizioView/ServizioMetatag.jsx index ce9be0f2b..cb301df8c 100644 --- a/src/components/ItaliaTheme/View/ServizioView/ServizioMetatag.jsx +++ b/src/components/ItaliaTheme/View/ServizioView/ServizioMetatag.jsx @@ -16,11 +16,15 @@ const fieldDataToPlainText = (field) => { const ServizioMetatag = ({ content }) => { const intl = useIntl(); - let siteTitle = SiteProperty({ - property: 'site_title', - getValue: true, - defaultTitle: getSiteProperty('siteTitle', intl.locale), - }); + // TODO DEPRECATED use only SiteProperty + const deprecatedSiteTitle = getSiteProperty('siteTitle', intl.locale); + let siteTitle = + deprecatedSiteTitle || + SiteProperty({ + property: 'site_title', + getValue: true, + defaultTitle: getSiteProperty('siteTitle', intl.locale), + }); siteTitle = siteTitle.replaceAll('\\n', ' - '); const schemaOrg = { diff --git a/src/customizations/volto/components/theme/Navigation/Navigation.jsx b/src/customizations/volto/components/theme/Navigation/Navigation.jsx index f69231d45..d73f1f2e8 100644 --- a/src/customizations/volto/components/theme/Navigation/Navigation.jsx +++ b/src/customizations/volto/components/theme/Navigation/Navigation.jsx @@ -38,10 +38,7 @@ const Navigation = ({ pathname }) => { const subsite = useSelector((state) => state.subsite?.data); const logoSubsite = subsite?.subsite_logo && (
- Logo +
); @@ -136,7 +133,11 @@ const Navigation = ({ pathname }) => { } onClick={() => setCollapseOpen(false)} > - {subsite?.subsite_logo ? logoSubsite : } + {subsite?.subsite_logo ? ( + logoSubsite + ) : ( + + )}
From 5b0f8099ec411a86d63c0a755451615f28238f3c Mon Sep 17 00:00:00 2001 From: Giulia Ghisini <51911425+giuliaghisini@users.noreply.github.com> Date: Tue, 16 Jul 2024 15:45:07 +0200 Subject: [PATCH 12/17] fix: home link per languageRootFoolder (#724) * fix: home link per languageRootFoolder * fix: remove useSelector, use useIntl --- .../ItaliaTheme/Breadcrumbs/Breadcrumbs.jsx | 4 +++- .../ItaliaTheme/Footer/FooterInfos.jsx | 6 ++++-- src/components/ItaliaTheme/Footer/FooterMain.jsx | 8 ++++---- .../ItaliaTheme/Footer/FooterSmall.jsx | 15 ++++++++++----- .../ItaliaTheme/Header/HeaderCenter.jsx | 4 +++- .../ItaliaTheme/Header/HeaderSlim/HeaderSlim.jsx | 9 ++++++--- .../ItaliaTheme/Header/ParentSiteMenu.jsx | 4 +++- src/helpers/index.js | 1 + src/helpers/url.js | 16 ++++++++++++++++ 9 files changed, 50 insertions(+), 17 deletions(-) create mode 100644 src/helpers/url.js diff --git a/src/components/ItaliaTheme/Breadcrumbs/Breadcrumbs.jsx b/src/components/ItaliaTheme/Breadcrumbs/Breadcrumbs.jsx index e955795e1..1f48981ca 100644 --- a/src/components/ItaliaTheme/Breadcrumbs/Breadcrumbs.jsx +++ b/src/components/ItaliaTheme/Breadcrumbs/Breadcrumbs.jsx @@ -21,6 +21,7 @@ import { import { UniversalLink } from '@plone/volto/components'; import { Row, Col, BreadcrumbItem } from 'design-react-kit'; import GoogleBreadcrumbs from 'design-comuni-plone-theme/components/ItaliaTheme/Breadcrumbs/GoogleBreadcrumbs'; +import { useHomePath } from 'design-comuni-plone-theme/helpers'; import config from '@plone/volto/registry'; const messages = defineMessages({ @@ -98,6 +99,7 @@ const Breadcrumbs = ({ pathname }) => { items = []; } } + const homepath = useHomePath(); return items?.length > 0 ? ( <> @@ -110,7 +112,7 @@ const Breadcrumbs = ({ pathname }) => { >
    - + {intl.formatMessage(messages.home)} / diff --git a/src/components/ItaliaTheme/Footer/FooterInfos.jsx b/src/components/ItaliaTheme/Footer/FooterInfos.jsx index e395937c1..00e9a8e2e 100644 --- a/src/components/ItaliaTheme/Footer/FooterInfos.jsx +++ b/src/components/ItaliaTheme/Footer/FooterInfos.jsx @@ -17,6 +17,8 @@ import { FooterSocials, } from 'design-comuni-plone-theme/components/ItaliaTheme'; +import { useHomePath } from 'design-comuni-plone-theme/helpers'; + const messages = defineMessages({ goToPage: { id: 'Vai alla pagina', @@ -29,7 +31,7 @@ const FooterInfos = () => { const N_COLUMNS = 4; const location = useLocation(); const dispatch = useDispatch(); - + const homepath = useHomePath(); const footerConfiguration = useSelector( (state) => state.editableFooterColumns?.result, ); @@ -41,7 +43,7 @@ const FooterInfos = () => { //filter rootpaths const footerColumns = getItemsByPath( footerConfiguration, - location?.pathname?.length ? location.pathname : '/', + location?.pathname?.length ? location.pathname : homepath, ); const colWidth = diff --git a/src/components/ItaliaTheme/Footer/FooterMain.jsx b/src/components/ItaliaTheme/Footer/FooterMain.jsx index 48d68f871..54fd0fe26 100644 --- a/src/components/ItaliaTheme/Footer/FooterMain.jsx +++ b/src/components/ItaliaTheme/Footer/FooterMain.jsx @@ -7,6 +7,7 @@ import React from 'react'; import { Container, Row, Col } from 'design-react-kit'; import { UniversalLink } from '@plone/volto/components'; +import { FooterTop } from 'volto-editablefooter'; import { FooterNavigation, FooterInfos, @@ -14,8 +15,7 @@ import { BrandTextFooter, FooterPNRRLogo, } from 'design-comuni-plone-theme/components/ItaliaTheme/'; - -import { FooterTop } from 'volto-editablefooter'; +import { useHomePath } from 'design-comuni-plone-theme/helpers'; /** * FooterMain component class. @@ -24,7 +24,7 @@ import { FooterTop } from 'volto-editablefooter'; */ const FooterMain = () => { const footerTopContent = FooterTop(); - + const homepath = useHomePath(); return (
    @@ -35,7 +35,7 @@ const FooterMain = () => { {footerTopContent ?? ( <> - + diff --git a/src/components/ItaliaTheme/Footer/FooterSmall.jsx b/src/components/ItaliaTheme/Footer/FooterSmall.jsx index 998509fdf..a1dab5854 100644 --- a/src/components/ItaliaTheme/Footer/FooterSmall.jsx +++ b/src/components/ItaliaTheme/Footer/FooterSmall.jsx @@ -5,15 +5,18 @@ import React, { useEffect } from 'react'; import cx from 'classnames'; -import { UniversalLink } from '@plone/volto/components'; import { defineMessages, useIntl } from 'react-intl'; import { Container } from 'design-react-kit'; -import { getSiteProperty } from 'design-comuni-plone-theme/helpers'; import { useLocation } from 'react-router-dom'; import { useDispatch, useSelector } from 'react-redux'; import { getSubFooter, getItemsByPath } from 'volto-subfooter'; -import { flattenToAppURL } from '@plone/volto/helpers'; import { displayBanner } from 'volto-gdpr-privacy'; +import { UniversalLink } from '@plone/volto/components'; +import { flattenToAppURL } from '@plone/volto/helpers'; +import { + getSiteProperty, + useHomePath, +} from 'design-comuni-plone-theme/helpers'; const messages = defineMessages({ goToPage: { @@ -35,7 +38,7 @@ const FooterSmall = () => { const intl = useIntl(); const pathname = useLocation().pathname; const dispatch = useDispatch(); - + const homepath = useHomePath(); const subFooter = useSelector((state) => state.subFooter?.result); const subFooterItems = getItemsByPath(subFooter, pathname)?.filter( (item) => item.visible, @@ -54,7 +57,9 @@ const FooterSmall = () => { {subFooterItems?.length > 0 && subFooterItems.map((item, index) => { let url = - item.href || flattenToAppURL(item.linkUrl?.[0]?.['@id']) || '/'; + item.href || + flattenToAppURL(item.linkUrl?.[0]?.['@id']) || + homepath; return (
  1. { ); + const homepath = useHomePath(); return (
    {subsite?.subsite_logo ? logoSubsite : } diff --git a/src/components/ItaliaTheme/Header/HeaderSlim/HeaderSlim.jsx b/src/components/ItaliaTheme/Header/HeaderSlim/HeaderSlim.jsx index 2e2c76461..a265d9501 100644 --- a/src/components/ItaliaTheme/Header/HeaderSlim/HeaderSlim.jsx +++ b/src/components/ItaliaTheme/Header/HeaderSlim/HeaderSlim.jsx @@ -13,15 +13,18 @@ import { HeaderRightZone, } from 'design-react-kit'; import { useIntl } from 'react-intl'; -import { getSiteProperty } from 'design-comuni-plone-theme/helpers'; +import { + getSiteProperty, + useHomePath, +} from 'design-comuni-plone-theme/helpers'; import { SiteProperty } from 'volto-site-settings'; const HeaderSlim = () => { const subsite = useSelector((state) => state.subsite?.data); const intl = useIntl(); - + const homepath = useHomePath(); const parentSiteURL = subsite - ? '/' + ? homepath : getSiteProperty('parentSiteURL', intl.locale); const staticParentSiteTitle = getSiteProperty('parentSiteTitle', intl.locale); diff --git a/src/components/ItaliaTheme/Header/ParentSiteMenu.jsx b/src/components/ItaliaTheme/Header/ParentSiteMenu.jsx index 15ddde162..a4f0b86ab 100644 --- a/src/components/ItaliaTheme/Header/ParentSiteMenu.jsx +++ b/src/components/ItaliaTheme/Header/ParentSiteMenu.jsx @@ -8,12 +8,14 @@ import { useSelector } from 'react-redux'; import { Link } from 'react-router-dom'; import { flattenToAppURL } from '@plone/volto/helpers'; import { Nav, NavItem, NavLink } from 'design-react-kit'; +import { useHomePath } from 'design-comuni-plone-theme/helpers'; const ParentSiteMenu = () => { const dropdownMenu = useSelector( (state) => state.dropdownMenuNavItems?.result, ); const subsite = useSelector((state) => state.subsite?.data); + const homepath = useHomePath(); let menu = null; if (subsite) { @@ -23,7 +25,7 @@ const ParentSiteMenu = () => { let i = url_split.length - 1; while (i > 0) { let s = url_split.slice(0, i).join('/'); - s = s.length === 0 ? '/' : s; + s = s.length === 0 ? homepath : s; // eslint-disable-next-line no-loop-func dropdownMenu.forEach((m) => { if (m.rootPath === s) { diff --git a/src/helpers/index.js b/src/helpers/index.js index 2bab245b6..31985080c 100644 --- a/src/helpers/index.js +++ b/src/helpers/index.js @@ -52,3 +52,4 @@ export { export { commonSearchBlockMessages } from 'design-comuni-plone-theme/helpers/Translations/searchBlockExtendedTranslations'; export { getComponentWithFallback } from 'design-comuni-plone-theme/helpers/registry'; +export { useHomePath } from 'design-comuni-plone-theme/helpers/url'; diff --git a/src/helpers/url.js b/src/helpers/url.js new file mode 100644 index 000000000..e65747d20 --- /dev/null +++ b/src/helpers/url.js @@ -0,0 +1,16 @@ +import { useState, useEffect } from 'react'; +import { useLocation } from 'react-router-dom'; +import { useIntl } from 'react-intl'; + +import config from '@plone/volto/registry'; + +export const useHomePath = () => { + const [path, setPath] = useState('/'); + + const { locale } = useIntl(); + + useEffect(() => { + setPath(config.settings.isMultilingual ? '/' + locale : '/'); + }, [locale]); + return path; +}; From a116542fa741193fe754417e3cd777a2b7c375eb Mon Sep 17 00:00:00 2001 From: Giulia Ghisini <51911425+giuliaghisini@users.noreply.github.com> Date: Tue, 16 Jul 2024 15:48:18 +0200 Subject: [PATCH 13/17] fix: blocks widget table block toolbar position (#716) --- src/theme/_cms-ui.scss | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/theme/_cms-ui.scss b/src/theme/_cms-ui.scss index 693856308..67d9c1cb0 100644 --- a/src/theme/_cms-ui.scss +++ b/src/theme/_cms-ui.scss @@ -94,6 +94,12 @@ body.cms-ui { } } + .blocks-widget-container { + .block.table .toolbar { + top: -3.34rem; + } + } + .it-header-wrapper, .public-ui { font-size: 18px; From 4eb0c8d630bec8cb830a1903d4f3d6643a1dd2a4 Mon Sep 17 00:00:00 2001 From: Piero Nicolli Date: Tue, 16 Jul 2024 15:50:43 +0200 Subject: [PATCH 14/17] fix: better variables naming and resolved minor warnings --- src/components/ItaliaTheme/Blocks/Listing/SliderTemplate.jsx | 5 +++-- src/components/ItaliaTheme/BrandText/BrandText.jsx | 4 ++-- src/components/ItaliaTheme/Header/HeaderSlim/HeaderSlim.jsx | 4 ++-- src/components/ItaliaTheme/Slider/NextArrow.jsx | 2 +- src/components/ItaliaTheme/Slider/PrevArrow.jsx | 2 +- 5 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/components/ItaliaTheme/Blocks/Listing/SliderTemplate.jsx b/src/components/ItaliaTheme/Blocks/Listing/SliderTemplate.jsx index f32276190..ef95ed4b8 100644 --- a/src/components/ItaliaTheme/Blocks/Listing/SliderTemplate.jsx +++ b/src/components/ItaliaTheme/Blocks/Listing/SliderTemplate.jsx @@ -41,7 +41,7 @@ const messages = defineMessages({ const Slide = (props) => { const intl = useIntl(); - const { item, index, appearance, appearanceProp, onKeyDown } = props; + const { index, appearance, appearanceProp, onKeyDown } = props; const appearances = config.blocks.blocksConfig.listing.variations.filter( (v) => v.id === 'slider', @@ -50,7 +50,6 @@ const Slide = (props) => { return ( 0 ? index - 1 : null; return ( { }); const titleSplit = title?.split('\n') ?? null; title = titleSplit?.map((t, i) => ( - <> + {t} {i < titleSplit.length - 1 &&
    } - +
    )); return ( diff --git a/src/components/ItaliaTheme/Header/HeaderSlim/HeaderSlim.jsx b/src/components/ItaliaTheme/Header/HeaderSlim/HeaderSlim.jsx index a265d9501..1cea40da5 100644 --- a/src/components/ItaliaTheme/Header/HeaderSlim/HeaderSlim.jsx +++ b/src/components/ItaliaTheme/Header/HeaderSlim/HeaderSlim.jsx @@ -35,7 +35,7 @@ const HeaderSlim = () => { intl.locale, ); - const parentSiteTitle = + const subsiteParentSiteTitle = deprecatedSubsiteParentSiteTitle || SiteProperty({ property: 'site_title', @@ -55,7 +55,7 @@ const HeaderSlim = () => { rel="noopener noreferrer" > {!subsite && staticParentSiteTitle} - {subsite && parentSiteTitle.replaceAll('\\n', ' - ')} + {subsite && subsiteParentSiteTitle.replaceAll('\\n', ' - ')} diff --git a/src/components/ItaliaTheme/Slider/NextArrow.jsx b/src/components/ItaliaTheme/Slider/NextArrow.jsx index fc89acce1..15b2db963 100644 --- a/src/components/ItaliaTheme/Slider/NextArrow.jsx +++ b/src/components/ItaliaTheme/Slider/NextArrow.jsx @@ -25,7 +25,7 @@ export default function NextArrow(props) { id={id} > - {_title} + {_title} ); } diff --git a/src/components/ItaliaTheme/Slider/PrevArrow.jsx b/src/components/ItaliaTheme/Slider/PrevArrow.jsx index a5d57749c..593888a21 100644 --- a/src/components/ItaliaTheme/Slider/PrevArrow.jsx +++ b/src/components/ItaliaTheme/Slider/PrevArrow.jsx @@ -27,7 +27,7 @@ export default function PrevArrow(props) { onKeyDown={onKeyDown} > - {_title} + {_title} ); } From c67a574480053edd493d54729489b2e58e301323 Mon Sep 17 00:00:00 2001 From: Piero Nicolli Date: Tue, 16 Jul 2024 16:01:13 +0200 Subject: [PATCH 15/17] chore: resolve linting issue --- src/helpers/url.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/helpers/url.js b/src/helpers/url.js index e65747d20..dadefd11d 100644 --- a/src/helpers/url.js +++ b/src/helpers/url.js @@ -1,5 +1,4 @@ import { useState, useEffect } from 'react'; -import { useLocation } from 'react-router-dom'; import { useIntl } from 'react-intl'; import config from '@plone/volto/registry'; From f7becf81ef119ce1dc9c5b1138dd77e71a5c1754 Mon Sep 17 00:00:00 2001 From: Piero Nicolli Date: Tue, 16 Jul 2024 17:04:34 +0200 Subject: [PATCH 16/17] docs: updated publiccode and release log --- RELEASE.md | 2 +- publiccode.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/RELEASE.md b/RELEASE.md index 4f9b70bc1..9b3f1d308 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -41,7 +41,7 @@ - ... --> -## Versione x.x.x (dd/MM/yyyy) +## Versione 11.17.0 (16/07/2024) ### Novità diff --git a/publiccode.yml b/publiccode.yml index ff8ab8420..366f863a8 100644 --- a/publiccode.yml +++ b/publiccode.yml @@ -227,9 +227,9 @@ maintenance: name: io-Comune - Il sito AgID per Comuni ed Enti Pubblici platforms: - web -releaseDate: '2024-07-10' +releaseDate: '2024-07-16' softwareType: standalone/web -softwareVersion: 11.16.0 +softwareVersion: 11.17.0 url: 'https://github.com/italia/design-comuni-plone-theme' usedBy: - ASP Comuni Modenesi Area Nord From d95bcb81e6abfebdf6b8107178a599e605b9c10f Mon Sep 17 00:00:00 2001 From: Piero Nicolli Date: Tue, 16 Jul 2024 17:05:14 +0200 Subject: [PATCH 17/17] chore: release v11.17.0 --- CHANGELOG.md | 26 ++++++++++++++++++++++++++ package.json | 2 +- 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 16ca31066..fe49d59b9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,31 @@ +## [11.17.0](https://github.com/RedTurtle/design-comuni-plone-theme/compare/v11.16.0...v11.17.0) (2024-07-16) + + +### Features + +* Site settings to manage title, logo, favicon ([#666](https://github.com/RedTurtle/design-comuni-plone-theme/issues/666)) ([fecf6c2](https://github.com/RedTurtle/design-comuni-plone-theme/commit/fecf6c25281016e6e893c85bfcdce28e5d5967c7)) + + +### Bug Fixes + +* added check for subsite to path in venue query for events search filter ([#718](https://github.com/RedTurtle/design-comuni-plone-theme/issues/718)) ([cd96ee0](https://github.com/RedTurtle/design-comuni-plone-theme/commit/cd96ee0c77e2bb91225528db7c85ffdf824f66d5)) +* backward compatibility for new site settings panel ([f186923](https://github.com/RedTurtle/design-comuni-plone-theme/commit/f1869233022ba4372b78c8b404034b1e97b708e2)) +* better variables naming and resolved minor warnings ([4eb0c8d](https://github.com/RedTurtle/design-comuni-plone-theme/commit/4eb0c8d630bec8cb830a1903d4f3d6643a1dd2a4)) +* blocks widget table block toolbar position ([#716](https://github.com/RedTurtle/design-comuni-plone-theme/issues/716)) ([a116542](https://github.com/RedTurtle/design-comuni-plone-theme/commit/a116542fa741193fe754417e3cd777a2b7c375eb)) +* home link per languageRootFoolder ([#724](https://github.com/RedTurtle/design-comuni-plone-theme/issues/724)) ([5b0f809](https://github.com/RedTurtle/design-comuni-plone-theme/commit/5b0f8099ec411a86d63c0a755451615f28238f3c)) + + +### Maintenance + +* resolve linting issue ([c67a574](https://github.com/RedTurtle/design-comuni-plone-theme/commit/c67a574480053edd493d54729489b2e58e301323)) + + +### Documentation + +* updated publiccode and release log ([f7becf8](https://github.com/RedTurtle/design-comuni-plone-theme/commit/f7becf81ef119ce1dc9c5b1138dd77e71a5c1754)) + ## [11.16.0](https://github.com/RedTurtle/design-comuni-plone-theme/compare/v11.15.0...v11.16.0) (2024-07-10) diff --git a/package.json b/package.json index 7877ee10c..27c911162 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "design-comuni-plone-theme", "description": "Volto Theme for Italia design guidelines", "license": "GPL-v3", - "version": "11.16.0", + "version": "11.17.0", "main": "src/index.js", "repository": { "type": "git",