From afc50835eea3413f770ea8db4b9bfaad46dd1d5c Mon Sep 17 00:00:00 2001 From: Piero Nicolli Date: Thu, 8 Feb 2024 12:16:01 +0100 Subject: [PATCH 01/33] 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 184b3bcb1..da8fa3bfc 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -41,7 +41,7 @@ - ... --> -## Versione X.X.X (dd/mm/yyyy) +## Versione 11.4.1 (08/02/2024) ### Fix diff --git a/publiccode.yml b/publiccode.yml index 871bd7fac..a169778f6 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-02-06' +releaseDate: '2024-02-08' softwareType: standalone/web -softwareVersion: 11.4.0 +softwareVersion: 11.4.1 url: 'https://github.com/italia/design-comuni-plone-theme' usedBy: - ASP Comuni Modenesi Area Nord From a721fda8e81e393f94123daf961c72f4a557209d Mon Sep 17 00:00:00 2001 From: Piero Nicolli Date: Thu, 8 Feb 2024 12:33:02 +0100 Subject: [PATCH 02/33] chore: release v11.4.1 --- CHANGELOG.md | 19 +++++++++++++++++++ package.json | 2 +- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0c96fe468..a7ab058a9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,24 @@ +## [11.4.1](https://github.com/redturtle/design-comuni-plone-theme/compare/v11.4.0...v11.4.1) (2024-02-08) + + +### Bug Fixes + +* a11y use of Sharing and Actions menus ([#519](https://github.com/redturtle/design-comuni-plone-theme/issues/519)) ([67474cc](https://github.com/redturtle/design-comuni-plone-theme/commit/67474ccafcad1e3ac7e447a10c3b923e42b68206)) +* accessibility for subsites ([#527](https://github.com/redturtle/design-comuni-plone-theme/issues/527)) ([f1fbea7](https://github.com/redturtle/design-comuni-plone-theme/commit/f1fbea765646d2af081e54772c33843283fc741a)) +* better a11y for social links ([#518](https://github.com/redturtle/design-comuni-plone-theme/issues/518)) ([49ea781](https://github.com/redturtle/design-comuni-plone-theme/commit/49ea7812e624da5b7d09485d0ad528478a716f90)) +* better screen reader user experience in contacts, contact type is read now alongside value ([#516](https://github.com/redturtle/design-comuni-plone-theme/issues/516)) ([bdd96f2](https://github.com/redturtle/design-comuni-plone-theme/commit/bdd96f26f85c616c77fb4a34cdd2b3dc15210bfb)) +* do not show empty headings if title in block is not configured ([#517](https://github.com/redturtle/design-comuni-plone-theme/issues/517)) ([2152118](https://github.com/redturtle/design-comuni-plone-theme/commit/21521183e875118b793beccbcb964dc97f1ad982)) +* in FAQFolderView aria controls and live attributes correctly now and place regions accordingly ([#515](https://github.com/redturtle/design-comuni-plone-theme/issues/515)) ([49fd553](https://github.com/redturtle/design-comuni-plone-theme/commit/49fd553eb49144bd5374cae081cfccf27e139471)) +* semantic headings levels in rss templates, all h3 now ([#521](https://github.com/redturtle/design-comuni-plone-theme/issues/521)) ([b6b13fd](https://github.com/redturtle/design-comuni-plone-theme/commit/b6b13fd79fe417f15a97df4fadfc58bd6e66031e)) +* skip link go to content in site search page ([#520](https://github.com/redturtle/design-comuni-plone-theme/issues/520)) ([b78b47f](https://github.com/redturtle/design-comuni-plone-theme/commit/b78b47f4fb8424ff2a1e6c663edb72ded32f3fe4)) + + +### Documentation + +* updated publiccode and release log ([afc5083](https://github.com/redturtle/design-comuni-plone-theme/commit/afc50835eea3413f770ea8db4b9bfaad46dd1d5c)) + ## [11.4.0](https://github.com/redturtle/design-comuni-plone-theme/compare/v11.3.4...v11.4.0) (2024-02-06) diff --git a/package.json b/package.json index 21cccf9e5..10b2180fa 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.4.0", + "version": "11.4.1", "main": "src/index.js", "keywords": [ "volto-addon", From e579fc4c05cac04f9f998916a2ea8285ff942311 Mon Sep 17 00:00:00 2001 From: Martina Bustacchini <41484878+deodorhunter@users.noreply.github.com> Date: Fri, 9 Feb 2024 10:19:01 +0100 Subject: [PATCH 03/33] fix: wrong date display for events that span on multiple years (#529) * fix: fixed wrong date display for events that span on multiple years * chore: release.md * fix: add missing return case --- RELEASE.md | 6 ++ .../Blocks/Listing/Commons/CardCalendar.jsx | 77 ++++++++++++++++--- 2 files changed, 72 insertions(+), 11 deletions(-) diff --git a/RELEASE.md b/RELEASE.md index da8fa3bfc..e60103838 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -41,6 +41,12 @@ - ... --> +## Versione X.X.X (dd/mm/yyyy) + +### Fix + +- Risolto un problema riguardante la visualizzazione delle date nelle card che rappresentano uun CT Evento nei vari listati nel caso in cui l'evento si sviluppi su anni diversi + ## Versione 11.4.1 (08/02/2024) ### Fix diff --git a/src/components/ItaliaTheme/Blocks/Listing/Commons/CardCalendar.jsx b/src/components/ItaliaTheme/Blocks/Listing/Commons/CardCalendar.jsx index c99eb2fc4..48bc7f0c6 100644 --- a/src/components/ItaliaTheme/Blocks/Listing/Commons/CardCalendar.jsx +++ b/src/components/ItaliaTheme/Blocks/Listing/Commons/CardCalendar.jsx @@ -1,7 +1,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import { useIntl, defineMessages } from 'react-intl'; - +import cx from 'classnames'; import { viewDate, getRealStartAndEndWithRecurrence, @@ -34,23 +34,78 @@ export const CardCalendar = ({ start, end, recurrence, rrule }) => { intl, ); if ((_start && _end) || recurrenceDates) { - if (!recurrenceDates && _start.isSame(_end, 'day')) { - return ( -
- {_start.format('D')} - {_end.format('MMMM')} -
- ); + if (!recurrenceDates) { + if (_start.isSame(_end, 'day')) { + return ( +
+ {_start.format('D')} + {_end.format('MMMM')} +
+ ); + } else if (!_start.isSame(_end, 'year')) { + return ( +
+
+ +
+ {intl.formatMessage(messages.from)} +
+ {_start.format('DD/MM/YY')} +
+ +
+ {intl.formatMessage(messages.to)} +
+ {_end.format('DD/MM/YY')} +
+
+
+ ); + } else { + return ( +
+
+ +
+ {intl.formatMessage(messages.from)} +
+ {_start.format('DD/MM')} +
+ +
+ {intl.formatMessage(messages.to)} +
+ {_end.format('DD/MM')} +
+
+
+ ); + } } else if (recurrenceDates) { + let dateFormat = 'DD/MM'; + if ( + !recurrenceDates?.recurrenceStart.isSame( + recurrenceDates?.recurrenceEnd, + 'year', + ) + ) + dateFormat = 'DD/MM/YY'; return (
-
+
{intl.formatMessage(messages.from)}
- {recurrenceDates.recurrenceStart?.format('DD/MM')} + {recurrenceDates.recurrenceStart?.format(dateFormat)}
@@ -58,7 +113,7 @@ export const CardCalendar = ({ start, end, recurrence, rrule }) => { {intl.formatMessage(messages.to)}
- {recurrenceDates?.recurrenceEnd?.format('DD/MM')} + {recurrenceDates?.recurrenceEnd?.format(dateFormat)}
From a6837d0d8277ac8a5ae8b149651ce65039405471 Mon Sep 17 00:00:00 2001 From: Piero Nicolli Date: Fri, 9 Feb 2024 10:31:15 +0100 Subject: [PATCH 04/33] fix: navigation reducer bug happening in 404 pages --- src/customizations/volto/reducers/navigation/navigation.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/customizations/volto/reducers/navigation/navigation.js b/src/customizations/volto/reducers/navigation/navigation.js index 6f1f8a2ca..21465f95d 100644 --- a/src/customizations/volto/reducers/navigation/navigation.js +++ b/src/customizations/volto/reducers/navigation/navigation.js @@ -6,6 +6,7 @@ /* CUSTOMIZATIONS: - customized getRecursiveItems to use remoteUrl property for plone types 'Link' objects + - added show_in_footer */ import { map } from 'lodash'; @@ -89,8 +90,7 @@ export default function navigation(state = initialState, action = {}) { return { ...state, error: null, - show_in_footer: - action.result['@components'].navigation.show_in_footer, + show_in_footer: action.result.show_in_footer, items: getRecursiveItems(action.result.items), loaded: true, loading: false, From 34739eac771ef385a9ad2d12ee1f64d0fe9490d7 Mon Sep 17 00:00:00 2001 From: Giulia Ghisini <51911425+giuliaghisini@users.noreply.github.com> Date: Mon, 12 Feb 2024 11:24:36 +0100 Subject: [PATCH 05/33] fix: query for listing path filters (#530) --- RELEASE.md | 2 ++ .../Blocks/Listing/SimpleCard/SimpleCardTemplateDefault.jsx | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/RELEASE.md b/RELEASE.md index e60103838..2c6bbfd99 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -47,6 +47,8 @@ - Risolto un problema riguardante la visualizzazione delle date nelle card che rappresentano uun CT Evento nei vari listati nel caso in cui l'evento si sviluppi su anni diversi +- Nel blocco elenco, sono stati sistemati i filtri per percorso quando si clicca sul bottone configurato. + ## Versione 11.4.1 (08/02/2024) ### Fix diff --git a/src/components/ItaliaTheme/Blocks/Listing/SimpleCard/SimpleCardTemplateDefault.jsx b/src/components/ItaliaTheme/Blocks/Listing/SimpleCard/SimpleCardTemplateDefault.jsx index 2f224bce5..8c288ea41 100644 --- a/src/components/ItaliaTheme/Blocks/Listing/SimpleCard/SimpleCardTemplateDefault.jsx +++ b/src/components/ItaliaTheme/Blocks/Listing/SimpleCard/SimpleCardTemplateDefault.jsx @@ -163,7 +163,7 @@ const SimpleCardTemplateDefault = (props) => { tag="button" className="ms-3" onClick={(e) => { - addPathFilter(button.path['@id']); + addPathFilter(button.path['UID']); }} > {button.label} From 92d734ec7a3b625498658d5d12b1681677d3da87 Mon Sep 17 00:00:00 2001 From: Sara Bianchi <43245702+SaraBianchi@users.noreply.github.com> Date: Wed, 14 Feb 2024 11:18:01 +0100 Subject: [PATCH 06/33] fix: hidden pagination size field from calendar block props (#531) * chore: hidden pagination size field from calendar block props * chore: updated release.md --- RELEASE.md | 4 ++++ .../ItaliaTheme/Blocks/Calendar/ListingSidebar.jsx | 5 ++++- src/theme/ItaliaTheme/Blocks/_calendar.scss | 5 +++++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/RELEASE.md b/RELEASE.md index 2c6bbfd99..9ef7d8017 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -43,6 +43,10 @@ ## Versione X.X.X (dd/mm/yyyy) +### Migliorie + +- Rimosso il campo "Risultati per pagina" che non agiva sulle impostazioni del blocco Calendario. + ### Fix - Risolto un problema riguardante la visualizzazione delle date nelle card che rappresentano uun CT Evento nei vari listati nel caso in cui l'evento si sviluppi su anni diversi diff --git a/src/components/ItaliaTheme/Blocks/Calendar/ListingSidebar.jsx b/src/components/ItaliaTheme/Blocks/Calendar/ListingSidebar.jsx index 3158e0e67..9007f2836 100644 --- a/src/components/ItaliaTheme/Blocks/Calendar/ListingSidebar.jsx +++ b/src/components/ItaliaTheme/Blocks/Calendar/ListingSidebar.jsx @@ -127,7 +127,10 @@ const ListingSidebar = (props) => { )} - +
{ {end.format('DD')} {end.format('MMMM')} + {!end.isSame(start, 'year') && ( + {end.format('YYYY')} + )}
Date: Wed, 14 Feb 2024 12:12:00 +0100 Subject: [PATCH 09/33] fix: query listing path filter color status and a11y (#534) --- .../SimpleCard/SimpleCardTemplateDefault.jsx | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/components/ItaliaTheme/Blocks/Listing/SimpleCard/SimpleCardTemplateDefault.jsx b/src/components/ItaliaTheme/Blocks/Listing/SimpleCard/SimpleCardTemplateDefault.jsx index 8c288ea41..6ca1ee7d5 100644 --- a/src/components/ItaliaTheme/Blocks/Listing/SimpleCard/SimpleCardTemplateDefault.jsx +++ b/src/components/ItaliaTheme/Blocks/Listing/SimpleCard/SimpleCardTemplateDefault.jsx @@ -2,6 +2,7 @@ import React, { useState } from 'react'; import PropTypes from 'prop-types'; import { defineMessages, useIntl } from 'react-intl'; import moment from 'moment'; +import { v4 as uuid } from 'uuid'; import cx from 'classnames'; import { Card, @@ -72,6 +73,8 @@ const SimpleCardTemplateDefault = (props) => { rrule, } = props; + const resultsUID = uuid(); + let currentPathFilter = additionalFilters ?.filter((f) => { return f.i === 'path'; @@ -157,7 +160,7 @@ const SimpleCardTemplateDefault = (props) => { @@ -175,7 +181,10 @@ const SimpleCardTemplateDefault = (props) => { )} -
+
{items.map((item, index) => { const icon = show_icon ? getItemIcon(item) : null; const itemTitle = item.title || item.id; From f3bb7a4a5252f826bce8c94abeb60ebef82e2d1a Mon Sep 17 00:00:00 2001 From: Giulia Ghisini <51911425+giuliaghisini@users.noreply.github.com> Date: Wed, 14 Feb 2024 12:17:39 +0100 Subject: [PATCH 10/33] fix: button keyboard focus color (#535) --- src/theme/ItaliaTheme/_main.scss | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/theme/ItaliaTheme/_main.scss b/src/theme/ItaliaTheme/_main.scss index 0deff023d..d2b7dad38 100644 --- a/src/theme/ItaliaTheme/_main.scss +++ b/src/theme/ItaliaTheme/_main.scss @@ -61,16 +61,12 @@ a { .public-ui { a.btn.btn-primary { - color: $primary-text; - svg { fill: $primary-text; } } a.btn.btn-secondary { - color: $secondary-text; - svg { fill: $secondary-text; } From 707b6ca599dbc430dc8ea2a1a9e3efc4d12f906c Mon Sep 17 00:00:00 2001 From: Giulia Ghisini <51911425+giuliaghisini@users.noreply.github.com> Date: Thu, 15 Feb 2024 09:42:35 +0100 Subject: [PATCH 11/33] fix: focus on link and card title links (#536) * fix: focus on link and card title links * fix: link in cardWithImageAndInEvidence * fix: link as button in cms ui * fix: use display-block only more specific --- .../Blocks/_cardWithImageAndInEvidence.scss | 4 ++-- .../Blocks/_contentInEvidenceTemplate.scss | 1 + .../ItaliaTheme/Blocks/_highlitedContent.scss | 2 ++ .../Blocks/_ribbonCardTemplate.scss | 1 + .../Blocks/_simpleCardTemplate.scss | 5 ++-- src/theme/ItaliaTheme/Components/_card.scss | 23 ++++++++++--------- src/theme/_cms-ui.scss | 2 +- 7 files changed, 22 insertions(+), 16 deletions(-) diff --git a/src/theme/ItaliaTheme/Blocks/_cardWithImageAndInEvidence.scss b/src/theme/ItaliaTheme/Blocks/_cardWithImageAndInEvidence.scss index 92cd54d15..5b83c8004 100644 --- a/src/theme/ItaliaTheme/Blocks/_cardWithImageAndInEvidence.scss +++ b/src/theme/ItaliaTheme/Blocks/_cardWithImageAndInEvidence.scss @@ -11,7 +11,7 @@ .listing-item { a { - display: inline; + display: inline-block; } .img-responsive-wrapper { @@ -70,7 +70,7 @@ .card-title { a { - display: inline; + display: inline-block; //per avere il bordo tutto unito al focus di un link, ad esempio nelle card width: initial; color: $body-color; text-decoration: none; diff --git a/src/theme/ItaliaTheme/Blocks/_contentInEvidenceTemplate.scss b/src/theme/ItaliaTheme/Blocks/_contentInEvidenceTemplate.scss index 31af45eab..273c4b0f8 100644 --- a/src/theme/ItaliaTheme/Blocks/_contentInEvidenceTemplate.scss +++ b/src/theme/ItaliaTheme/Blocks/_contentInEvidenceTemplate.scss @@ -8,6 +8,7 @@ .card-title { a { + display: inline-block; //per avere il bordo tutto unito al focus di un link, ad esempio nelle card font-size: 1.7rem; line-height: 2.3rem; text-decoration: none; diff --git a/src/theme/ItaliaTheme/Blocks/_highlitedContent.scss b/src/theme/ItaliaTheme/Blocks/_highlitedContent.scss index 82d25ccb8..320ab037c 100644 --- a/src/theme/ItaliaTheme/Blocks/_highlitedContent.scss +++ b/src/theme/ItaliaTheme/Blocks/_highlitedContent.scss @@ -17,6 +17,8 @@ .card-title { a { + display: inline-block; //per avere il bordo tutto unito al focus di un link, ad esempio nelle card + color: $link-color; font-size: 1.7rem; line-height: 2.3rem; text-decoration: none; diff --git a/src/theme/ItaliaTheme/Blocks/_ribbonCardTemplate.scss b/src/theme/ItaliaTheme/Blocks/_ribbonCardTemplate.scss index 9c87266e6..c6ece4a28 100644 --- a/src/theme/ItaliaTheme/Blocks/_ribbonCardTemplate.scss +++ b/src/theme/ItaliaTheme/Blocks/_ribbonCardTemplate.scss @@ -26,6 +26,7 @@ a { text-decoration: none; + display: inline-block; //per avere il bordo tutto unito al focus di un link, ad esempio nelle card &:hover { text-decoration: underline; diff --git a/src/theme/ItaliaTheme/Blocks/_simpleCardTemplate.scss b/src/theme/ItaliaTheme/Blocks/_simpleCardTemplate.scss index 0e865348c..28bf9a5e8 100644 --- a/src/theme/ItaliaTheme/Blocks/_simpleCardTemplate.scss +++ b/src/theme/ItaliaTheme/Blocks/_simpleCardTemplate.scss @@ -36,13 +36,12 @@ .card-body { a { + display: inline-block; //per avere il bordo tutto unito al focus di un link, ad esempio nelle card &:link, &:visited { text-decoration: none; } - } - a { &:hover, &:active { text-decoration: underline; @@ -56,6 +55,7 @@ @include rem-size(font-size, 24); @include rem-size(line-height, 26); font-weight: 700; + display: inline-block; //per avere il bordo tutto unito al focus di un link, ad esempio nelle card &:hover, &:active { @@ -130,6 +130,7 @@ @include rem-size(line-height, 32); font-weight: 700; text-decoration: none; + display: inline-block; //per avere il bordo tutto unito al focus di un link, ad esempio nelle card &:hover, &:active { diff --git a/src/theme/ItaliaTheme/Components/_card.scss b/src/theme/ItaliaTheme/Components/_card.scss index 5ae2e71ec..f41242b58 100644 --- a/src/theme/ItaliaTheme/Components/_card.scss +++ b/src/theme/ItaliaTheme/Components/_card.scss @@ -14,6 +14,12 @@ border-left: 8px solid $primary-a0; box-shadow: 0px 4px 4px 0px #00000026; + .card-title { + a { + display: inline-block; //per avere il bordo tutto unito al focus di un link, ad esempio nelle card + } + } + &.card-small { @include rem-size(line-height, 24); @@ -82,6 +88,10 @@ margin-bottom: 0.3em !important; font-weight: 600; + a { + display: inline-block; //per avere il bordo tutto unito al focus di un link, ad esempio nelle card + } + a, &.venue-card-title.venue-card-title { @include rem-size(font-size, 24); @@ -108,6 +118,7 @@ h5.card-title { a { @include rem-size(font-size, 18); + display: inline-block; //per avere il bordo tutto unito al focus di un link, ad esempio nelle card text-decoration: none; text-transform: none; } @@ -141,6 +152,7 @@ @include rem-size(line-height, 24); font-weight: 600; text-decoration: none; + display: inline-block; //per avere il bordo tutto unito al focus di un link, ad esempio nelle card } a:hover { @@ -154,17 +166,6 @@ } } -.block.highlitedContent { - div.card { - h2.card-title { - a { - color: $link-color; - font-size: 1.7rem; - } - } - } -} - .block.listing.simpleCard { @include media-breakpoint-down(xl) { .card { diff --git a/src/theme/_cms-ui.scss b/src/theme/_cms-ui.scss index 065b20d9a..b4209fd67 100644 --- a/src/theme/_cms-ui.scss +++ b/src/theme/_cms-ui.scss @@ -109,7 +109,7 @@ body.cms-ui { } .public-ui { - a { + a:not(.btn) { color: $link-color; } } From 8f53eb9fd8c85f3228a9d2fce129a3896b6c188d Mon Sep 17 00:00:00 2001 From: Wagner Trezub <60133113+Wagner3UB@users.noreply.github.com> Date: Fri, 16 Feb 2024 16:53:02 +0100 Subject: [PATCH 12/33] feat: upgrade to volto-feedback 0.2.0 (#541) * chore: volto-feedback 0.2.0 * fix: yarn --- package.json | 2 +- yarn.lock | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 10b2180fa..501e3fddc 100644 --- a/package.json +++ b/package.json @@ -145,7 +145,7 @@ "volto-data-grid-widget": "2.3.1", "volto-dropdownmenu": "4.1.1", "volto-editablefooter": "5.0.3", - "volto-feedback": "0.1.5", + "volto-feedback": "0.2.0", "volto-form-block": "3.1.0", "volto-gdpr-privacy": "2.1.1", "volto-google-analytics": "2.0.0", diff --git a/yarn.lock b/yarn.lock index 98d8c880b..39c88a4ca 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6575,7 +6575,7 @@ __metadata: volto-data-grid-widget: 2.3.1 volto-dropdownmenu: 4.1.1 volto-editablefooter: 5.0.3 - volto-feedback: 0.1.5 + volto-feedback: 0.2.0 volto-form-block: 3.1.0 volto-gdpr-privacy: 2.1.1 volto-google-analytics: 2.0.0 @@ -14342,15 +14342,15 @@ __metadata: languageName: node linkType: hard -"volto-feedback@npm:0.1.5": - version: 0.1.5 - resolution: "volto-feedback@npm:0.1.5" +"volto-feedback@npm:0.2.0": + version: 0.2.0 + resolution: "volto-feedback@npm:0.2.0" dependencies: react-google-recaptcha-v3: 1.9.5 semantic-ui-css: 2.5.0 peerDependencies: "@plone/volto": ">=16.0.0" - checksum: 1674a91100f8410e6f0851b58febcfd21fbe0cb9a2daa8f6ce73f30b1dd57cc533b8612cf6af5fab89cf68583239dd6c0933d607f5c56027264834c913dd3780 + checksum: ada1f08b987352d5856c2ade2aea4c26cf13a7d19f5e132fcb3213231b7f8e4b7d64fda981931a010c271002d3e76eb09759065274498a594c2dc0d0772e98b1 languageName: node linkType: hard From 51a2f8b4d49d8490c5cf493712b981c208cc2341 Mon Sep 17 00:00:00 2001 From: Giulia Ghisini <51911425+giuliaghisini@users.noreply.github.com> Date: Fri, 16 Feb 2024 16:54:36 +0100 Subject: [PATCH 13/33] fix: display error in feedback form (#538) --- 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 ++++- .../CustomerSatisfaction/FeedbackForm.jsx | 26 +++++++++++++++++++ 7 files changed, 57 insertions(+), 1 deletion(-) diff --git a/locales/de/LC_MESSAGES/volto.po b/locales/de/LC_MESSAGES/volto.po index 9f022e6c5..7e81f2187 100644 --- a/locales/de/LC_MESSAGES/volto.po +++ b/locales/de/LC_MESSAGES/volto.po @@ -1995,6 +1995,11 @@ msgstr "" msgid "feedback_complete_instructions" msgstr "" +#: components/ItaliaTheme/CustomerSatisfaction/FeedbackForm +# defaultMessage: Error +msgid "feedback_error" +msgstr "" + #: components/ItaliaTheme/CustomerSatisfaction/FeedbackForm # defaultMessage: Next msgid "feedback_form_button_next" diff --git a/locales/en/LC_MESSAGES/volto.po b/locales/en/LC_MESSAGES/volto.po index 2c307c640..cb55378f2 100644 --- a/locales/en/LC_MESSAGES/volto.po +++ b/locales/en/LC_MESSAGES/volto.po @@ -1980,6 +1980,11 @@ msgstr "" msgid "feedback_complete_instructions" msgstr "" +#: components/ItaliaTheme/CustomerSatisfaction/FeedbackForm +# defaultMessage: Error +msgid "feedback_error" +msgstr "" + #: components/ItaliaTheme/CustomerSatisfaction/FeedbackForm # defaultMessage: Next msgid "feedback_form_button_next" diff --git a/locales/es/LC_MESSAGES/volto.po b/locales/es/LC_MESSAGES/volto.po index 202cc5bba..f2ddb610a 100644 --- a/locales/es/LC_MESSAGES/volto.po +++ b/locales/es/LC_MESSAGES/volto.po @@ -1989,6 +1989,11 @@ msgstr "" msgid "feedback_complete_instructions" msgstr "" +#: components/ItaliaTheme/CustomerSatisfaction/FeedbackForm +# defaultMessage: Error +msgid "feedback_error" +msgstr "" + #: components/ItaliaTheme/CustomerSatisfaction/FeedbackForm # defaultMessage: Next msgid "feedback_form_button_next" diff --git a/locales/fr/LC_MESSAGES/volto.po b/locales/fr/LC_MESSAGES/volto.po index 75c8e3e16..2c0b49649 100644 --- a/locales/fr/LC_MESSAGES/volto.po +++ b/locales/fr/LC_MESSAGES/volto.po @@ -1997,6 +1997,11 @@ msgstr "" msgid "feedback_complete_instructions" msgstr "" +#: components/ItaliaTheme/CustomerSatisfaction/FeedbackForm +# defaultMessage: Error +msgid "feedback_error" +msgstr "" + #: components/ItaliaTheme/CustomerSatisfaction/FeedbackForm # defaultMessage: Next msgid "feedback_form_button_next" diff --git a/locales/it/LC_MESSAGES/volto.po b/locales/it/LC_MESSAGES/volto.po index af6eeb3aa..e71f4966d 100644 --- a/locales/it/LC_MESSAGES/volto.po +++ b/locales/it/LC_MESSAGES/volto.po @@ -1980,6 +1980,11 @@ msgstr "Dettaglio" msgid "feedback_complete_instructions" msgstr "Le indicazioni erano complete" +#: components/ItaliaTheme/CustomerSatisfaction/FeedbackForm +# defaultMessage: Error +msgid "feedback_error" +msgstr "Errore" + #: components/ItaliaTheme/CustomerSatisfaction/FeedbackForm # defaultMessage: Next msgid "feedback_form_button_next" diff --git a/locales/volto.pot b/locales/volto.pot index 99d704502..9c408e606 100644 --- a/locales/volto.pot +++ b/locales/volto.pot @@ -1,7 +1,7 @@ msgid "" msgstr "" "Project-Id-Version: Plone\n" -"POT-Creation-Date: 2024-02-08T09:29:49.246Z\n" +"POT-Creation-Date: 2024-02-15T11:19:07.787Z\n" "Last-Translator: Plone i18n \n" "Language-Team: Plone i18n \n" "MIME-Version: 1.0\n" @@ -1982,6 +1982,11 @@ msgstr "" msgid "feedback_complete_instructions" msgstr "" +#: components/ItaliaTheme/CustomerSatisfaction/FeedbackForm +# defaultMessage: Error +msgid "feedback_error" +msgstr "" + #: components/ItaliaTheme/CustomerSatisfaction/FeedbackForm # defaultMessage: Next msgid "feedback_form_button_next" diff --git a/src/components/ItaliaTheme/CustomerSatisfaction/FeedbackForm.jsx b/src/components/ItaliaTheme/CustomerSatisfaction/FeedbackForm.jsx index d169e74e2..cbf73ecd1 100644 --- a/src/components/ItaliaTheme/CustomerSatisfaction/FeedbackForm.jsx +++ b/src/components/ItaliaTheme/CustomerSatisfaction/FeedbackForm.jsx @@ -11,6 +11,7 @@ import { Card, Button, CardHeader, + CardBody, } from 'design-react-kit'; import { getNumberOfSteps, @@ -110,6 +111,10 @@ const messages = defineMessages({ id: 'feedback_other_positive', defaultMessage: 'Other', }, + error: { + id: 'feedback_error', + defaultMessage: 'Error', + }, }); const FeedbackForm = ({ contentType, pathname }) => { @@ -213,6 +218,7 @@ const FeedbackForm = ({ contentType, pathname }) => { if (isCmsUi(path)) { return null; } + return (
@@ -354,6 +360,26 @@ const FeedbackForm = ({ contentType, pathname }) => { )} + {step === 2 && + !submitResults?.loaded && + !submitResults.loading && + submitResults.error?.response?.body?.message && ( + <> + +

+ {intl.formatMessage(messages.error)}{' '} + {submitResults.error?.response.status}:{' '} + {submitResults.error?.response.statusText} +

+
+ + {submitResults.error?.response?.body?.message} + + + )}
From 6209b62ae5808972998b7bd0d6c8c1683018c469 Mon Sep 17 00:00:00 2001 From: Piero Nicolli Date: Fri, 16 Feb 2024 17:04:18 +0100 Subject: [PATCH 14/33] 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 d27849106..a68846b7b 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -41,7 +41,7 @@ - ... --> -## Versione X.X.X (dd/mm/yyyy) +## Versione 11.5.0 (16/02/2024) ### Migliorie diff --git a/publiccode.yml b/publiccode.yml index a169778f6..eda5aed82 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-02-08' +releaseDate: '2024-02-16' softwareType: standalone/web -softwareVersion: 11.4.1 +softwareVersion: 11.5.0 url: 'https://github.com/italia/design-comuni-plone-theme' usedBy: - ASP Comuni Modenesi Area Nord From 9747bd7b6083600acfdebfd5b11314c71127a271 Mon Sep 17 00:00:00 2001 From: Piero Nicolli Date: Fri, 16 Feb 2024 17:11:41 +0100 Subject: [PATCH 15/33] chore: release v11.5.0 --- CHANGELOG.md | 26 ++++++++++++++++++++++++++ package.json | 2 +- 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a7ab058a9..fb208f3b5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,31 @@ +## [11.5.0](https://github.com/redturtle/design-comuni-plone-theme/compare/v11.4.1...v11.5.0) (2024-02-16) + + +### Features + +* upgrade to volto-feedback 0.2.0 ([#541](https://github.com/redturtle/design-comuni-plone-theme/issues/541)) ([8f53eb9](https://github.com/redturtle/design-comuni-plone-theme/commit/8f53eb9fd8c85f3228a9d2fce129a3896b6c188d)) + + +### Bug Fixes + +* button keyboard focus color ([#535](https://github.com/redturtle/design-comuni-plone-theme/issues/535)) ([f3bb7a4](https://github.com/redturtle/design-comuni-plone-theme/commit/f3bb7a4a5252f826bce8c94abeb60ebef82e2d1a)) +* dates layout in CardWithImage template and 4 columns layout ([#532](https://github.com/redturtle/design-comuni-plone-theme/issues/532)) ([af9dfc7](https://github.com/redturtle/design-comuni-plone-theme/commit/af9dfc79f69e67969c4a7894e16ccd343dee76b1)) +* display error in feedback form ([#538](https://github.com/redturtle/design-comuni-plone-theme/issues/538)) ([51a2f8b](https://github.com/redturtle/design-comuni-plone-theme/commit/51a2f8b4d49d8490c5cf493712b981c208cc2341)) +* focus on link and card title links ([#536](https://github.com/redturtle/design-comuni-plone-theme/issues/536)) ([707b6ca](https://github.com/redturtle/design-comuni-plone-theme/commit/707b6ca599dbc430dc8ea2a1a9e3efc4d12f906c)) +* hidden pagination size field from calendar block props ([#531](https://github.com/redturtle/design-comuni-plone-theme/issues/531)) ([92d734e](https://github.com/redturtle/design-comuni-plone-theme/commit/92d734ec7a3b625498658d5d12b1681677d3da87)) +* navigation reducer bug happening in 404 pages ([a6837d0](https://github.com/redturtle/design-comuni-plone-theme/commit/a6837d0d8277ac8a5ae8b149651ce65039405471)) +* query for listing path filters ([#530](https://github.com/redturtle/design-comuni-plone-theme/issues/530)) ([34739ea](https://github.com/redturtle/design-comuni-plone-theme/commit/34739eac771ef385a9ad2d12ee1f64d0fe9490d7)) +* query listing path filter color status and a11y ([#534](https://github.com/redturtle/design-comuni-plone-theme/issues/534)) ([f51dbad](https://github.com/redturtle/design-comuni-plone-theme/commit/f51dbad4dd8beb7fbb8ab3e5fd4593cab194b992)) +* Timeline now also shows year if event spans multiple years in Event view ([#533](https://github.com/redturtle/design-comuni-plone-theme/issues/533)) ([30cf623](https://github.com/redturtle/design-comuni-plone-theme/commit/30cf6236522f9533144b3ad1c5e4788174c4f60b)) +* wrong date display for events that span on multiple years ([#529](https://github.com/redturtle/design-comuni-plone-theme/issues/529)) ([e579fc4](https://github.com/redturtle/design-comuni-plone-theme/commit/e579fc4c05cac04f9f998916a2ea8285ff942311)) + + +### Documentation + +* updated publiccode and release log ([6209b62](https://github.com/redturtle/design-comuni-plone-theme/commit/6209b62ae5808972998b7bd0d6c8c1683018c469)) + ## [11.4.1](https://github.com/redturtle/design-comuni-plone-theme/compare/v11.4.0...v11.4.1) (2024-02-08) diff --git a/package.json b/package.json index 501e3fddc..e1b3cded1 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.4.1", + "version": "11.5.0", "main": "src/index.js", "keywords": [ "volto-addon", From a9e33fe6765f5635afc6f856d778495cbe815350 Mon Sep 17 00:00:00 2001 From: sabrina-bongiovanni <116291154+sabrina-bongiovanni@users.noreply.github.com> Date: Mon, 19 Feb 2024 13:03:14 +0100 Subject: [PATCH 16/33] fix: added component to show update_note field on Bandi view (#543) * fix: added component to show update_note field on Bandi view * chore: generated translation files * chore: added label in EN --- RELEASE.md | 6 ++++ 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 ++++- .../View/BandoView/BandoNoteAggiornamento.jsx | 29 +++++++++++++++++++ .../ItaliaTheme/View/BandoView/BandoView.jsx | 2 ++ src/components/ItaliaTheme/View/index.js | 1 + 10 files changed, 69 insertions(+), 1 deletion(-) create mode 100644 src/components/ItaliaTheme/View/BandoView/BandoNoteAggiornamento.jsx diff --git a/RELEASE.md b/RELEASE.md index a68846b7b..06801884c 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -41,6 +41,12 @@ - ... --> +## Versione X.X.X (dd/mm/yyyy) + +### Migliorie + +- Il campo "Note aggiornamento" nel Tipo di Contenuto Bandi viene ora mostrato in pagina, se compilato. + ## Versione 11.5.0 (16/02/2024) ### Migliorie diff --git a/locales/de/LC_MESSAGES/volto.po b/locales/de/LC_MESSAGES/volto.po index 7e81f2187..11169f419 100644 --- a/locales/de/LC_MESSAGES/volto.po +++ b/locales/de/LC_MESSAGES/volto.po @@ -2564,6 +2564,11 @@ msgstr "" msgid "nominativo" msgstr "" +#: components/ItaliaTheme/View/BandoView/BandoNoteAggiornamento +# defaultMessage: Note di aggiornamento +msgid "note_aggiornamento" +msgstr "" + #: components/ItaliaTheme/View/Commons/RelatedItems # defaultMessage: Novità msgid "novita" diff --git a/locales/en/LC_MESSAGES/volto.po b/locales/en/LC_MESSAGES/volto.po index cb55378f2..d7e1395e1 100644 --- a/locales/en/LC_MESSAGES/volto.po +++ b/locales/en/LC_MESSAGES/volto.po @@ -2549,6 +2549,11 @@ msgstr "" msgid "nominativo" msgstr "nominative" +#: components/ItaliaTheme/View/BandoView/BandoNoteAggiornamento +# defaultMessage: Note di aggiornamento +msgid "note_aggiornamento" +msgstr "Update notes" + #: components/ItaliaTheme/View/Commons/RelatedItems # defaultMessage: Novità msgid "novita" diff --git a/locales/es/LC_MESSAGES/volto.po b/locales/es/LC_MESSAGES/volto.po index f2ddb610a..aeeadfd4a 100644 --- a/locales/es/LC_MESSAGES/volto.po +++ b/locales/es/LC_MESSAGES/volto.po @@ -2558,6 +2558,11 @@ msgstr "No hay vídeos seleccionados. Agregar un elemento para mostrar un vídeo msgid "nominativo" msgstr "nominativa" +#: components/ItaliaTheme/View/BandoView/BandoNoteAggiornamento +# defaultMessage: Note di aggiornamento +msgid "note_aggiornamento" +msgstr "" + #: components/ItaliaTheme/View/Commons/RelatedItems # defaultMessage: Novità msgid "novita" diff --git a/locales/fr/LC_MESSAGES/volto.po b/locales/fr/LC_MESSAGES/volto.po index 2c0b49649..742faab64 100644 --- a/locales/fr/LC_MESSAGES/volto.po +++ b/locales/fr/LC_MESSAGES/volto.po @@ -2566,6 +2566,11 @@ msgstr "" msgid "nominativo" msgstr "nominatif" +#: components/ItaliaTheme/View/BandoView/BandoNoteAggiornamento +# defaultMessage: Note di aggiornamento +msgid "note_aggiornamento" +msgstr "" + #: components/ItaliaTheme/View/Commons/RelatedItems # defaultMessage: Novità msgid "novita" diff --git a/locales/it/LC_MESSAGES/volto.po b/locales/it/LC_MESSAGES/volto.po index e71f4966d..66b703041 100644 --- a/locales/it/LC_MESSAGES/volto.po +++ b/locales/it/LC_MESSAGES/volto.po @@ -2549,6 +2549,11 @@ msgstr "Nessun video selezionato. Aggiungi un elemento per mostrare un video" msgid "nominativo" msgstr "nominativo" +#: components/ItaliaTheme/View/BandoView/BandoNoteAggiornamento +# defaultMessage: Note di aggiornamento +msgid "note_aggiornamento" +msgstr "" + #: components/ItaliaTheme/View/Commons/RelatedItems # defaultMessage: Novità msgid "novita" diff --git a/locales/volto.pot b/locales/volto.pot index 9c408e606..66dd1eaaa 100644 --- a/locales/volto.pot +++ b/locales/volto.pot @@ -1,7 +1,7 @@ msgid "" msgstr "" "Project-Id-Version: Plone\n" -"POT-Creation-Date: 2024-02-15T11:19:07.787Z\n" +"POT-Creation-Date: 2024-02-19T11:08:36.048Z\n" "Last-Translator: Plone i18n \n" "Language-Team: Plone i18n \n" "MIME-Version: 1.0\n" @@ -2551,6 +2551,11 @@ msgstr "" msgid "nominativo" msgstr "" +#: components/ItaliaTheme/View/BandoView/BandoNoteAggiornamento +# defaultMessage: Note di aggiornamento +msgid "note_aggiornamento" +msgstr "" + #: components/ItaliaTheme/View/Commons/RelatedItems # defaultMessage: Novità msgid "novita" diff --git a/src/components/ItaliaTheme/View/BandoView/BandoNoteAggiornamento.jsx b/src/components/ItaliaTheme/View/BandoView/BandoNoteAggiornamento.jsx new file mode 100644 index 000000000..1be37e009 --- /dev/null +++ b/src/components/ItaliaTheme/View/BandoView/BandoNoteAggiornamento.jsx @@ -0,0 +1,29 @@ +import React from 'react'; +import PropTypes from 'prop-types'; +import { defineMessages, useIntl } from 'react-intl'; + +const messages = defineMessages({ + note_aggiornamento: { + id: 'note_aggiornamento', + defaultMessage: 'Note di aggiornamento', + }, +}); + +const BandoNoteAggiornamento = ({ content }) => { + const intl = useIntl(); + return content?.update_note ? ( +
+

{intl.formatMessage(messages.note_aggiornamento)}

+ {content?.update_note} +
+ ) : ( + <> + ); +}; + +BandoNoteAggiornamento.propTypes = { + content: PropTypes.shape({ + update_note: PropTypes.shape(PropTypes.string), + }).isRequired, +}; +export default BandoNoteAggiornamento; diff --git a/src/components/ItaliaTheme/View/BandoView/BandoView.jsx b/src/components/ItaliaTheme/View/BandoView/BandoView.jsx index 3243599a3..0b04c2e8a 100644 --- a/src/components/ItaliaTheme/View/BandoView/BandoView.jsx +++ b/src/components/ItaliaTheme/View/BandoView/BandoView.jsx @@ -17,6 +17,7 @@ import { BandoServizi, BandoDate, BandoApprofondimenti, + BandoNoteAggiornamento, BandoUlterioriInformazioni, RelatedItemInEvidence, SkipToMainContent, @@ -34,6 +35,7 @@ export const BandoViewSectionsOrder = [ { /* ALLEGATI (CARTELLE APPROFONDIMENTI) */ component: BandoApprofondimenti, }, + { /* NOTE AGGIORNAMENTO */ component: BandoNoteAggiornamento }, { /* ULTERIORI INFORMAZIONI */ component: BandoUlterioriInformazioni }, ]; /** diff --git a/src/components/ItaliaTheme/View/index.js b/src/components/ItaliaTheme/View/index.js index 697a90bf4..2c6c9c083 100644 --- a/src/components/ItaliaTheme/View/index.js +++ b/src/components/ItaliaTheme/View/index.js @@ -85,6 +85,7 @@ export BandoAreaResponsabile from 'design-comuni-plone-theme/components/ItaliaTh export BandoServizi from 'design-comuni-plone-theme/components/ItaliaTheme/View/BandoView/BandoServizi'; export BandoDate from 'design-comuni-plone-theme/components/ItaliaTheme/View/BandoView/BandoDate'; export BandoApprofondimenti from 'design-comuni-plone-theme/components/ItaliaTheme/View/BandoView/BandoApprofondimenti'; +export BandoNoteAggiornamento from 'design-comuni-plone-theme/components/ItaliaTheme/View/BandoView/BandoNoteAggiornamento'; export BandoUlterioriInformazioni from 'design-comuni-plone-theme/components/ItaliaTheme/View/BandoView/BandoUlterioriInformazioni'; export CartellaModulisticaAfterContent from 'design-comuni-plone-theme/components/ItaliaTheme/View/CartellaModulisticaView/Placeholder/AfterContent'; From 0f2200e7a433c7721f8521f5f79b617d1b8c6910 Mon Sep 17 00:00:00 2001 From: Piero Nicolli Date: Mon, 19 Feb 2024 17:25:55 +0100 Subject: [PATCH 17/33] 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 06801884c..5ab105369 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -41,7 +41,7 @@ - ... --> -## Versione X.X.X (dd/mm/yyyy) +## Versione 11.5.1 (19/02/2024) ### Migliorie diff --git a/publiccode.yml b/publiccode.yml index eda5aed82..42033cd04 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-02-16' +releaseDate: '2024-02-19' softwareType: standalone/web -softwareVersion: 11.5.0 +softwareVersion: 11.5.1 url: 'https://github.com/italia/design-comuni-plone-theme' usedBy: - ASP Comuni Modenesi Area Nord From 0dff987684d2fc18d391d2667d985c57bc392e1d Mon Sep 17 00:00:00 2001 From: Piero Nicolli Date: Mon, 19 Feb 2024 17:29:56 +0100 Subject: [PATCH 18/33] chore: release v11.5.1 --- CHANGELOG.md | 12 ++++++++++++ package.json | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fb208f3b5..d4e975c9d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,17 @@ +## [11.5.1](https://github.com/redturtle/design-comuni-plone-theme/compare/v11.5.0...v11.5.1) (2024-02-19) + + +### Bug Fixes + +* added component to show update_note field on Bandi view ([#543](https://github.com/redturtle/design-comuni-plone-theme/issues/543)) ([a9e33fe](https://github.com/redturtle/design-comuni-plone-theme/commit/a9e33fe6765f5635afc6f856d778495cbe815350)) + + +### Documentation + +* updated publiccode and release log ([0f2200e](https://github.com/redturtle/design-comuni-plone-theme/commit/0f2200e7a433c7721f8521f5f79b617d1b8c6910)) + ## [11.5.0](https://github.com/redturtle/design-comuni-plone-theme/compare/v11.4.1...v11.5.0) (2024-02-16) diff --git a/package.json b/package.json index e1b3cded1..1cffd6c7f 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.5.0", + "version": "11.5.1", "main": "src/index.js", "keywords": [ "volto-addon", From 77ff653c0f9ed5af3a87748da75bb7cb7481fecb Mon Sep 17 00:00:00 2001 From: sabrina-bongiovanni <116291154+sabrina-bongiovanni@users.noreply.github.com> Date: Thu, 22 Feb 2024 15:17:00 +0100 Subject: [PATCH 19/33] fix: removed capitalized style from pdc description (#549) --- RELEASE.md | 6 ++++++ src/components/ItaliaTheme/View/Commons/ContactsCard.jsx | 6 ++++-- src/theme/ItaliaTheme/Components/_contactsCard.scss | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/RELEASE.md b/RELEASE.md index 5ab105369..da7ebaca0 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -41,6 +41,12 @@ - ... --> +## Versione X.X.X (dd/mm/yyyy) + +### Fix + +- La descrizione nelle card per i punti di contatto non mostrano più tutte le iniziali in maiuscolo. + ## Versione 11.5.1 (19/02/2024) ### Migliorie diff --git a/src/components/ItaliaTheme/View/Commons/ContactsCard.jsx b/src/components/ItaliaTheme/View/Commons/ContactsCard.jsx index 485636845..358b4fb44 100644 --- a/src/components/ItaliaTheme/View/Commons/ContactsCard.jsx +++ b/src/components/ItaliaTheme/View/Commons/ContactsCard.jsx @@ -57,8 +57,10 @@ const ContactsCard = ({ contact = {}, show_title = false, ...rest }) => { {data?.value_punto_contatto.map((pdc, index) => ( - {pdc.pdc_type} - {pdc.pdc_desc ? ` - ${pdc.pdc_desc}` : ''}:{' '} + {pdc.pdc_type} + + {pdc.pdc_desc ? ` - ${pdc.pdc_desc}` : ''}:{' '} + {renderPDCItemValue(pdc, intl)} diff --git a/src/theme/ItaliaTheme/Components/_contactsCard.scss b/src/theme/ItaliaTheme/Components/_contactsCard.scss index 4e31eb3da..9bfdded3c 100644 --- a/src/theme/ItaliaTheme/Components/_contactsCard.scss +++ b/src/theme/ItaliaTheme/Components/_contactsCard.scss @@ -9,7 +9,7 @@ flex: 1 1 100%; } - strong { + .pdc-type { font-weight: 600; text-transform: capitalize; } From a4af563d75790bfba332b1c70285d414db6dfa68 Mon Sep 17 00:00:00 2001 From: sabrina-bongiovanni <116291154+sabrina-bongiovanni@users.noreply.github.com> Date: Fri, 23 Feb 2024 09:23:26 +0100 Subject: [PATCH 20/33] fix: link styles for mobile menu in subsites (#551) --- RELEASE.md | 1 + .../ItaliaTheme/Components/_parentSiteMenu.scss | 2 +- src/theme/ItaliaTheme/Subsites/_mixin.scss | 2 +- .../bootstrap-italia/custom/_headerslim.scss | 4 ++-- .../bootstrap-italia/custom/_navigation.scss | 13 +++++++++++++ 5 files changed, 18 insertions(+), 4 deletions(-) diff --git a/RELEASE.md b/RELEASE.md index da7ebaca0..f81332d82 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -46,6 +46,7 @@ ### Fix - La descrizione nelle card per i punti di contatto non mostrano più tutte le iniziali in maiuscolo. +- Il colore dei link nel menu mobile è ora accessibile per tutti i temi. ## Versione 11.5.1 (19/02/2024) diff --git a/src/theme/ItaliaTheme/Components/_parentSiteMenu.scss b/src/theme/ItaliaTheme/Components/_parentSiteMenu.scss index e67e00953..f17d9a959 100644 --- a/src/theme/ItaliaTheme/Components/_parentSiteMenu.scss +++ b/src/theme/ItaliaTheme/Components/_parentSiteMenu.scss @@ -39,7 +39,7 @@ margin-top: 1.5rem; margin-bottom: 1.5rem; margin-left: 1.5rem; - background: rgba(92, 111, 130, 0.5); + background: rgba($primary, 0.5); content: ''; } diff --git a/src/theme/ItaliaTheme/Subsites/_mixin.scss b/src/theme/ItaliaTheme/Subsites/_mixin.scss index 4c6a8559c..d0392abcb 100644 --- a/src/theme/ItaliaTheme/Subsites/_mixin.scss +++ b/src/theme/ItaliaTheme/Subsites/_mixin.scss @@ -70,7 +70,7 @@ ); @include bs-brandtext.text($subsite-primary, $subsite-primary-text); @include bs-headernavbar.navbar($subsite-primary); - @include bs-headerslim.header($subsite-primary-text); + @include bs-headerslim.header($subsite-primary-text, $subsite-link-color); @include bs-navigation.nav( $subsite-light-theme, $subsite-primary, diff --git a/src/theme/ItaliaTheme/Subsites/bootstrap-italia/custom/_headerslim.scss b/src/theme/ItaliaTheme/Subsites/bootstrap-italia/custom/_headerslim.scss index dd6cc8245..73e2961ad 100644 --- a/src/theme/ItaliaTheme/Subsites/bootstrap-italia/custom/_headerslim.scss +++ b/src/theme/ItaliaTheme/Subsites/bootstrap-italia/custom/_headerslim.scss @@ -1,6 +1,6 @@ @use '../../all_variables' as *; -@mixin header($subsite-primary-text) { +@mixin header($subsite-primary-text, $subsite-link-color) { &.cms-ui .public-ui { .it-header-slim-wrapper { .it-header-slim-wrapper-content { @@ -34,7 +34,7 @@ .parent-site-menu { li.nav-item { a.nav-link { - color: $subsite-primary-text; + color: $subsite-link-color; } } } diff --git a/src/theme/ItaliaTheme/Subsites/bootstrap-italia/custom/_navigation.scss b/src/theme/ItaliaTheme/Subsites/bootstrap-italia/custom/_navigation.scss index 0f279f1a8..c5836b3e2 100644 --- a/src/theme/ItaliaTheme/Subsites/bootstrap-italia/custom/_navigation.scss +++ b/src/theme/ItaliaTheme/Subsites/bootstrap-italia/custom/_navigation.scss @@ -132,9 +132,22 @@ .navbar-nav { li a.nav-link { font-size: 16px; + color: $subsite-link-color; + + &.active { + border-left-color: $subsite-link-color; + } + + svg { + fill: $subsite-link-color !important; + } } } + .it-socials ul li .icon { + fill: $subsite-link-color; + } + .link-list-wrapper { ul li { a { From aa04c9da2feb4d04e9fdb279dab87394ac69663a Mon Sep 17 00:00:00 2001 From: sabrina-bongiovanni <116291154+sabrina-bongiovanni@users.noreply.github.com> Date: Fri, 23 Feb 2024 09:24:04 +0100 Subject: [PATCH 21/33] fix: changed color of icon on primary background (#550) --- RELEASE.md | 1 + src/theme/ItaliaTheme/_white-header.scss | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/RELEASE.md b/RELEASE.md index f81332d82..48174e912 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -45,6 +45,7 @@ ### Fix +- L'icona per aprire il menu in mobile è ora visibile anche quando l'header del sito è bianca. - La descrizione nelle card per i punti di contatto non mostrano più tutte le iniziali in maiuscolo. - Il colore dei link nel menu mobile è ora accessibile per tutti i temi. diff --git a/src/theme/ItaliaTheme/_white-header.scss b/src/theme/ItaliaTheme/_white-header.scss index 54a25170f..8601d1358 100644 --- a/src/theme/ItaliaTheme/_white-header.scss +++ b/src/theme/ItaliaTheme/_white-header.scss @@ -55,7 +55,7 @@ } @media (max-width: map-get($map: $grid-breakpoints, $key: 'lg') - 1px) { button.custom-navbar-toggler svg.icon { - fill: $primary; + fill: color-contrast($primary); } } } From 01ed12b577e6e30e5d5b8cae60bb38ef2708156c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 27 Feb 2024 10:17:25 +0100 Subject: [PATCH 22/33] chore(deps): bump ip from 1.1.8 to 1.1.9 (#548) Bumps [ip](https://github.com/indutny/node-ip) from 1.1.8 to 1.1.9. - [Commits](https://github.com/indutny/node-ip/compare/v1.1.8...v1.1.9) --- updated-dependencies: - dependency-name: ip dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 39c88a4ca..cd2736b72 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8786,9 +8786,9 @@ __metadata: linkType: hard "ip@npm:^1.1.8": - version: 1.1.8 - resolution: "ip@npm:1.1.8" - checksum: a2ade53eb339fb0cbe9e69a44caab10d6e3784662285eb5d2677117ee4facc33a64679051c35e0dfdb1a3983a51ce2f5d2cb36446d52e10d01881789b76e28fb + version: 1.1.9 + resolution: "ip@npm:1.1.9" + checksum: b6d91fd45a856e3bd6d4f601ea0619d90f3517638f6918ebd079f959a8a6308568d8db5ef4fdf037e0d9cfdcf264f46833dfeea81ca31309cf0a7eb4b1307b84 languageName: node linkType: hard From 62aa71bac27cc141417e8b8901ec5ed27db58e1c Mon Sep 17 00:00:00 2001 From: sabrina-bongiovanni <116291154+sabrina-bongiovanni@users.noreply.github.com> Date: Mon, 4 Mar 2024 12:39:34 +0100 Subject: [PATCH 23/33] fix: better alt text for nexGenerationEU logo (#552) --- RELEASE.md | 1 + src/components/ItaliaTheme/Footer/FooterPNRRLogo.jsx | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/RELEASE.md b/RELEASE.md index 48174e912..3c752e10f 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -48,6 +48,7 @@ - L'icona per aprire il menu in mobile è ora visibile anche quando l'header del sito è bianca. - La descrizione nelle card per i punti di contatto non mostrano più tutte le iniziali in maiuscolo. - Il colore dei link nel menu mobile è ora accessibile per tutti i temi. +- Migliorato il testo alternativo per il logo NextGenerationEU nel footer. ## Versione 11.5.1 (19/02/2024) diff --git a/src/components/ItaliaTheme/Footer/FooterPNRRLogo.jsx b/src/components/ItaliaTheme/Footer/FooterPNRRLogo.jsx index fd118b02c..3669e9d5d 100644 --- a/src/components/ItaliaTheme/Footer/FooterPNRRLogo.jsx +++ b/src/components/ItaliaTheme/Footer/FooterPNRRLogo.jsx @@ -7,7 +7,7 @@ const FooterPNRRLogo = () => { src={logoPNRR} width="167" height="41" - alt="NextGenerationEU" + alt="Finanziato dall'Unione Europea - Next Generation EU" loading="lazy" decoding="async" className="nextGenerationEULogo" From 4a1d0ac708c06d1945b76f56673c3c8b89755825 Mon Sep 17 00:00:00 2001 From: Sara Bianchi <43245702+SaraBianchi@users.noreply.github.com> Date: Mon, 4 Mar 2024 13:51:41 +0100 Subject: [PATCH 24/33] feat: updated volto-form-block v3.3.1 and added new features in custom components, fixed layout and invalid field messages and select from drop-down menu (#556) * feat!: upgrade to volto 17.5.0 (#382) * fix: change image component in ctablock * ci: upgrade volto * fix: change image component in hlcontent * fix: change image component listingimage * fix: change image component subevents * fix: change image component gallery * fix: change image component GenericCard * fix: change image component * fix: change image component (sponsor + venuesmall) * fix: change image component * fix: minutes with 00 format * docs: rimosso commento obsoleto * fix: review giulia * fix: review giulia * fix: scroll position on h2 .visually-hidden * feat: upgrade to volto 17.5.0 * docs: fix order Co-authored-by: Piero Nicolli * fix: review piero * fix: sponsor evento without image * fix: gallery preview --------- Co-authored-by: Giulia Ghisini Co-authored-by: Piero Nicolli * feat!: upgrade to design-react-kit 5.0.0-1 and bootstrap-italia 2.6.1 (#407) * fix: change image component in ctablock * ci: upgrade volto * fix: change image component in hlcontent * fix: change image component listingimage * fix: change image component subevents * fix: change image component gallery * fix: change image component GenericCard * fix: change image component * fix: change image component (sponsor + venuesmall) * fix: change image component * fix: minutes with 00 format * docs: rimosso commento obsoleto * fix: review giulia * fix: review giulia * fix: scroll position on h2 .visually-hidden * feat: upgrade to volto 17.5.0 * docs: fix order Co-authored-by: Piero Nicolli * fix: review piero * fix: sponsor evento without image * fix: gallery preview * feat: upgrade to design-react-kit 5.0.0-1 and bootstrap-italia 2.6.1 * fix: fix for new design-react-kit * fix: card image height changed like bootstrap-italia templates * fix: revert card image height changed like bootstrap-italia templates * fix: stepper style ul * fix. pr fixes * chore: updated locales * fix: screen reader for SearchModal * fix: screen reader in SearchModal * chore: update dependencies * fix: bootstrap imports * fix: locales * fix: duplicate css --------- Co-authored-by: Mauro Amico Co-authored-by: Piero Nicolli Co-authored-by: Piero Nicolli * chore: release v11.0.0-alpha.0 * feat!: card image height from newest bootstrap-italia version (#406) * fix: change image component in ctablock * ci: upgrade volto * fix: change image component in hlcontent * fix: change image component listingimage * fix: change image component subevents * fix: change image component gallery * fix: change image component GenericCard * fix: change image component * fix: change image component (sponsor + venuesmall) * fix: change image component * fix: minutes with 00 format * docs: rimosso commento obsoleto * fix: review giulia * fix: review giulia * fix: scroll position on h2 .visually-hidden * feat: upgrade to volto 17.5.0 * docs: fix order Co-authored-by: Piero Nicolli * fix: review piero * fix: sponsor evento without image * fix: gallery preview * feat: upgrade to design-react-kit 5.0.0-1 and bootstrap-italia 2.6.1 * fix: fix for new design-react-kit * fix: card image height changed like bootstrap-italia templates * fix: revert card image height changed like bootstrap-italia templates * fix: revert text-secondary class * fix: stepper style ul * fix. pr fixes * chore: updated locales * fix: screen reader for SearchModal * fix: screen reader in SearchModal * chore: update dependencies * fix: bootstrap imports * chore: release v11.0.0-alpha.0 * feat:change image card height --------- Co-authored-by: Mauro Amico Co-authored-by: Piero Nicolli Co-authored-by: Piero Nicolli * fix: listing block card-slide-text-template read-more alignment (#416) * chore: release v11.0.0-alpha.1 * fix: image size in listing * fix: update volto-editablefooter to 5.0.3 * fix: gallery component for ct views breaking with newer backend versions (#422) * fix: background image for NumbersBlock and Countdown block (#423) * fix: background image for NumbersBlock and Countdown block * fix: tests * chore: release v11.0.0-alpha.2 * style: fixed input form style * docs: updated release.md and changelog files * fix: remain in form if there's errors on sending form * chore: updated input type file with aria-invalid and required attributes * chore: updated formView with legend tag for required fields * chore: updated locales and release.md * feat: updated volto-form-block v3.3.1 and added new features in custom components --------- Co-authored-by: Mauro Amico Co-authored-by: Giulia Ghisini Co-authored-by: Piero Nicolli Co-authored-by: Giulia Ghisini <51911425+giuliaghisini@users.noreply.github.com> Co-authored-by: Piero Nicolli --- CHANGELOG.md | 2 +- RELEASE.md | 12 ++- locales/de/LC_MESSAGES/volto.po | 15 +++ locales/en/LC_MESSAGES/volto.po | 15 +++ locales/es/LC_MESSAGES/volto.po | 15 +++ locales/fr/LC_MESSAGES/volto.po | 15 +++ locales/it/LC_MESSAGES/volto.po | 15 +++ locales/volto.pot | 17 +++- package.json | 2 +- .../ItaliaTheme/manage/Widgets/FileWidget.jsx | 16 +++- .../volto-form-block/components/Edit.jsx | 12 +++ .../volto-form-block/components/FormView.jsx | 94 +++++++++++++++---- src/overrideTranslations.jsx | 15 +++ src/theme/ItaliaTheme/Blocks/_form.scss | 53 +++++++++++ .../Subsites/ItaliaTheme/Views/_common.scss | 4 +- src/theme/extras/_forms.scss | 6 ++ yarn.lock | 10 +- 17 files changed, 288 insertions(+), 30 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d4e975c9d..5634c7830 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6773,4 +6773,4 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). - added onclick to viewAll button [`baa258a`](https://github.com/RedTurtle/design-volto-theme/commit/baa258a983f9619b18f9c8d9fb078fe9b17f338b) - todo [`7814f01`](https://github.com/RedTurtle/design-volto-theme/commit/7814f01e5dd883c83bca4ecf53425ada9942d9ab) - updated gitignore with .history [`e73a28c`](https://github.com/RedTurtle/design-volto-theme/commit/e73a28c94176a172219c1a740a97047b5e2fa400) -- Added nvmrc [`fd54a3c`](https://github.com/RedTurtle/design-volto-theme/commit/fd54a3cbcf8df22997f036919dfafda870f85db7) \ No newline at end of file +- Added nvmrc [`fd54a3c`](https://github.com/RedTurtle/design-volto-theme/commit/fd54a3cbcf8df22997f036919dfafda870f85db7) diff --git a/RELEASE.md b/RELEASE.md index 3c752e10f..c532ee674 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -43,11 +43,22 @@ ## Versione X.X.X (dd/mm/yyyy) +### Migliorie + +- Nel blocco form è stata aggiunta una legenda per i campi obbligatori. + +### Novità + +- Aggiornato il plugin del blocco Form, adesso si ha la possibilità di aggiungere un pulsante per resettare i campi e nella sidebar è presente un nuovo campo per creare un messaggio personalizzato dopo l'invio della form, i campi di tipo: testo, email, data e textarea hanno un identificativo che può essere utilizzato per restituire il valore di quei campi nel messaggio personalizzato. + ### Fix - L'icona per aprire il menu in mobile è ora visibile anche quando l'header del sito è bianca. - La descrizione nelle card per i punti di contatto non mostrano più tutte le iniziali in maiuscolo. - Il colore dei link nel menu mobile è ora accessibile per tutti i temi. +- Il layout dei campi di input "in errore" del blocco Form è stato uniformato. +- La tendina delle select nel blocco Form non si sovrappone più ai campi sottostanti. +- Sistemato alert di errore nel blocco Form che nascondeva il form quando un campo non era valido, ora continua a visualizzarsi anche la form. - Migliorato il testo alternativo per il logo NextGenerationEU nel footer. ## Versione 11.5.1 (19/02/2024) @@ -65,7 +76,6 @@ ### Fix - Risolto un problema riguardante la visualizzazione delle date nelle card che rappresentano un CT Evento nei vari listati nel caso in cui l'evento si sviluppi su anni diversi - - Risolto un problema di visualizzazione per la sezione Date e Orari nel CT Evento quando l'evento si sviluppa su anni diversi, ora viene mostrato anche l'anno se si rientra in questa casistica - Nel blocco elenco, sono stati sistemati i filtri per percorso quando si clicca sul bottone configurato. diff --git a/locales/de/LC_MESSAGES/volto.po b/locales/de/LC_MESSAGES/volto.po index 11169f419..66db76294 100644 --- a/locales/de/LC_MESSAGES/volto.po +++ b/locales/de/LC_MESSAGES/volto.po @@ -2115,6 +2115,16 @@ msgstr "" msgid "fine_termine" msgstr "" +#: overrideTranslations +# defaultMessage: Annulla +msgid "form_default_cancel_label" +msgstr "" + +#: overrideTranslations +# defaultMessage: Ricomincia +msgid "form_reset" +msgstr "" + #: components/ItaliaTheme/View/PersonaView/PersonaRuolo # defaultMessage: Foto dell'attività politica msgid "foto_attivita_politica" @@ -2275,6 +2285,11 @@ msgstr "" msgid "legami_strutture_figlie" msgstr "" +#: overrideTranslations +# defaultMessage: I campi contrassegnati da (*) sono obbligatori. +msgid "legend_required" +msgstr "" + #: components/ItaliaTheme/Blocks/SearchSections/SideBar # defaultMessage: Collegamento msgid "link" diff --git a/locales/en/LC_MESSAGES/volto.po b/locales/en/LC_MESSAGES/volto.po index d7e1395e1..cb59baad6 100644 --- a/locales/en/LC_MESSAGES/volto.po +++ b/locales/en/LC_MESSAGES/volto.po @@ -2100,6 +2100,16 @@ msgstr "Search" msgid "fine_termine" msgstr "End of term" +#: overrideTranslations +# defaultMessage: Annulla +msgid "form_default_cancel_label" +msgstr "Cancel" + +#: overrideTranslations +# defaultMessage: Ricomincia +msgid "form_reset" +msgstr "Restart" + #: components/ItaliaTheme/View/PersonaView/PersonaRuolo # defaultMessage: Foto dell'attività politica msgid "foto_attivita_politica" @@ -2260,6 +2270,11 @@ msgstr "Association service or office" msgid "legami_strutture_figlie" msgstr "Internal services or offices" +#: overrideTranslations +# defaultMessage: I campi contrassegnati da (*) sono obbligatori. +msgid "legend_required" +msgstr "Fields marked with (*) are required." + #: components/ItaliaTheme/Blocks/SearchSections/SideBar # defaultMessage: Collegamento msgid "link" diff --git a/locales/es/LC_MESSAGES/volto.po b/locales/es/LC_MESSAGES/volto.po index aeeadfd4a..8d7c6a2b0 100644 --- a/locales/es/LC_MESSAGES/volto.po +++ b/locales/es/LC_MESSAGES/volto.po @@ -2109,6 +2109,16 @@ msgstr "Buscar" msgid "fine_termine" msgstr "Fin de los términos" +#: overrideTranslations +# defaultMessage: Annulla +msgid "form_default_cancel_label" +msgstr "" + +#: overrideTranslations +# defaultMessage: Ricomincia +msgid "form_reset" +msgstr "" + #: components/ItaliaTheme/View/PersonaView/PersonaRuolo # defaultMessage: Foto dell'attività politica msgid "foto_attivita_politica" @@ -2269,6 +2279,11 @@ msgstr "Servicio u oficina de la asociación" msgid "legami_strutture_figlie" msgstr "Servicios internos u oficinas" +#: overrideTranslations +# defaultMessage: I campi contrassegnati da (*) sono obbligatori. +msgid "legend_required" +msgstr "" + #: components/ItaliaTheme/Blocks/SearchSections/SideBar # defaultMessage: Collegamento msgid "link" diff --git a/locales/fr/LC_MESSAGES/volto.po b/locales/fr/LC_MESSAGES/volto.po index 742faab64..a0ea1f11f 100644 --- a/locales/fr/LC_MESSAGES/volto.po +++ b/locales/fr/LC_MESSAGES/volto.po @@ -2117,6 +2117,16 @@ msgstr "Rechercher" msgid "fine_termine" msgstr "Fin du mandat" +#: overrideTranslations +# defaultMessage: Annulla +msgid "form_default_cancel_label" +msgstr "" + +#: overrideTranslations +# defaultMessage: Ricomincia +msgid "form_reset" +msgstr "" + #: components/ItaliaTheme/View/PersonaView/PersonaRuolo # defaultMessage: Foto dell'attività politica msgid "foto_attivita_politica" @@ -2277,6 +2287,11 @@ msgstr "" msgid "legami_strutture_figlie" msgstr "" +#: overrideTranslations +# defaultMessage: I campi contrassegnati da (*) sono obbligatori. +msgid "legend_required" +msgstr "Les champs marqués d'une (*) sont obligatoires." + #: components/ItaliaTheme/Blocks/SearchSections/SideBar # defaultMessage: Collegamento msgid "link" diff --git a/locales/it/LC_MESSAGES/volto.po b/locales/it/LC_MESSAGES/volto.po index 66b703041..b1da0afda 100644 --- a/locales/it/LC_MESSAGES/volto.po +++ b/locales/it/LC_MESSAGES/volto.po @@ -2100,6 +2100,16 @@ msgstr "Cerca" msgid "fine_termine" msgstr "Fine termine" +#: overrideTranslations +# defaultMessage: Annulla +msgid "form_default_cancel_label" +msgstr "Annulla" + +#: overrideTranslations +# defaultMessage: Ricomincia +msgid "form_reset" +msgstr "Ricomincia" + #: components/ItaliaTheme/View/PersonaView/PersonaRuolo # defaultMessage: Foto dell'attività politica msgid "foto_attivita_politica" @@ -2260,6 +2270,11 @@ msgstr "Unità organizzativa genitore" msgid "legami_strutture_figlie" msgstr "Servizi o uffici interni" +#: overrideTranslations +# defaultMessage: I campi contrassegnati da (*) sono obbligatori. +msgid "legend_required" +msgstr "I campi contrassegnati da (*) sono obbligatori." + #: components/ItaliaTheme/Blocks/SearchSections/SideBar # defaultMessage: Collegamento msgid "link" diff --git a/locales/volto.pot b/locales/volto.pot index 66dd1eaaa..b9a0fdaa9 100644 --- a/locales/volto.pot +++ b/locales/volto.pot @@ -1,7 +1,7 @@ msgid "" msgstr "" "Project-Id-Version: Plone\n" -"POT-Creation-Date: 2024-02-19T11:08:36.048Z\n" +"POT-Creation-Date: 2024-02-29T16:36:05.160Z\n" "Last-Translator: Plone i18n \n" "Language-Team: Plone i18n \n" "MIME-Version: 1.0\n" @@ -2102,6 +2102,16 @@ msgstr "" msgid "fine_termine" msgstr "" +#: overrideTranslations +# defaultMessage: Annulla +msgid "form_default_cancel_label" +msgstr "" + +#: overrideTranslations +# defaultMessage: Ricomincia +msgid "form_reset" +msgstr "" + #: components/ItaliaTheme/View/PersonaView/PersonaRuolo # defaultMessage: Foto dell'attività politica msgid "foto_attivita_politica" @@ -2262,6 +2272,11 @@ msgstr "" msgid "legami_strutture_figlie" msgstr "" +#: overrideTranslations +# defaultMessage: I campi contrassegnati da (*) sono obbligatori. +msgid "legend_required" +msgstr "" + #: components/ItaliaTheme/Blocks/SearchSections/SideBar # defaultMessage: Collegamento msgid "link" diff --git a/package.json b/package.json index 1cffd6c7f..f8a0fac41 100644 --- a/package.json +++ b/package.json @@ -146,7 +146,7 @@ "volto-dropdownmenu": "4.1.1", "volto-editablefooter": "5.0.3", "volto-feedback": "0.2.0", - "volto-form-block": "3.1.0", + "volto-form-block": "3.3.1", "volto-gdpr-privacy": "2.1.1", "volto-google-analytics": "2.0.0", "volto-multilingual-widget": "3.0.0", diff --git a/src/components/ItaliaTheme/manage/Widgets/FileWidget.jsx b/src/components/ItaliaTheme/manage/Widgets/FileWidget.jsx index 003010006..05aa33c98 100644 --- a/src/components/ItaliaTheme/manage/Widgets/FileWidget.jsx +++ b/src/components/ItaliaTheme/manage/Widgets/FileWidget.jsx @@ -56,7 +56,8 @@ const messages = defineMessages({ * @returns {string} Markup of the component. */ const FileWidget = (props) => { - const { id, value, onChange, label, onEdit, infoText } = props; + const { id, value, onChange, label, onEdit, infoText, required, invalid } = + props; const [isImage, setIsImage] = React.useState(false); const intl = useIntl(); @@ -98,8 +99,18 @@ const FileWidget = (props) => { reader.readAsDataURL(files[0]); }; + let attributes = {}; + if (required) { + attributes.required = true; + attributes['aria-required'] = true; + } + + const isInvalid = invalid === true || invalid === 'true'; + if (isInvalid) { + attributes['aria-invalid'] = true; + } return ( -
+
@@ -154,6 +165,7 @@ const FileWidget = (props) => { name={id} type="file" disabled={props.disabled || null} + {...attributes} /> )}
diff --git a/src/customizations/volto-form-block/components/Edit.jsx b/src/customizations/volto-form-block/components/Edit.jsx index 73f080abf..27889ad7d 100644 --- a/src/customizations/volto-form-block/components/Edit.jsx +++ b/src/customizations/volto-form-block/components/Edit.jsx @@ -32,6 +32,10 @@ const messages = defineMessages({ id: 'form_default_submit_label', defaultMessage: 'Invia', }, + default_cancel_label: { + id: 'form_default_cancel_label', + defaultMessage: 'Annulla', + }, warning: { id: 'form_edit_warning', defaultMessage: 'Attenzione!', @@ -116,6 +120,14 @@ class Edit extends SubblocksEdit { + {this.props.data?.show_cancel && ( + + )} - - ) : formState.result ? ( + {formState.result ? (

{intl.formatMessage(messages.success)}


-
) : (
+ {/* Controlla che ci siano campi obbligatori al suo interno e applica una legenda */} + {data.subblocks.some((item) => item.required === true) && ( + + + {intl.formatMessage(messages.legend_required)} + + + )} {data.static_fields && (
{data.static_fields?.map((field) => ( @@ -204,9 +241,32 @@ const FormView = ({

{intl.formatMessage(messages.empty_values)}

)} + {formState.error && ( + +

{intl.formatMessage(messages.error)}

+

{formState.error}

+
+ )} + {data?.show_cancel && ( + + )} + + {step !== numberOfSteps - 1 && ( - + )} {step === numberOfSteps - 1 && ( - + )}
@@ -385,7 +454,7 @@ const FeedbackForm = ({ contentType, pathname }) => { -
+ ); }; diff --git a/src/components/ItaliaTheme/CustomerSatisfaction/Steps/AnswersStep.jsx b/src/components/ItaliaTheme/CustomerSatisfaction/Steps/AnswersStep.jsx index a3c737172..bd37d7b9c 100644 --- a/src/components/ItaliaTheme/CustomerSatisfaction/Steps/AnswersStep.jsx +++ b/src/components/ItaliaTheme/CustomerSatisfaction/Steps/AnswersStep.jsx @@ -1,6 +1,6 @@ import React, { useState, useEffect, useMemo } from 'react'; import { usePrevious } from '@plone/volto/helpers'; -import { Form, FormGroup, Input, Label } from 'design-react-kit'; +import { Form, FormGroup, Label } from 'design-react-kit'; import { defineMessages } from 'react-intl'; import { FormHeader, @@ -76,6 +76,9 @@ const AnswersStep = ({ step={step + 1} totalSteps={totalSteps} className={'answers-header'} + hidden={ + userFeedback === null || userFeedback < threshold || step !== 0 + } /> @@ -85,14 +88,13 @@ const AnswersStep = ({ key={'positive-' + s} className="border-bottom border-light mb-4" > -