From c6d4cb6b51447514fedf2938f40031e42779644e Mon Sep 17 00:00:00 2001 From: Giulia Ghisini <51911425+giuliaghisini@users.noreply.github.com> Date: Tue, 19 Mar 2024 11:49:32 +0100 Subject: [PATCH 01/16] fix: updated volto-querywidget-with-browser to fix infinite loops on lost reference (#599) --- package.json | 2 +- yarn.lock | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 2d21bbb80..1bbf984b9 100644 --- a/package.json +++ b/package.json @@ -150,7 +150,7 @@ "volto-gdpr-privacy": "2.1.1", "volto-google-analytics": "2.0.0", "volto-multilingual-widget": "3.0.0", - "volto-querywidget-with-browser": "0.4.1", + "volto-querywidget-with-browser": "0.4.2", "volto-rss-block": "3.0.0", "volto-secondarymenu": "4.0.0", "volto-social-settings": "3.0.0", diff --git a/yarn.lock b/yarn.lock index fa26d7336..85bfa0559 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6580,7 +6580,7 @@ __metadata: volto-gdpr-privacy: 2.1.1 volto-google-analytics: 2.0.0 volto-multilingual-widget: 3.0.0 - volto-querywidget-with-browser: 0.4.1 + volto-querywidget-with-browser: 0.4.2 volto-rss-block: 3.0.0 volto-secondarymenu: 4.0.0 volto-social-settings: 3.0.0 @@ -14402,12 +14402,12 @@ __metadata: languageName: node linkType: hard -"volto-querywidget-with-browser@npm:0.4.1": - version: 0.4.1 - resolution: "volto-querywidget-with-browser@npm:0.4.1" +"volto-querywidget-with-browser@npm:0.4.2": + version: 0.4.2 + resolution: "volto-querywidget-with-browser@npm:0.4.2" peerDependencies: "@plone/volto": ^17.0.0 - checksum: a01eacb7fa67561066f288c7ba18f5af177a88deca142f57c33638eb63bc1894d46ac66f01c6d2e3ea4e4f43479b762a63246a08f6600d665174d55d2a49c207 + checksum: 881cede295a8609f1f01d67835533b73f0f8199e3fc2c209f350897b670a40f9c631567dacbbd0db8160a94c36c9b97465e87c2b90a82e2e128619f07658a212 languageName: node linkType: hard From c21f65bc7e54d2fa092ae4bcfbfd1c99670cab5c Mon Sep 17 00:00:00 2001 From: Giulia Ghisini <51911425+giuliaghisini@users.noreply.github.com> Date: Tue, 19 Mar 2024 11:51:38 +0100 Subject: [PATCH 02/16] feat: updated volto-form-block with email validation (#596) --- package.json | 2 +- yarn.lock | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 1bbf984b9..f4ba54707 100644 --- a/package.json +++ b/package.json @@ -146,7 +146,7 @@ "volto-dropdownmenu": "4.1.1", "volto-editablefooter": "5.1.0", "volto-feedback": "0.3.0", - "volto-form-block": "3.5.2", + "volto-form-block": "3.7.0", "volto-gdpr-privacy": "2.1.1", "volto-google-analytics": "2.0.0", "volto-multilingual-widget": "3.0.0", diff --git a/yarn.lock b/yarn.lock index 85bfa0559..243f8d55d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6576,7 +6576,7 @@ __metadata: volto-dropdownmenu: 4.1.1 volto-editablefooter: 5.1.0 volto-feedback: 0.3.0 - volto-form-block: 3.5.2 + volto-form-block: 3.7.0 volto-gdpr-privacy: 2.1.1 volto-google-analytics: 2.0.0 volto-multilingual-widget: 3.0.0 @@ -14355,9 +14355,9 @@ __metadata: languageName: node linkType: hard -"volto-form-block@npm:3.5.2": - version: 3.5.2 - resolution: "volto-form-block@npm:3.5.2" +"volto-form-block@npm:3.7.0": + version: 3.7.0 + resolution: "volto-form-block@npm:3.7.0" dependencies: "@hcaptcha/react-hcaptcha": ^0.3.6 file-saver: ^2.0.5 @@ -14366,7 +14366,7 @@ __metadata: peerDependencies: "@plone/volto": ">=16.0.0-alpha.38" volto-subblocks: ^2.0.0 - checksum: 8154132d440df4cd6d240fb4b913607890ca9128fae7b9efc7d2037bf47fbe0007cab51cc009fca14793db5dc38b18432383e5b491d0d9aeb56ab89cf65942df + checksum: c2289a75f34027be1f8fb6f8a69628f9dfc4b773ed757cad83be7a0f42259e3efdac56d5c17dbaca98aff772abc6a1cff8edaef766fe395ad18270cb36f2cf98 languageName: node linkType: hard From 96649e29e79a7b71bf93a27406baa4fc1994a213 Mon Sep 17 00:00:00 2001 From: sabrina-bongiovanni <116291154+sabrina-bongiovanni@users.noreply.github.com> Date: Tue, 19 Mar 2024 12:08:47 +0100 Subject: [PATCH 03/16] feat: added download link to filename in file widget (#587) * feat: added download link to filename in file widget * update release --------- Co-authored-by: Piero Nicolli --- RELEASE.md | 6 + .../components/manage/Widgets/FileWidget.jsx | 232 ++++++++++++++++++ 2 files changed, 238 insertions(+) create mode 100644 src/customizations/volto/components/manage/Widgets/FileWidget.jsx diff --git a/RELEASE.md b/RELEASE.md index 79b3c8b60..b72676e67 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -41,6 +41,12 @@ - ... --> +## Versione X.X.X (dd/mm/yyyy) + +### Novità + +- E' possibile scaricare il file o l'immagine caricata dal widget di upload file cliccando sul nome del file stesso. + ## Versione 11.7.0 (15/03/2024) ### Novità diff --git a/src/customizations/volto/components/manage/Widgets/FileWidget.jsx b/src/customizations/volto/components/manage/Widgets/FileWidget.jsx new file mode 100644 index 000000000..0b879046a --- /dev/null +++ b/src/customizations/volto/components/manage/Widgets/FileWidget.jsx @@ -0,0 +1,232 @@ +// CUSTOMIZATION: +// - 177-179: Added link to download uploaded file + +/** + * FileWidget component. + * @module components/manage/Widgets/FileWidget + */ + +import React from 'react'; +import PropTypes from 'prop-types'; +import { Button, Image, Dimmer } from 'semantic-ui-react'; +import { readAsDataURL } from 'promise-file-reader'; +import { injectIntl } from 'react-intl'; +import deleteSVG from '@plone/volto/icons/delete.svg'; +import { Icon, FormFieldWrapper, UniversalLink } from '@plone/volto/components'; +import loadable from '@loadable/component'; +import { flattenToAppURL, validateFileUploadSize } from '@plone/volto/helpers'; +import { defineMessages, useIntl } from 'react-intl'; + +const imageMimetypes = [ + 'image/png', + 'image/jpeg', + 'image/webp', + 'image/jpg', + 'image/gif', + 'image/svg+xml', +]; +const Dropzone = loadable(() => import('react-dropzone')); + +const messages = defineMessages({ + releaseDrag: { + id: 'Drop files here ...', + defaultMessage: 'Drop files here ...', + }, + editFile: { + id: 'Drop file here to replace the existing file', + defaultMessage: 'Drop file here to replace the existing file', + }, + fileDrag: { + id: 'Drop file here to upload a new file', + defaultMessage: 'Drop file here to upload a new file', + }, + replaceFile: { + id: 'Replace existing file', + defaultMessage: 'Replace existing file', + }, + addNewFile: { + id: 'Choose a file', + defaultMessage: 'Choose a file', + }, +}); + +/** + * FileWidget component class. + * @function FileWidget + * @returns {string} Markup of the component. + * + * To use it, in schema properties, declare a field like: + * + * ```jsx + * { + * title: "File", + * widget: 'file', + * } + * ``` + * or: + * + * ```jsx + * { + * title: "File", + * type: 'object', + * } + * ``` + * + */ +const FileWidget = (props) => { + const { id, value, onChange, isDisabled } = props; + const [fileType, setFileType] = React.useState(false); + const intl = useIntl(); + + React.useEffect(() => { + if (value && imageMimetypes.includes(value['content-type'])) { + setFileType(true); + } + }, [value]); + + const imgsrc = value?.download + ? `${flattenToAppURL(value?.download)}?id=${Date.now()}` + : null || value?.data + ? `data:${value['content-type']};${value.encoding},${value.data}` + : null; + + /** + * Drop handler + * @method onDrop + * @param {array} files File objects + * @returns {undefined} + */ + const onDrop = (files) => { + const file = files[0]; + if (!validateFileUploadSize(file, intl.formatMessage)) return; + readAsDataURL(file).then((data) => { + const fields = data.match(/^data:(.*);(.*),(.*)$/); + onChange(id, { + data: fields[3], + encoding: fields[2], + 'content-type': fields[1], + filename: file.name, + }); + }); + + let reader = new FileReader(); + reader.onload = function () { + const fields = reader.result.match(/^data:(.*);(.*),(.*)$/); + if (imageMimetypes.includes(fields[1])) { + setFileType(true); + let imagePreview = document.getElementById(`field-${id}-image`); + imagePreview.src = reader.result; + } else { + setFileType(false); + } + }; + reader.readAsDataURL(files[0]); + }; + + return ( + + + {({ getRootProps, getInputProps, isDragActive }) => ( +
+ {isDragActive && } + {fileType ? ( + + ) : ( +
+ {isDragActive ? ( +

+ {intl.formatMessage(messages.releaseDrag)} +

+ ) : value ? ( +

+ {intl.formatMessage(messages.editFile)} +

+ ) : ( +

+ {intl.formatMessage(messages.fileDrag)} +

+ )} +
+ )} + + + +
+ )} +
+
+ {value && ( + + {value.filename} + + )} + {value && ( + + )} +
+
+ ); +}; + +/** + * Property types. + * @property {Object} propTypes Property types. + * @static + */ +FileWidget.propTypes = { + id: PropTypes.string.isRequired, + title: PropTypes.string.isRequired, + description: PropTypes.string, + required: PropTypes.bool, + error: PropTypes.arrayOf(PropTypes.string), + value: PropTypes.shape({ + '@type': PropTypes.string, + title: PropTypes.string, + }), + onChange: PropTypes.func.isRequired, + wrapped: PropTypes.bool, +}; + +/** + * Default properties. + * @property {Object} defaultProps Default properties. + * @static + */ +FileWidget.defaultProps = { + description: null, + required: false, + error: [], + value: null, +}; + +export default injectIntl(FileWidget); From 91b47526b69b0957eba6c8e803798f4b3ffcf9bb Mon Sep 17 00:00:00 2001 From: sabrina-bongiovanni <116291154+sabrina-bongiovanni@users.noreply.github.com> Date: Tue, 19 Mar 2024 12:11:31 +0100 Subject: [PATCH 04/16] feat: print styles for UO (#581) Co-authored-by: Piero Nicolli --- RELEASE.md | 4 + src/theme/ItaliaTheme/Print/_all_pages.scss | 3 + src/theme/ItaliaTheme/Print/_uo.scss | 88 +++++++++++++++++++++ src/theme/site.scss | 1 + 4 files changed, 96 insertions(+) create mode 100644 src/theme/ItaliaTheme/Print/_uo.scss diff --git a/RELEASE.md b/RELEASE.md index b72676e67..cc63b79cc 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -43,6 +43,10 @@ ## Versione X.X.X (dd/mm/yyyy) +### Migliorie + +- Gli stili del tipo di contenuto Unità Organizzativa sono stati ottimizzati per la stampa. + ### Novità - E' possibile scaricare il file o l'immagine caricata dal widget di upload file cliccando sul nome del file stesso. diff --git a/src/theme/ItaliaTheme/Print/_all_pages.scss b/src/theme/ItaliaTheme/Print/_all_pages.scss index 1cdcfd817..c2b5126bf 100644 --- a/src/theme/ItaliaTheme/Print/_all_pages.scss +++ b/src/theme/ItaliaTheme/Print/_all_pages.scss @@ -174,6 +174,9 @@ display: none; } } + .leaflet-container { + break-inside: avoid; + } #contenuti-correlati { display: none; diff --git a/src/theme/ItaliaTheme/Print/_uo.scss b/src/theme/ItaliaTheme/Print/_uo.scss new file mode 100644 index 000000000..98d52c025 --- /dev/null +++ b/src/theme/ItaliaTheme/Print/_uo.scss @@ -0,0 +1,88 @@ +.contenttype-unitaorganizzativa { + @media print { + .documentDescription { + font-size: 1rem; + } + + .card-wrapper { + padding-bottom: 0px; + &.card-teaser-wrapper { + margin: 0px; + &.row, + & { + --bs-gutter-y: 0px !important; + + .card { + border: none !important; + &.card-big-io-comune .card-body { + padding: 0px !important; + + .category-top { + display: none; + } + + .card-title a { + font-size: 16px; + display: flex; + + &::before { + content: '•'; + display: block; + margin-right: 5px; + } + } + } + + .avatar { + display: none; + } + + &.p-3, + &.p-4 { + padding: 0px !important; + } + + &.my-3 { + margin-top: 0px !important; + margin-bottom: 0px !important; + } + + &:after { + display: none; + } + + &.shadow-sm { + box-shadow: none !important; + } + } + } + } + } + + .ruolo-persone-struttura { + .card .card-body { + .card-title { + margin-bottom: 0px !important; + } + .card-text { + padding-top: 0px; + } + + h4 { + &.card-title { + & + .card-text { + padding-top: 0px; + } + } + } + } + .mb-3 { + margin-bottom: 6px !important; + } + } + + .anchor-offset:before { + display: none; + } + } +} diff --git a/src/theme/site.scss b/src/theme/site.scss index 2703fc96c..eb25da48f 100644 --- a/src/theme/site.scss +++ b/src/theme/site.scss @@ -139,6 +139,7 @@ @import 'ItaliaTheme/Print/persona'; @import 'ItaliaTheme/Print/event'; @import 'ItaliaTheme/Print/servizio'; +@import 'ItaliaTheme/Print/uo'; @import 'ItaliaTheme/Print/blocks'; @import 'addonsThemeCustomizationsMain'; From d183f2749a2604ebecb0f0df09ec8770d84c7f59 Mon Sep 17 00:00:00 2001 From: sabrina-bongiovanni <116291154+sabrina-bongiovanni@users.noreply.github.com> Date: Tue, 19 Mar 2024 12:31:00 +0100 Subject: [PATCH 05/16] feat: TextWidget to add alt text to image (#573) * feat: TextWidget to add alt text to image * fix: added translations * fix: added optional chaining * fix: added default value for altText parameter * fix: changed id to match data --------- Co-authored-by: Piero Nicolli --- RELEASE.md | 3 ++- locales/de/LC_MESSAGES/volto.po | 5 +++++ locales/en/LC_MESSAGES/volto.po | 5 +++++ locales/es/LC_MESSAGES/volto.po | 5 +++++ locales/fr/LC_MESSAGES/volto.po | 5 +++++ locales/it/LC_MESSAGES/volto.po | 5 +++++ locales/volto.pot | 7 ++++++- .../Blocks/TextCard/CardWithImage/Block.jsx | 18 ++++++++++++++---- .../Blocks/TextCard/CardWithImage/Sidebar.jsx | 13 +++++++++++++ 9 files changed, 60 insertions(+), 6 deletions(-) diff --git a/RELEASE.md b/RELEASE.md index cc63b79cc..c2ad00b36 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -49,7 +49,8 @@ ### Novità -- E' possibile scaricare il file o l'immagine caricata dal widget di upload file cliccando sul nome del file stesso. +- È possibile scaricare il file o l'immagine caricata dal widget di upload file cliccando sul nome del file stesso. +- È possibile aggiungere un testo alternativo per l'immagine del blocco Card con Immagine. ## Versione 11.7.0 (15/03/2024) diff --git a/locales/de/LC_MESSAGES/volto.po b/locales/de/LC_MESSAGES/volto.po index 986324175..35af469fd 100644 --- a/locales/de/LC_MESSAGES/volto.po +++ b/locales/de/LC_MESSAGES/volto.po @@ -778,6 +778,11 @@ msgstr "" msgid "allegati" msgstr "" +#: components/ItaliaTheme/Blocks/TextCard/CardWithImage/Sidebar +# defaultMessage: Testo alternativo per l'immagine +msgid "altText" +msgstr "" + #: components/ItaliaTheme/View/PersonaView/PersonaDocumenti # defaultMessage: Altre cariche msgid "altre_cariche" diff --git a/locales/en/LC_MESSAGES/volto.po b/locales/en/LC_MESSAGES/volto.po index 6a0c569ee..7a22d634d 100644 --- a/locales/en/LC_MESSAGES/volto.po +++ b/locales/en/LC_MESSAGES/volto.po @@ -763,6 +763,11 @@ msgstr "All topics" msgid "allegati" msgstr "Attached documents" +#: components/ItaliaTheme/Blocks/TextCard/CardWithImage/Sidebar +# defaultMessage: Testo alternativo per l'immagine +msgid "altText" +msgstr "" + #: components/ItaliaTheme/View/PersonaView/PersonaDocumenti # defaultMessage: Altre cariche msgid "altre_cariche" diff --git a/locales/es/LC_MESSAGES/volto.po b/locales/es/LC_MESSAGES/volto.po index af0188c2f..45dab89cb 100644 --- a/locales/es/LC_MESSAGES/volto.po +++ b/locales/es/LC_MESSAGES/volto.po @@ -772,6 +772,11 @@ msgstr "Todos los temas" msgid "allegati" msgstr "Documentos adjuntos" +#: components/ItaliaTheme/Blocks/TextCard/CardWithImage/Sidebar +# defaultMessage: Testo alternativo per l'immagine +msgid "altText" +msgstr "" + #: components/ItaliaTheme/View/PersonaView/PersonaDocumenti # defaultMessage: Altre cariche msgid "altre_cariche" diff --git a/locales/fr/LC_MESSAGES/volto.po b/locales/fr/LC_MESSAGES/volto.po index 93196a701..0b105fceb 100644 --- a/locales/fr/LC_MESSAGES/volto.po +++ b/locales/fr/LC_MESSAGES/volto.po @@ -780,6 +780,11 @@ msgstr "Tous les sujets" msgid "allegati" msgstr "Documents attachés" +#: components/ItaliaTheme/Blocks/TextCard/CardWithImage/Sidebar +# defaultMessage: Testo alternativo per l'immagine +msgid "altText" +msgstr "" + #: components/ItaliaTheme/View/PersonaView/PersonaDocumenti # defaultMessage: Altre cariche msgid "altre_cariche" diff --git a/locales/it/LC_MESSAGES/volto.po b/locales/it/LC_MESSAGES/volto.po index e1d3de2d7..b53d4f229 100644 --- a/locales/it/LC_MESSAGES/volto.po +++ b/locales/it/LC_MESSAGES/volto.po @@ -763,6 +763,11 @@ msgstr "Tutti gli argomenti" msgid "allegati" msgstr "Documenti allegati" +#: components/ItaliaTheme/Blocks/TextCard/CardWithImage/Sidebar +# defaultMessage: Testo alternativo per l'immagine +msgid "altText" +msgstr "" + #: components/ItaliaTheme/View/PersonaView/PersonaDocumenti # defaultMessage: Altre cariche msgid "altre_cariche" diff --git a/locales/volto.pot b/locales/volto.pot index 845d7b47d..dd3f2d722 100644 --- a/locales/volto.pot +++ b/locales/volto.pot @@ -1,7 +1,7 @@ msgid "" msgstr "" "Project-Id-Version: Plone\n" -"POT-Creation-Date: 2024-03-06T10:48:38.114Z\n" +"POT-Creation-Date: 2024-03-07T15:23:38.346Z\n" "Last-Translator: Plone i18n \n" "Language-Team: Plone i18n \n" "MIME-Version: 1.0\n" @@ -765,6 +765,11 @@ msgstr "" msgid "allegati" msgstr "" +#: components/ItaliaTheme/Blocks/TextCard/CardWithImage/Sidebar +# defaultMessage: Testo alternativo per l'immagine +msgid "altText" +msgstr "" + #: components/ItaliaTheme/View/PersonaView/PersonaDocumenti # defaultMessage: Altre cariche msgid "altre_cariche" diff --git a/src/components/ItaliaTheme/Blocks/TextCard/CardWithImage/Block.jsx b/src/components/ItaliaTheme/Blocks/TextCard/CardWithImage/Block.jsx index c1f084b73..5857eb02c 100644 --- a/src/components/ItaliaTheme/Blocks/TextCard/CardWithImage/Block.jsx +++ b/src/components/ItaliaTheme/Blocks/TextCard/CardWithImage/Block.jsx @@ -24,7 +24,7 @@ const messages = defineMessages({ }, }); -const renderImage = (image, showImage, sizeNatural) => +const renderImage = (image, showImage, sizeNatural, altText = '') => showImage && image ? (
@@ -117,7 +117,12 @@ const Block = ({ > {hasImage && ( - {renderImage(data?.image, hasImage, data?.sizeNatural)} + {renderImage( + data?.image, + hasImage, + data?.sizeNatural, + data?.altText, + )} )}
- {renderImage(data?.image, hasImage, data?.sizeNatural)} + {renderImage( + data?.image, + hasImage, + data?.sizeNatural, + data?.altText, + )}
{ @@ -105,6 +110,14 @@ const Sidebar = ({ data, block, onChangeBlock }) => { value={data.sizeImage || 's'} /> + { + onChangeBlock({ ...data, altText: value }); + }} + /> From d076b0a540cf3de3c9f7f08cefca27eff3917f70 Mon Sep 17 00:00:00 2001 From: Wagner Trezub <60133113+Wagner3UB@users.noreply.github.com> Date: Tue, 19 Mar 2024 12:36:18 +0100 Subject: [PATCH 06/16] fix: link in header doesn't change color when inside cms-ui (#583) * fix: link doesn't change color when inside cms * fix: has --- src/theme/_cms-ui.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/theme/_cms-ui.scss b/src/theme/_cms-ui.scss index b4209fd67..fe3cf30ce 100644 --- a/src/theme/_cms-ui.scss +++ b/src/theme/_cms-ui.scss @@ -108,7 +108,7 @@ body.cms-ui { } } - .public-ui { + .public-ui:not(:has(.it-header-wrapper)) { a:not(.btn) { color: $link-color; } From 3c52c12edfed3c12a4fdac212b9f229644bf913f Mon Sep 17 00:00:00 2001 From: Piero Nicolli Date: Tue, 19 Mar 2024 12:41:57 +0100 Subject: [PATCH 07/16] 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 c2ad00b36..7fc0ba02b 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -41,7 +41,7 @@ - ... --> -## Versione X.X.X (dd/mm/yyyy) +## Versione 11.8.0 (19/03/2024) ### Migliorie diff --git a/publiccode.yml b/publiccode.yml index e8acbf330..9e163a351 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-03-15' +releaseDate: '2024-03-19' softwareType: standalone/web -softwareVersion: 11.7.0 +softwareVersion: 11.8.0 url: 'https://github.com/italia/design-comuni-plone-theme' usedBy: - ASP Comuni Modenesi Area Nord From 01b331eac18c4467ba8b213689ac773b0721cf00 Mon Sep 17 00:00:00 2001 From: Piero Nicolli Date: Tue, 19 Mar 2024 12:46:33 +0100 Subject: [PATCH 08/16] chore: release v11.8.0 --- CHANGELOG.md | 27 +++++++++++++++++++++++++++ package.json | 2 +- 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5d418d078..89ae718ee 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,32 @@ +## [11.8.0](https://github.com/redturtle/design-comuni-plone-theme/compare/v11.7.0...v11.8.0) (2024-03-19) + + +### Features + +* added download link to filename in file widget ([#587](https://github.com/redturtle/design-comuni-plone-theme/issues/587)) ([96649e2](https://github.com/redturtle/design-comuni-plone-theme/commit/96649e29e79a7b71bf93a27406baa4fc1994a213)) +* print styles for UO ([#581](https://github.com/redturtle/design-comuni-plone-theme/issues/581)) ([91b4752](https://github.com/redturtle/design-comuni-plone-theme/commit/91b47526b69b0957eba6c8e803798f4b3ffcf9bb)) +* TextWidget to add alt text to image ([#573](https://github.com/redturtle/design-comuni-plone-theme/issues/573)) ([d183f27](https://github.com/redturtle/design-comuni-plone-theme/commit/d183f2749a2604ebecb0f0df09ec8770d84c7f59)) +* updated volto-form-block with email validation ([#596](https://github.com/redturtle/design-comuni-plone-theme/issues/596)) ([c21f65b](https://github.com/redturtle/design-comuni-plone-theme/commit/c21f65bc7e54d2fa092ae4bcfbfd1c99670cab5c)) + + +### Bug Fixes + +* link in header doesn't change color when inside cms-ui ([#583](https://github.com/redturtle/design-comuni-plone-theme/issues/583)) ([d076b0a](https://github.com/redturtle/design-comuni-plone-theme/commit/d076b0a540cf3de3c9f7f08cefca27eff3917f70)) +* updated volto-querywidget-with-browser to fix infinite loops on lost reference ([#599](https://github.com/redturtle/design-comuni-plone-theme/issues/599)) ([c6d4cb6](https://github.com/redturtle/design-comuni-plone-theme/commit/c6d4cb6b51447514fedf2938f40031e42779644e)) +* view form block ([5ff7ea7](https://github.com/redturtle/design-comuni-plone-theme/commit/5ff7ea70474963e3dca126a44d531cc4dc17be74)) + + +### Maintenance + +* updated volto-form-block to fix view form ([80a6586](https://github.com/redturtle/design-comuni-plone-theme/commit/80a6586ac7d458c46efe51bcc4fa4a9cb3b8d619)) + + +### Documentation + +* updated publiccode and release log ([3c52c12](https://github.com/redturtle/design-comuni-plone-theme/commit/3c52c12edfed3c12a4fdac212b9f229644bf913f)) + ## [11.7.0](https://github.com/redturtle/design-comuni-plone-theme/compare/v11.6.2...v11.7.0) (2024-03-15) diff --git a/package.json b/package.json index f4ba54707..4ee5146e9 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.7.0", + "version": "11.8.0", "main": "src/index.js", "keywords": [ "volto-addon", From 9ac3cac30ff846ae716b73fd1db2019e01760adc Mon Sep 17 00:00:00 2001 From: Giulia Ghisini <51911425+giuliaghisini@users.noreply.github.com> Date: Tue, 26 Mar 2024 10:19:14 +0100 Subject: [PATCH 09/16] fix: volto-form-block (#600) --- package.json | 2 +- yarn.lock | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 4ee5146e9..ca1205da5 100644 --- a/package.json +++ b/package.json @@ -146,7 +146,7 @@ "volto-dropdownmenu": "4.1.1", "volto-editablefooter": "5.1.0", "volto-feedback": "0.3.0", - "volto-form-block": "3.7.0", + "volto-form-block": "3.7.1", "volto-gdpr-privacy": "2.1.1", "volto-google-analytics": "2.0.0", "volto-multilingual-widget": "3.0.0", diff --git a/yarn.lock b/yarn.lock index 243f8d55d..8ae76f1ce 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6576,7 +6576,7 @@ __metadata: volto-dropdownmenu: 4.1.1 volto-editablefooter: 5.1.0 volto-feedback: 0.3.0 - volto-form-block: 3.7.0 + volto-form-block: 3.7.1 volto-gdpr-privacy: 2.1.1 volto-google-analytics: 2.0.0 volto-multilingual-widget: 3.0.0 @@ -14355,9 +14355,9 @@ __metadata: languageName: node linkType: hard -"volto-form-block@npm:3.7.0": - version: 3.7.0 - resolution: "volto-form-block@npm:3.7.0" +"volto-form-block@npm:3.7.1": + version: 3.7.1 + resolution: "volto-form-block@npm:3.7.1" dependencies: "@hcaptcha/react-hcaptcha": ^0.3.6 file-saver: ^2.0.5 @@ -14366,7 +14366,7 @@ __metadata: peerDependencies: "@plone/volto": ">=16.0.0-alpha.38" volto-subblocks: ^2.0.0 - checksum: c2289a75f34027be1f8fb6f8a69628f9dfc4b773ed757cad83be7a0f42259e3efdac56d5c17dbaca98aff772abc6a1cff8edaef766fe395ad18270cb36f2cf98 + checksum: 6cdbcb91d5bca43fa4ee828e7816df37573816854552fd00965053dd7f2496c8ee4c87838cbaa9d5e10b5496b51da1ed573ff3c300806f8d7a2e0ad55a8ca962 languageName: node linkType: hard From fee11d1126f764d1cb4b3cde720714a1f2934b75 Mon Sep 17 00:00:00 2001 From: Giulia Ghisini <51911425+giuliaghisini@users.noreply.github.com> Date: Tue, 26 Mar 2024 10:21:42 +0100 Subject: [PATCH 10/16] fix: view background image in icons block (#580) * fix: view background image in icons block * fix: use Image component to render background image of icons block * fix: imports * fix: tests --------- Co-authored-by: Piero Nicolli --- RELEASE.md | 4 +++ .../ItaliaTheme/Blocks/IconBlocks/Edit.jsx | 26 ++++++++------- .../ItaliaTheme/Blocks/IconBlocks/Sidebar.jsx | 5 ++- .../ItaliaTheme/Blocks/IconBlocks/View.jsx | 33 ++++++++++--------- .../Blocks/__tests__/IconBlocks.test.jsx | 6 ++-- src/theme/ItaliaTheme/Blocks/_iconBlocks.scss | 26 ++++++++++++--- 6 files changed, 63 insertions(+), 37 deletions(-) diff --git a/RELEASE.md b/RELEASE.md index 7fc0ba02b..5039283ec 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -52,6 +52,10 @@ - È possibile scaricare il file o l'immagine caricata dal widget di upload file cliccando sul nome del file stesso. - È possibile aggiungere un testo alternativo per l'immagine del blocco Card con Immagine. +### Fix + +- Nel blocco con icone, se era impostata una immagine di sfondo non si vedeva. + ## Versione 11.7.0 (15/03/2024) ### Novità diff --git a/src/components/ItaliaTheme/Blocks/IconBlocks/Edit.jsx b/src/components/ItaliaTheme/Blocks/IconBlocks/Edit.jsx index 685266b06..d6aa29d36 100644 --- a/src/components/ItaliaTheme/Blocks/IconBlocks/Edit.jsx +++ b/src/components/ItaliaTheme/Blocks/IconBlocks/Edit.jsx @@ -8,7 +8,7 @@ import { defineMessages } from 'react-intl'; import { Container, Row, Col } from 'design-react-kit'; import { SidebarPortal } from '@plone/volto/components'; -import { flattenToAppURL, addAppURL } from '@plone/volto/helpers'; +import { flattenToAppURL } from '@plone/volto/helpers'; import { UniversalLink } from '@plone/volto/components'; import { @@ -21,6 +21,8 @@ import { TextEditorWidget } from 'design-comuni-plone-theme/components/ItaliaThe import EditBlock from './Block/EditBlock'; import Sidebar from './Sidebar.jsx'; +import config from '@plone/volto/registry'; + const messages = defineMessages({ addItem: { id: 'Add accordion item', @@ -54,23 +56,23 @@ class Edit extends SubblocksEdit { if (__SERVER__) { return
; } + const Image = config.getComponent({ name: 'Image' }).component; return (
{this.props.data.background?.[0] ? ( -
+
+ +
) : ( -
+
)} diff --git a/src/components/ItaliaTheme/Blocks/IconBlocks/Sidebar.jsx b/src/components/ItaliaTheme/Blocks/IconBlocks/Sidebar.jsx index 3b1476cd2..b43183683 100644 --- a/src/components/ItaliaTheme/Blocks/IconBlocks/Sidebar.jsx +++ b/src/components/ItaliaTheme/Blocks/IconBlocks/Sidebar.jsx @@ -58,7 +58,10 @@ const Sidebar = ({ description="" required={false} widgetOptions={{ - pattern_options: { selectableTypes: ['Image'] }, + pattern_options: { + selectableTypes: ['Image'], + maximumSelectionSize: 1, + }, }} value={data.background ?? []} onChange={(id, value) => diff --git a/src/components/ItaliaTheme/Blocks/IconBlocks/View.jsx b/src/components/ItaliaTheme/Blocks/IconBlocks/View.jsx index 15ce7125a..85f498126 100644 --- a/src/components/ItaliaTheme/Blocks/IconBlocks/View.jsx +++ b/src/components/ItaliaTheme/Blocks/IconBlocks/View.jsx @@ -1,5 +1,5 @@ /** - * View Accordion block. + * View IconsBlock block. * @module components/ItaliaTheme/Blocks/Accordion/View */ @@ -8,35 +8,36 @@ import PropTypes from 'prop-types'; import redraft from 'redraft'; import ViewBlock from './Block/ViewBlock'; import { Container, Row, Col } from 'design-react-kit'; -import { flattenToAppURL, addAppURL } from '@plone/volto/helpers'; +import { flattenToAppURL } from '@plone/volto/helpers'; import { UniversalLink } from '@plone/volto/components'; import config from '@plone/volto/registry'; import { checkRedraftHasContent } from 'design-comuni-plone-theme/helpers'; /** - * View Accordion block class. + * View IconsBlock block class. * @class View * @extends Component */ -const AccordionView = ({ data, block }) => { +const IconsBlockView = ({ data, block }) => { const id = new Date().getTime(); + const Image = config.getComponent({ name: 'Image' }).component; return (
{data.background?.[0] ? ( -
+
+ +
) : ( -
+
)}
@@ -94,8 +95,8 @@ const AccordionView = ({ data, block }) => { * @property {Object} propTypes Property types. * @static */ -AccordionView.propTypes = { +IconsBlockView.propTypes = { data: PropTypes.objectOf(PropTypes.any).isRequired, }; -export default AccordionView; +export default IconsBlockView; diff --git a/src/components/ItaliaTheme/Blocks/__tests__/IconBlocks.test.jsx b/src/components/ItaliaTheme/Blocks/__tests__/IconBlocks.test.jsx index a136004ed..8ff0e5fd1 100644 --- a/src/components/ItaliaTheme/Blocks/__tests__/IconBlocks.test.jsx +++ b/src/components/ItaliaTheme/Blocks/__tests__/IconBlocks.test.jsx @@ -378,10 +378,8 @@ test('View renders all fields', async () => { screen.getByText(/With his brim pulled way down low/i), ).toBeInTheDocument(); //immagine di background - const backgroundImage = document.querySelector('.background-image'); - expect(backgroundImage).toHaveStyle( - `background-image: url(http://localhost:3000/is-this-the-real-life/business-teamwork-join-hands-together-business-teamwork-concept_1150-1804.webp/@@images/image/huge);`, - ); + const backgroundImage = document.querySelector('.background-image img'); + expect(backgroundImage).toBeInTheDocument(); //link ad altro expect( screen.getByRole('link', { diff --git a/src/theme/ItaliaTheme/Blocks/_iconBlocks.scss b/src/theme/ItaliaTheme/Blocks/_iconBlocks.scss index 663fa53ec..ecb4c52d4 100644 --- a/src/theme/ItaliaTheme/Blocks/_iconBlocks.scss +++ b/src/theme/ItaliaTheme/Blocks/_iconBlocks.scss @@ -26,17 +26,35 @@ left: 0; width: 100%; height: 100%; - background-position: top center; - background-repeat: no-repeat; - background-size: cover; + overflow: hidden; + img { + position: absolute; + min-width: 100%; + min-height: 100%; + height: auto; + width: auto; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + max-width: unset; + } &:after { position: absolute; width: 100%; height: 100%; - background-color: $primary; + background-color: rgba( + $primary, + 0.85 + ); // serve per fare la trasparenza sull'immagine di sfondo. content: ''; } + + &.no-image { + &:after { + background-color: $primary; + } + } } .block-header { From 38c6f3d1312f3b7dbd2e73875cc51af0811adabd Mon Sep 17 00:00:00 2001 From: Giulia Ghisini <51911425+giuliaghisini@users.noreply.github.com> Date: Tue, 26 Mar 2024 10:24:25 +0100 Subject: [PATCH 11/16] fix: moved HeaderSlim compoonent inside his folder to enable customizations (#602) --- .../ItaliaTheme/Header/{ => HeaderSlim}/HeaderSlim.jsx | 2 +- .../ItaliaTheme/Header/HeaderSlim/HeaderSlimRightZone.jsx | 2 +- src/components/ItaliaTheme/Header/HeaderSlim/index.js | 3 +++ src/components/ItaliaTheme/index.js | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) rename src/components/ItaliaTheme/Header/{ => HeaderSlim}/HeaderSlim.jsx (95%) create mode 100644 src/components/ItaliaTheme/Header/HeaderSlim/index.js diff --git a/src/components/ItaliaTheme/Header/HeaderSlim.jsx b/src/components/ItaliaTheme/Header/HeaderSlim/HeaderSlim.jsx similarity index 95% rename from src/components/ItaliaTheme/Header/HeaderSlim.jsx rename to src/components/ItaliaTheme/Header/HeaderSlim/HeaderSlim.jsx index 4dc990b40..775e2f06a 100644 --- a/src/components/ItaliaTheme/Header/HeaderSlim.jsx +++ b/src/components/ItaliaTheme/Header/HeaderSlim/HeaderSlim.jsx @@ -1,6 +1,6 @@ /** * HeaderSlim component. - * @module components/ItaliaTheme/Header/HeaderSlim + * @module components/ItaliaTheme/Header/HeaderSlim/HeaderSlim */ import React from 'react'; diff --git a/src/components/ItaliaTheme/Header/HeaderSlim/HeaderSlimRightZone.jsx b/src/components/ItaliaTheme/Header/HeaderSlim/HeaderSlimRightZone.jsx index 83403e903..e0986da01 100644 --- a/src/components/ItaliaTheme/Header/HeaderSlim/HeaderSlimRightZone.jsx +++ b/src/components/ItaliaTheme/Header/HeaderSlim/HeaderSlimRightZone.jsx @@ -1,6 +1,6 @@ /** * HeaderSlim component. - * @module components/ItaliaTheme/Header/HeaderSlim + * @module components/ItaliaTheme/Header/HeaderSlim/HeaderSlimRightZone */ import React from 'react'; diff --git a/src/components/ItaliaTheme/Header/HeaderSlim/index.js b/src/components/ItaliaTheme/Header/HeaderSlim/index.js new file mode 100644 index 000000000..97f96ab06 --- /dev/null +++ b/src/components/ItaliaTheme/Header/HeaderSlim/index.js @@ -0,0 +1,3 @@ +import HeaderSlim from 'design-comuni-plone-theme/components/ItaliaTheme/Header/HeaderSlim/HeaderSlim'; + +export default HeaderSlim; diff --git a/src/components/ItaliaTheme/index.js b/src/components/ItaliaTheme/index.js index e9dd9bd30..71199cc45 100644 --- a/src/components/ItaliaTheme/index.js +++ b/src/components/ItaliaTheme/index.js @@ -32,7 +32,7 @@ export GalleryPreview from 'design-comuni-plone-theme/components/ItaliaTheme/Gal /********* LAYOUT ********* */ export LanguageSelector from 'design-comuni-plone-theme/components/ItaliaTheme/LanguageSelector/LanguageSelector'; -export HeaderSlim from 'design-comuni-plone-theme/components/ItaliaTheme/Header/HeaderSlim'; +export HeaderSlim from 'design-comuni-plone-theme/components/ItaliaTheme/Header/HeaderSlim/HeaderSlim'; export HeaderSlimRightZone from 'design-comuni-plone-theme/components/ItaliaTheme/Header/HeaderSlim/HeaderSlimRightZone'; export HeaderLogin from 'design-comuni-plone-theme/components/ItaliaTheme/Header/HeaderSlim/HeaderLogin'; export LoginButton from 'design-comuni-plone-theme/components/ItaliaTheme/Header/HeaderSlim/LoginButton'; From ac87cf398b789b1cd9dcd3c4cfed3030e8809499 Mon Sep 17 00:00:00 2001 From: Piero Nicolli Date: Tue, 26 Mar 2024 10:30:14 +0100 Subject: [PATCH 12/16] docs: updated publiccode --- publiccode.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/publiccode.yml b/publiccode.yml index 9e163a351..2bd9fccf3 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-03-19' +releaseDate: '2024-03-26' softwareType: standalone/web -softwareVersion: 11.8.0 +softwareVersion: 11.8.1 url: 'https://github.com/italia/design-comuni-plone-theme' usedBy: - ASP Comuni Modenesi Area Nord From 8cc1e77568b6bba3188c0b0c46cc7784ade9fb02 Mon Sep 17 00:00:00 2001 From: Piero Nicolli Date: Tue, 26 Mar 2024 10:34:14 +0100 Subject: [PATCH 13/16] chore: release v11.8.1 --- CHANGELOG.md | 14 ++++++++++++++ package.json | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 89ae718ee..fc2bce8eb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,19 @@ +## [11.8.1](https://github.com/redturtle/design-comuni-plone-theme/compare/v11.8.0...v11.8.1) (2024-03-26) + + +### Bug Fixes + +* moved HeaderSlim compoonent inside his folder to enable customizations ([#602](https://github.com/redturtle/design-comuni-plone-theme/issues/602)) ([38c6f3d](https://github.com/redturtle/design-comuni-plone-theme/commit/38c6f3d1312f3b7dbd2e73875cc51af0811adabd)) +* view background image in icons block ([#580](https://github.com/redturtle/design-comuni-plone-theme/issues/580)) ([fee11d1](https://github.com/redturtle/design-comuni-plone-theme/commit/fee11d1126f764d1cb4b3cde720714a1f2934b75)) +* volto-form-block ([#600](https://github.com/redturtle/design-comuni-plone-theme/issues/600)) ([9ac3cac](https://github.com/redturtle/design-comuni-plone-theme/commit/9ac3cac30ff846ae716b73fd1db2019e01760adc)) + + +### Documentation + +* updated publiccode ([ac87cf3](https://github.com/redturtle/design-comuni-plone-theme/commit/ac87cf398b789b1cd9dcd3c4cfed3030e8809499)) + ## [11.8.0](https://github.com/redturtle/design-comuni-plone-theme/compare/v11.7.0...v11.8.0) (2024-03-19) diff --git a/package.json b/package.json index ca1205da5..f6125dc02 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.8.0", + "version": "11.8.1", "main": "src/index.js", "keywords": [ "volto-addon", From be142e3b9de000ee2d4ee31fd06c282483042b1a Mon Sep 17 00:00:00 2001 From: Piero Nicolli Date: Tue, 26 Mar 2024 10:50:25 +0100 Subject: [PATCH 14/16] prepare for next release --- RELEASE.md | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/RELEASE.md b/RELEASE.md index 5039283ec..d24ef00d3 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -34,13 +34,27 @@ ### Novità -- ... [`Istruzioni`](url della documentazione relativa alla novità) +- ... ### Fix - ... --> +## Versione X.X.X (dd/mm/yyyy) + +### Migliorie + +- ... + +### Novità + +- ... + +### Fix + +- ... + ## Versione 11.8.0 (19/03/2024) ### Migliorie From cc43200b7bee1444f5149f8e280b25034a835c4f Mon Sep 17 00:00:00 2001 From: Andrea Cecchi Date: Tue, 26 Mar 2024 14:26:18 +0100 Subject: [PATCH 15/16] fix: string formatting for modified date (#608) --- src/components/ItaliaTheme/View/Commons/PageMetadata.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/ItaliaTheme/View/Commons/PageMetadata.jsx b/src/components/ItaliaTheme/View/Commons/PageMetadata.jsx index 550b48c0b..025f16973 100644 --- a/src/components/ItaliaTheme/View/Commons/PageMetadata.jsx +++ b/src/components/ItaliaTheme/View/Commons/PageMetadata.jsx @@ -25,7 +25,7 @@ const PageMetadata = ({ content, children }) => { {intl.formatMessage(messages.modified)}: {' '} - {viewDate(intl.locale, content.modified, 'DD-MM-Y HH:MM')} + {viewDate(intl.locale, content.modified, 'DD-MM-Y HH:mm')} {children} ); From e736bed0a399aecd6ec2f399c1c5c70f1192509b Mon Sep 17 00:00:00 2001 From: sabrina-bongiovanni <116291154+sabrina-bongiovanni@users.noreply.github.com> Date: Tue, 26 Mar 2024 17:47:33 +0100 Subject: [PATCH 16/16] fix: added aria-hidden attribute to icons (#594) * fix: added aria-hidden attribute to icons * fix: used aria-hidden instead of custom attribute --- RELEASE.md | 1 + .../ItaliaTheme/Blocks/IconBlocks/Block/ViewBlock.jsx | 2 +- src/components/ItaliaTheme/Icons/FontAwesomeIcon.jsx | 5 +++-- src/components/ItaliaTheme/Icons/Icon.jsx | 1 + 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/RELEASE.md b/RELEASE.md index d24ef00d3..3dc9db607 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -45,6 +45,7 @@ ### Migliorie +- Migliorata l'accessibilità del blocco Icone. - ... ### Novità diff --git a/src/components/ItaliaTheme/Blocks/IconBlocks/Block/ViewBlock.jsx b/src/components/ItaliaTheme/Blocks/IconBlocks/Block/ViewBlock.jsx index 6af951579..5a638ba5d 100644 --- a/src/components/ItaliaTheme/Blocks/IconBlocks/Block/ViewBlock.jsx +++ b/src/components/ItaliaTheme/Blocks/IconBlocks/Block/ViewBlock.jsx @@ -37,7 +37,7 @@ const ViewBlock = ({ data, isOpen, toggle, id, index }) => { {data.icon?.length > 0 && (
- +
)} diff --git a/src/components/ItaliaTheme/Icons/FontAwesomeIcon.jsx b/src/components/ItaliaTheme/Icons/FontAwesomeIcon.jsx index 70b8a39ac..fa17e5fd6 100644 --- a/src/components/ItaliaTheme/Icons/FontAwesomeIcon.jsx +++ b/src/components/ItaliaTheme/Icons/FontAwesomeIcon.jsx @@ -35,8 +35,8 @@ const FontAwesomeIcon = (props) => { prefixKey === 'fab' ? 'brands' : prefixKey === 'far' - ? 'regular' - : 'solid', + ? 'regular' + : 'solid', iconName, ]; }; @@ -74,6 +74,7 @@ const FontAwesomeIcon = (props) => { ? `${title}${loadedIcon.module.content}` : loadedIcon.module.content, }} + aria-hidden={props['aria-hidden']} /> ) : icon ? ( diff --git a/src/components/ItaliaTheme/Icons/Icon.jsx b/src/components/ItaliaTheme/Icons/Icon.jsx index 06939fb88..e768ec6b2 100644 --- a/src/components/ItaliaTheme/Icons/Icon.jsx +++ b/src/components/ItaliaTheme/Icons/Icon.jsx @@ -12,6 +12,7 @@ import { FontAwesomeIcon } from 'design-comuni-plone-theme/components/ItaliaThem const Icon = (props) => { const { icon, className, color, size, padding, ...rest } = props; + if (icon) { const classes = classNames( 'icon',