From 4acc74fff73d736ab743f08962bb0d76c6138302 Mon Sep 17 00:00:00 2001 From: Martina Bustacchini <41484878+deodorhunter@users.noreply.github.com> Date: Tue, 2 Apr 2024 17:02:52 +0200 Subject: [PATCH 01/22] fix: remove icon from Organizzatori eventi card (#628) --- .../EventoContattiOrganizzatoreEsterno.jsx | 15 --------------- .../EventoContattiOrganizzatoreInterno.jsx | 1 - 2 files changed, 16 deletions(-) diff --git a/src/components/ItaliaTheme/View/EventoView/EventoContattiOrganizzatoreEsterno.jsx b/src/components/ItaliaTheme/View/EventoView/EventoContattiOrganizzatoreEsterno.jsx index 85ff6ea56..b434308a0 100644 --- a/src/components/ItaliaTheme/View/EventoView/EventoContattiOrganizzatoreEsterno.jsx +++ b/src/components/ItaliaTheme/View/EventoView/EventoContattiOrganizzatoreEsterno.jsx @@ -1,7 +1,5 @@ -import { useIntl, defineMessages } from 'react-intl'; import PropTypes from 'prop-types'; import { Card, CardBody } from 'design-react-kit'; -import { Icon } from 'design-comuni-plone-theme/components/ItaliaTheme'; import { RichText, richTextHasContent, @@ -9,7 +7,6 @@ import { } from 'design-comuni-plone-theme/components/ItaliaTheme/View'; const EventoContattiOrganizzatoreEsterno = ({ content }) => { - const intl = useIntl(); return richTextHasContent(content?.organizzato_da_esterno) || content?.telefono || content?.email || @@ -20,11 +17,6 @@ const EventoContattiOrganizzatoreEsterno = ({ content }) => { noWrapper={true} tag="div" > - - {content?.telefono && ( @@ -57,11 +49,4 @@ EventoContattiOrganizzatoreEsterno.propTypes = { content: PropTypes.object.isRequired, }; -const messages = defineMessages({ - icona_telefono: { - id: 'icona_telefono', - defaultMessage: 'Icona telefono', - }, -}); - export default EventoContattiOrganizzatoreEsterno; diff --git a/src/components/ItaliaTheme/View/EventoView/EventoContattiOrganizzatoreInterno.jsx b/src/components/ItaliaTheme/View/EventoView/EventoContattiOrganizzatoreInterno.jsx index 22d9c4f4a..a0518130f 100644 --- a/src/components/ItaliaTheme/View/EventoView/EventoContattiOrganizzatoreInterno.jsx +++ b/src/components/ItaliaTheme/View/EventoView/EventoContattiOrganizzatoreInterno.jsx @@ -23,7 +23,6 @@ const EventoContattiOrganizzatoreInterno = ({ content }) => { margin_bottom={index < content?.organizzato_da_interno?.length - 1} key={item['@id']} office={item} - icon={'it-telephone'} > {richTextHasContent(content?.contatto_reperibilita) && (

From c5549a7285822df258b53f88ad3c53bcbf3c00aa Mon Sep 17 00:00:00 2001 From: Giulia Ghisini <51911425+giuliaghisini@users.noreply.github.com> Date: Tue, 2 Apr 2024 17:04:26 +0200 Subject: [PATCH 02/22] fix: view Listing blocks inside Grid block (#626) --- RELEASE.md | 1 + src/config/italiaConfig.js | 7 ++ src/theme/ItaliaTheme/Blocks/_gridBlock.scss | 70 ++++++++++++++++++++ 3 files changed, 78 insertions(+) diff --git a/RELEASE.md b/RELEASE.md index d85024e2a..583fb3e9e 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -54,6 +54,7 @@ ### Fix +- Sistemata la visualizzazione dei blocchi elenco all'interno del blocco griglia - L'etichetta della Card con Nastro (Blocco Elenco) non si sovrappone più all'immagine del nastro. - Aggiustato il layout della card per il CT persone quando è impostata un'immagine. diff --git a/src/config/italiaConfig.js b/src/config/italiaConfig.js index 05be17c8f..18685dede 100644 --- a/src/config/italiaConfig.js +++ b/src/config/italiaConfig.js @@ -384,6 +384,7 @@ export default function applyConfig(voltoConfig) { const customBlocks = { ...getItaliaBlocks(config), + listing: { ...config.blocks.blocksConfig.listing, showLinkMore: true, @@ -453,6 +454,12 @@ export default function applyConfig(voltoConfig) { showEditBlocksInBabelView: true, }; + //per avere la conf dei blocchi anche nel blocco grid, altrimenti nel blocco grid prende la conf base di volto. + config.blocks.blocksConfig.gridBlock = { + ...config.blocks.blocksConfig.gridBlock, + blocksConfig: config.blocks.blocksConfig, + }; + removeListingVariation(config, 'default'); // removes default volto template, because it will be overrided removeListingVariation(config, 'summary'); // removes summary volto template, because is unused removeListingVariation(config, 'imageGallery'); // removes imageGallery volto template, because we have our photoGallery template diff --git a/src/theme/ItaliaTheme/Blocks/_gridBlock.scss b/src/theme/ItaliaTheme/Blocks/_gridBlock.scss index cd7790970..b8141660c 100644 --- a/src/theme/ItaliaTheme/Blocks/_gridBlock.scss +++ b/src/theme/ItaliaTheme/Blocks/_gridBlock.scss @@ -5,6 +5,56 @@ height: unset !important; } + .block { + .full-width, + &.full-width { + right: unset; + left: unset; + width: auto !important; + margin-right: unset !important; + margin-left: unset !important; + } + + .container { + width: auto !important; + } + + &.listing { + &.simpleCard, + &.attachmentCardTemplate { + .card-teaser-block-3 { + > .card-teaser { + flex: 0 0 49%; //invece di 3 elementi per riga, ne mostro due perchè c'è poco spazio + } + } + } + + &.cardWithImageTemplate, + &.ribbonCardTemplate, + &.completeBlockLinksTemplate { + .col-lg-4, + .col-xl-4, + .col-lg-3 { + width: 50%; //invece di 3 elementi per riga, ne mostro due perchè c'è poco spazio + } + } + + &.cardSlideUpTextTemplate, + &.quaresImageTemplate { + .grid { + grid-template-columns: 1fr 1fr; + } + } + + &.bandiInEvidenceTemplate { + .bandi-in-evidence-cards-wrapper { + grid-template-columns: 1fr 1fr; + } + } + } + } + + //in edit (cms-ui) .gridBlock-container { position: relative; max-width: 1320px; @@ -15,6 +65,11 @@ left: 16px !important; } + .block-editor-listing { + padding-right: 0; + padding-left: 0; + } + .block { .image { .ui.message { @@ -30,3 +85,18 @@ } } } + +body.cms-ui.has-toolbar.has-sidebar { + .block.gridBlock { + .public-ui { + .container { + width: auto !important; + } + + .full-width > .px-4.container { + padding-right: 24px !important; + padding-left: 24px !important; + } + } + } +} From 17048e25cd467579118519d8789567b69207394e Mon Sep 17 00:00:00 2001 From: Sara Bianchi <43245702+SaraBianchi@users.noreply.github.com> Date: Tue, 2 Apr 2024 17:08:54 +0200 Subject: [PATCH 03/22] fix: reset of search blocks results (#625) * fix: fixed reset of search blocks results * docs: updated release.md --- RELEASE.md | 1 + locales/volto.pot | 4 ++-- src/actions/index.js | 3 ++- src/actions/resetQuerystringResults.js | 18 +++++++++++++++++ .../ItaliaTheme/Blocks/BandiSearch/Body.jsx | 18 +++++++++++------ .../ItaliaTheme/Blocks/BandiSearch/Edit.jsx | 3 ++- .../ItaliaTheme/Blocks/BandiSearch/View.jsx | 1 + .../ItaliaTheme/Blocks/EventSearch/Body.jsx | 20 +++++++++++-------- .../ItaliaTheme/Blocks/EventSearch/Edit.jsx | 3 ++- .../ItaliaTheme/Blocks/EventSearch/View.jsx | 1 + .../ItaliaTheme/Blocks/UOSearch/Body.jsx | 17 +++++++++++----- .../ItaliaTheme/Blocks/UOSearch/Edit.jsx | 3 ++- .../ItaliaTheme/Blocks/UOSearch/View.jsx | 1 + 13 files changed, 68 insertions(+), 25 deletions(-) create mode 100644 src/actions/resetQuerystringResults.js diff --git a/RELEASE.md b/RELEASE.md index 583fb3e9e..6e35caf9e 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -57,6 +57,7 @@ - Sistemata la visualizzazione dei blocchi elenco all'interno del blocco griglia - L'etichetta della Card con Nastro (Blocco Elenco) non si sovrappone più all'immagine del nastro. - Aggiustato il layout della card per il CT persone quando è impostata un'immagine. +- Sistemato bug su blocchi di ricerca Bandi, Eventi e UO nei quali rimanevano memorizzati i risultati di ricerca anche se si lasciava la pagina con questi blocchi. ## Versione 11.8.0 (19/03/2024) diff --git a/locales/volto.pot b/locales/volto.pot index dc2b876cf..7f8ce3912 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-27T15:08:22.683Z\n" +"POT-Creation-Date: 2024-03-28T15:22:56.240Z\n" "Last-Translator: Plone i18n \n" "Language-Team: Plone i18n \n" "MIME-Version: 1.0\n" @@ -3285,7 +3285,7 @@ msgid "search_startDate" msgstr "" #: helpers/Translations/searchBlockExtendedTranslations -# defaultMessage: Ricerca per: {searchedtext}. +# defaultMessage: Ricerca per: {searchedtext}. msgid "searchedFor" msgstr "" diff --git a/src/actions/index.js b/src/actions/index.js index c563bcc8b..4c7e4676c 100644 --- a/src/actions/index.js +++ b/src/actions/index.js @@ -14,7 +14,7 @@ import { getSearchFilters, GET_SEARCH_FILTERS } from './getSearchFilters'; import { getSearchResults, GET_SEARCH_RESULTS } from './getSearchResults'; import { getCalendarResults, GET_CALENDAR_RESULTS } from './calendarSearch'; - +import { resetQuerystringResults } from './resetQuerystringResults'; import { setOriginalQuery, ORIGINAL_QUERY } from './setOriginalQuery'; import { @@ -61,4 +61,5 @@ export { ORIGINAL_QUERY, getSearchBandiFilters, GET_SEARCH_BANDI_FILTERS, + resetQuerystringResults, }; diff --git a/src/actions/resetQuerystringResults.js b/src/actions/resetQuerystringResults.js new file mode 100644 index 000000000..7ef3e3c66 --- /dev/null +++ b/src/actions/resetQuerystringResults.js @@ -0,0 +1,18 @@ +/* +- il reducer del type RESET_QUERYSTRING_RESULTS viene già dichiarato in Volto nel file reducers/querystringsearch/querystringsearch.js +*/ + +export const RESET_QUERYSTRING_RESULTS = 'RESET_QUERYSTRING_RESULTS'; + +/** + * Reset querystring results function. + * @function resetQuerystringResults + * @param {string} subrequest Key of the subrequest. + * @returns {Object} Search content action. + */ +export function resetQuerystringResults(subrequest = null) { + return { + type: RESET_QUERYSTRING_RESULTS, + subrequest, + }; +} diff --git a/src/components/ItaliaTheme/Blocks/BandiSearch/Body.jsx b/src/components/ItaliaTheme/Blocks/BandiSearch/Body.jsx index b12cef130..2c807e508 100644 --- a/src/components/ItaliaTheme/Blocks/BandiSearch/Body.jsx +++ b/src/components/ItaliaTheme/Blocks/BandiSearch/Body.jsx @@ -9,7 +9,7 @@ import { getQueryStringResults } from '@plone/volto/actions'; import { flattenToAppURL } from '@plone/volto/helpers'; import BandiInEvidenceTemplate from 'design-comuni-plone-theme/components/ItaliaTheme/Blocks/Listing/BandiInEvidenceTemplate'; import { Pagination } from 'design-comuni-plone-theme/components/ItaliaTheme'; - +import { resetQuerystringResults } from 'design-comuni-plone-theme/actions'; import FiltersConfig from 'design-comuni-plone-theme/components/ItaliaTheme/Blocks/BandiSearch/FiltersConfig'; const messages = defineMessages({ @@ -32,7 +32,7 @@ const messages = defineMessages({ }, }); -const Body = ({ data, inEditMode, path, onChangeBlock }) => { +const Body = ({ data, id, inEditMode, path, onChangeBlock }) => { const intl = useIntl(); const b_size = 6; @@ -44,14 +44,19 @@ const Body = ({ data, inEditMode, path, onChangeBlock }) => { const dispatch = useDispatch(); const querystringResults = useSelector((state) => { - return state.querystringsearch?.subrequests?.bandi_search; + return state.querystringsearch?.subrequests?.[id + '_bandi_search']; }); const items = useSelector((state) => { - return state.querystringsearch?.subrequests?.bandi_search?.items ?? []; + return ( + state.querystringsearch?.subrequests?.[id + '_bandi_search']?.items ?? [] + ); }); const loading = useSelector((state) => { - return state.querystringsearch?.subrequests?.bandi_search?.loading || false; + return ( + state.querystringsearch?.subrequests?.[id + '_bandi_search']?.loading || + false + ); }); const resultsRef = createRef(); @@ -92,7 +97,7 @@ const Body = ({ data, inEditMode, path, onChangeBlock }) => { sort_on: data.sort_on, sort_order: data.sort_order ? 'descending' : 'ascending', }, - 'bandi_search', + id + '_bandi_search', page, ), ); @@ -112,6 +117,7 @@ const Body = ({ data, inEditMode, path, onChangeBlock }) => { newState = { ...getInitialState(), }; + dispatch(resetQuerystringResults(id + '_bandi_search')); } else { const f = newState[action.filter]; const defaultReducer = (value, state) => value; diff --git a/src/components/ItaliaTheme/Blocks/BandiSearch/Edit.jsx b/src/components/ItaliaTheme/Blocks/BandiSearch/Edit.jsx index d8f1e5071..7495a50a2 100644 --- a/src/components/ItaliaTheme/Blocks/BandiSearch/Edit.jsx +++ b/src/components/ItaliaTheme/Blocks/BandiSearch/Edit.jsx @@ -14,7 +14,7 @@ const messages = defineMessages({ }, }); -const Edit = ({ data, block, onChangeBlock, selected, pathname }) => { +const Edit = ({ data, id, block, onChangeBlock, selected, pathname }) => { const intl = useIntl(); return ( @@ -24,6 +24,7 @@ const Edit = ({ data, block, onChangeBlock, selected, pathname }) => { )} {

{ +const Body = ({ data, id, inEditMode, path, onChangeBlock }) => { const intl = useIntl(); const b_size = 6; @@ -44,22 +44,25 @@ const Body = ({ data, inEditMode, path, onChangeBlock }) => { const dispatch = useDispatch(); const querystringResults = useSelector((state) => { - return state.querystringsearch?.subrequests?.events_search; + return state.querystringsearch?.subrequests?.[id + '_events_search']; }); const items = useSelector((state) => { - return state.querystringsearch?.subrequests?.events_search?.items ?? []; + return ( + state.querystringsearch?.subrequests?.[id + '_events_search']?.items ?? [] + ); }); const loading = useSelector((state) => { return ( - state.querystringsearch?.subrequests?.events_search?.loading || false + state.querystringsearch?.subrequests?.[id + '_events_search']?.loading || + false ); }); const firstLoading = useSelector((state) => { return ( - !state.querystringsearch?.subrequests?.events_search?.loading && - !state.querystringsearch?.subrequests?.events_search?.loaded + !state.querystringsearch?.subrequests?.[id + '_events_search']?.loading && + !state.querystringsearch?.subrequests?.[id + '_events_search']?.loaded ); }); @@ -99,7 +102,7 @@ const Body = ({ data, inEditMode, path, onChangeBlock }) => { query: query, b_size: b_size, }, - 'events_search', + id + '_events_search', page, ), ); @@ -123,6 +126,7 @@ const Body = ({ data, inEditMode, path, onChangeBlock }) => { newState = { ...getInitialState(), }; + dispatch(resetQuerystringResults(id + '_events_search')); } else { const f = newState[action.filter]; const defaultReducer = (value, state) => value; diff --git a/src/components/ItaliaTheme/Blocks/EventSearch/Edit.jsx b/src/components/ItaliaTheme/Blocks/EventSearch/Edit.jsx index f7749ccbc..dd175a093 100644 --- a/src/components/ItaliaTheme/Blocks/EventSearch/Edit.jsx +++ b/src/components/ItaliaTheme/Blocks/EventSearch/Edit.jsx @@ -14,7 +14,7 @@ const messages = defineMessages({ }, }); -const Edit = ({ data, block, onChangeBlock, selected, pathname }) => { +const Edit = ({ data, id, block, onChangeBlock, selected, pathname }) => { const intl = useIntl(); return ( @@ -24,6 +24,7 @@ const Edit = ({ data, block, onChangeBlock, selected, pathname }) => { )} {
{ +const Body = ({ data, id, inEditMode, path, onChangeBlock }) => { const intl = useIntl(); const b_size = 6; @@ -40,14 +41,19 @@ const Body = ({ data, inEditMode, path, onChangeBlock }) => { const dispatch = useDispatch(); const querystringResults = useSelector((state) => { - return state.querystringsearch?.subrequests?.uo_search; + return state.querystringsearch?.subrequests?.[id + '_uo_search']; }); const items = useSelector((state) => { - return state.querystringsearch?.subrequests?.uo_search?.items ?? []; + return ( + state.querystringsearch?.subrequests?.[id + '_uo_search']?.items ?? [] + ); }); const loading = useSelector((state) => { - return state.querystringsearch?.subrequests?.uo_search?.loading || false; + return ( + state.querystringsearch?.subrequests?.[id + '_uo_search']?.loading || + false + ); }); const resultsRef = createRef(); @@ -86,7 +92,7 @@ const Body = ({ data, inEditMode, path, onChangeBlock }) => { query: query, b_size: b_size, }, - 'uo_search', + id + '_uo_search', page, ), ); @@ -106,6 +112,7 @@ const Body = ({ data, inEditMode, path, onChangeBlock }) => { newState = { ...getInitialState(), }; + dispatch(resetQuerystringResults(id + '_uo_search')); } else { const f = newState[action.filter]; const defaultReducer = (value, state) => value; diff --git a/src/components/ItaliaTheme/Blocks/UOSearch/Edit.jsx b/src/components/ItaliaTheme/Blocks/UOSearch/Edit.jsx index 3b0480dae..96223efc5 100644 --- a/src/components/ItaliaTheme/Blocks/UOSearch/Edit.jsx +++ b/src/components/ItaliaTheme/Blocks/UOSearch/Edit.jsx @@ -14,7 +14,7 @@ const messages = defineMessages({ }, }); -const Edit = ({ data, block, onChangeBlock, selected, pathname }) => { +const Edit = ({ data, id, block, onChangeBlock, selected, pathname }) => { const intl = useIntl(); return ( @@ -24,6 +24,7 @@ const Edit = ({ data, block, onChangeBlock, selected, pathname }) => { )} {
Date: Tue, 2 Apr 2024 17:09:21 +0200 Subject: [PATCH 04/22] fix: updated volto-editable-footer to fix view sidebar in edit config (#623) --- package.json | 2 +- yarn.lock | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 1dccb4e79..b75dee97f 100644 --- a/package.json +++ b/package.json @@ -144,7 +144,7 @@ "volto-blocks-widget": "3.4.0", "volto-data-grid-widget": "2.3.1", "volto-dropdownmenu": "4.1.1", - "volto-editablefooter": "5.1.0", + "volto-editablefooter": "5.1.1", "volto-feedback": "0.3.0", "volto-form-block": "3.7.2", "volto-gdpr-privacy": "2.1.1", diff --git a/yarn.lock b/yarn.lock index 95e487373..79a5f46fe 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6574,7 +6574,7 @@ __metadata: volto-blocks-widget: 3.4.0 volto-data-grid-widget: 2.3.1 volto-dropdownmenu: 4.1.1 - volto-editablefooter: 5.1.0 + volto-editablefooter: 5.1.1 volto-feedback: 0.3.0 volto-form-block: 3.7.2 volto-gdpr-privacy: 2.1.1 @@ -14331,15 +14331,15 @@ __metadata: languageName: node linkType: hard -"volto-editablefooter@npm:5.1.0": - version: 5.1.0 - resolution: "volto-editablefooter@npm:5.1.0" +"volto-editablefooter@npm:5.1.1": + version: 5.1.1 + resolution: "volto-editablefooter@npm:5.1.1" dependencies: react-outside-click-handler: 1.3.0 peerDependencies: "@plone/volto": ">=16.0.0-alpha.38" volto-blocks-widget: ">=3.4.0" - checksum: 2a1316344048e7447da39b513e067b9368f90057d1ef9bc6541ba0b9cd4a1c04b5246943677a5238d3391c30f3778320fe6e12f3f7c8f310adc61b1c6c8016ad + checksum: c9a2e1f96f1aacf10b30052eac5a4f069afc9e32773b0d2f7a35f9a7b5711c2dd4f9cc59acb6d6ada488071cee9cd8fcca732ad59d45acc866140f5ee1c6689e languageName: node linkType: hard From 5cc5056ecd95bda25940321c8037a0ca0a29361a Mon Sep 17 00:00:00 2001 From: Martina Bustacchini <41484878+deodorhunter@users.noreply.github.com> Date: Tue, 2 Apr 2024 17:09:41 +0200 Subject: [PATCH 05/22] fix: translation id typo (#622) * fix: aria-label in calendar block controls * fix: translation id typo --- src/components/ItaliaTheme/Blocks/Calendar/Body.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/ItaliaTheme/Blocks/Calendar/Body.jsx b/src/components/ItaliaTheme/Blocks/Calendar/Body.jsx index 8ca345b14..dcd033610 100644 --- a/src/components/ItaliaTheme/Blocks/Calendar/Body.jsx +++ b/src/components/ItaliaTheme/Blocks/Calendar/Body.jsx @@ -200,7 +200,7 @@ const Body = ({ data, block, inEditMode, path, onChangeBlock, reactSlick }) => { ); From 282eef72f5caea46f4c40f1a24529b2725193ce3 Mon Sep 17 00:00:00 2001 From: Giulia Ghisini <51911425+giuliaghisini@users.noreply.github.com> Date: Tue, 2 Apr 2024 17:10:01 +0200 Subject: [PATCH 06/22] fix: footer logo responsive height (#621) --- src/theme/ItaliaTheme/_main.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/theme/ItaliaTheme/_main.scss b/src/theme/ItaliaTheme/_main.scss index 0201a47d5..9cfc4eff1 100644 --- a/src/theme/ItaliaTheme/_main.scss +++ b/src/theme/ItaliaTheme/_main.scss @@ -345,7 +345,7 @@ iframe { .block.image img { width: auto; - height: 75px; + max-height: 75px; } .block.gridBlock { From d9adb4a8ee896258244c3fd7f9b4198288c64892 Mon Sep 17 00:00:00 2001 From: Piero Nicolli Date: Tue, 2 Apr 2024 17:16:05 +0200 Subject: [PATCH 07/22] docs: updated publiccode and release log --- RELEASE.md | 15 +++++++-------- publiccode.yml | 4 ++-- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/RELEASE.md b/RELEASE.md index 6e35caf9e..c994cbcea 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -41,23 +41,22 @@ - ... --> -## Versione X.X.X (dd/mm/yyyy) +## Versione 11.9.0 (03/04/2024) ### Migliorie -- Migliorata l'accessibilità del bottone "Ricerca". -- Migliorata l'accessibilità del blocco Icone. +- Effettuate diverse migliorie di accessibilità. ### Novità -- Aggiunto una nuova variazione del blocco elenco "Allegati" che permette di scaricare oggetti di tipo File o aprire l'anteprima di file PDF. +- Aggiunta una nuova variazione del blocco elenco "Allegati" che permette di scaricare oggetti di tipo File o aprire l'anteprima di file PDF. ### Fix -- Sistemata la visualizzazione dei blocchi elenco all'interno del blocco griglia -- L'etichetta della Card con Nastro (Blocco Elenco) non si sovrappone più all'immagine del nastro. -- Aggiustato il layout della card per il CT persone quando è impostata un'immagine. -- Sistemato bug su blocchi di ricerca Bandi, Eventi e UO nei quali rimanevano memorizzati i risultati di ricerca anche se si lasciava la pagina con questi blocchi. +- Sistemata la visualizzazione dei blocchi elenco all'interno del blocco griglia. +- L'etichetta della Card con Nastro (Blocco Elenco) non si sovrappone più all'icona del nastro. +- Aggiustato il layout della card per le persone quando è impostata un'immagine. +- Sistemato bug su blocchi di ricerca Bandi, Eventi e UO nei quali rimanevano memorizzati i risultati di ricerca anche abbandonando la pagina. ## Versione 11.8.0 (19/03/2024) diff --git a/publiccode.yml b/publiccode.yml index 2bd9fccf3..5618c1f32 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-26' +releaseDate: '2024-04-03' softwareType: standalone/web -softwareVersion: 11.8.1 +softwareVersion: 11.9.0 url: 'https://github.com/italia/design-comuni-plone-theme' usedBy: - ASP Comuni Modenesi Area Nord From 44c52baa419366e173a23317fbc31aab2a5ce118 Mon Sep 17 00:00:00 2001 From: Piero Nicolli Date: Tue, 2 Apr 2024 17:16:28 +0200 Subject: [PATCH 08/22] locales --- 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 +------ 6 files changed, 1 insertion(+), 31 deletions(-) diff --git a/locales/de/LC_MESSAGES/volto.po b/locales/de/LC_MESSAGES/volto.po index a390876f4..cd1ca7a97 100644 --- a/locales/de/LC_MESSAGES/volto.po +++ b/locales/de/LC_MESSAGES/volto.po @@ -2260,11 +2260,6 @@ msgstr "" msgid "icona_luoghi" msgstr "" -#: components/ItaliaTheme/View/EventoView/EventoContattiOrganizzatoreEsterno -# defaultMessage: Icona telefono -msgid "icona_telefono" -msgstr "" - #: components/ItaliaTheme/View/Commons/OfficeCard # defaultMessage: Icona ufficio msgid "icona_ufficio" diff --git a/locales/en/LC_MESSAGES/volto.po b/locales/en/LC_MESSAGES/volto.po index ef6faef15..508551d8a 100644 --- a/locales/en/LC_MESSAGES/volto.po +++ b/locales/en/LC_MESSAGES/volto.po @@ -2245,11 +2245,6 @@ msgstr "Icon for {topic_title} topic" msgid "icona_luoghi" msgstr "Venues icon" -#: components/ItaliaTheme/View/EventoView/EventoContattiOrganizzatoreEsterno -# defaultMessage: Icona telefono -msgid "icona_telefono" -msgstr "Phone icon" - #: components/ItaliaTheme/View/Commons/OfficeCard # defaultMessage: Icona ufficio msgid "icona_ufficio" diff --git a/locales/es/LC_MESSAGES/volto.po b/locales/es/LC_MESSAGES/volto.po index 981bb5564..067d25f03 100644 --- a/locales/es/LC_MESSAGES/volto.po +++ b/locales/es/LC_MESSAGES/volto.po @@ -2254,11 +2254,6 @@ msgstr "" msgid "icona_luoghi" msgstr "" -#: components/ItaliaTheme/View/EventoView/EventoContattiOrganizzatoreEsterno -# defaultMessage: Icona telefono -msgid "icona_telefono" -msgstr "" - #: components/ItaliaTheme/View/Commons/OfficeCard # defaultMessage: Icona ufficio msgid "icona_ufficio" diff --git a/locales/fr/LC_MESSAGES/volto.po b/locales/fr/LC_MESSAGES/volto.po index e92c08aa2..9642bfdd9 100644 --- a/locales/fr/LC_MESSAGES/volto.po +++ b/locales/fr/LC_MESSAGES/volto.po @@ -2262,11 +2262,6 @@ msgstr "" msgid "icona_luoghi" msgstr "" -#: components/ItaliaTheme/View/EventoView/EventoContattiOrganizzatoreEsterno -# defaultMessage: Icona telefono -msgid "icona_telefono" -msgstr "" - #: components/ItaliaTheme/View/Commons/OfficeCard # defaultMessage: Icona ufficio msgid "icona_ufficio" diff --git a/locales/it/LC_MESSAGES/volto.po b/locales/it/LC_MESSAGES/volto.po index 9c47e9621..939c0bb9f 100644 --- a/locales/it/LC_MESSAGES/volto.po +++ b/locales/it/LC_MESSAGES/volto.po @@ -2245,11 +2245,6 @@ msgstr "" msgid "icona_luoghi" msgstr "" -#: components/ItaliaTheme/View/EventoView/EventoContattiOrganizzatoreEsterno -# defaultMessage: Icona telefono -msgid "icona_telefono" -msgstr "" - #: components/ItaliaTheme/View/Commons/OfficeCard # defaultMessage: Icona ufficio msgid "icona_ufficio" diff --git a/locales/volto.pot b/locales/volto.pot index 7f8ce3912..1d61e9560 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-28T15:22:56.240Z\n" +"POT-Creation-Date: 2024-04-02T15:16:18.332Z\n" "Last-Translator: Plone i18n \n" "Language-Team: Plone i18n \n" "MIME-Version: 1.0\n" @@ -2247,11 +2247,6 @@ msgstr "" msgid "icona_luoghi" msgstr "" -#: components/ItaliaTheme/View/EventoView/EventoContattiOrganizzatoreEsterno -# defaultMessage: Icona telefono -msgid "icona_telefono" -msgstr "" - #: components/ItaliaTheme/View/Commons/OfficeCard # defaultMessage: Icona ufficio msgid "icona_ufficio" From c8223631086d310e3538d26586b831bae174df94 Mon Sep 17 00:00:00 2001 From: sabrina-bongiovanni <116291154+sabrina-bongiovanni@users.noreply.github.com> Date: Wed, 3 Apr 2024 10:05:36 +0200 Subject: [PATCH 09/22] fix: translated aria-label of menu hamburger icon (#591) * fix: translated aria-label of menu hamburger icon * fix: used collapseOpen variable to change aria-label message * fix: added translation to overrideTranslations * fix: added translations for toggleMenu * chore: resolved conflicts --- RELEASE.md | 3 +++ 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 | 19 ++++++++++++++++-- .../theme/Navigation/Navigation.jsx | 20 +++++++++++++++---- src/overrideTranslations.jsx | 12 +++++++++++ 9 files changed, 123 insertions(+), 6 deletions(-) diff --git a/RELEASE.md b/RELEASE.md index c994cbcea..6ce95f2de 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -43,6 +43,9 @@ ## Versione 11.9.0 (03/04/2024) +### Fix + +- Tradotto il messaggio per Screen Reader del bottone per aprire e chiudere il menu in mobile. ### Migliorie - Effettuate diverse migliorie di accessibilità. diff --git a/locales/de/LC_MESSAGES/volto.po b/locales/de/LC_MESSAGES/volto.po index cd1ca7a97..5aef367d5 100644 --- a/locales/de/LC_MESSAGES/volto.po +++ b/locales/de/LC_MESSAGES/volto.po @@ -3958,6 +3958,21 @@ msgstr "" msgid "to" msgstr "" +#: overrideTranslations +# defaultMessage: {action} il menu +msgid "toggle-menu" +msgstr "" + +#: overrideTranslations +# defaultMessage: Chiudi +msgid "toggleMenu_close" +msgstr "" + +#: overrideTranslations +# defaultMessage: Apri +msgid "toggleMenu_open" +msgstr "" + #: components/ItaliaTheme/Header/HeaderSearch/SearchModal #: components/ItaliaTheme/Search/Search #: components/ItaliaTheme/View/Commons/PageHeader/PageHeaderTassonomiaArgomenti diff --git a/locales/en/LC_MESSAGES/volto.po b/locales/en/LC_MESSAGES/volto.po index 508551d8a..37135a8ab 100644 --- a/locales/en/LC_MESSAGES/volto.po +++ b/locales/en/LC_MESSAGES/volto.po @@ -3943,6 +3943,21 @@ msgstr "title" msgid "to" msgstr "to" +#: overrideTranslations +# defaultMessage: {action} il menu +msgid "toggle-menu" +msgstr "{action} the menu" + +#: overrideTranslations +# defaultMessage: Chiudi +msgid "toggleMenu_close" +msgstr "Close" + +#: overrideTranslations +# defaultMessage: Apri +msgid "toggleMenu_open" +msgstr "Open" + #: components/ItaliaTheme/Header/HeaderSearch/SearchModal #: components/ItaliaTheme/Search/Search #: components/ItaliaTheme/View/Commons/PageHeader/PageHeaderTassonomiaArgomenti diff --git a/locales/es/LC_MESSAGES/volto.po b/locales/es/LC_MESSAGES/volto.po index 067d25f03..c8d4e98ed 100644 --- a/locales/es/LC_MESSAGES/volto.po +++ b/locales/es/LC_MESSAGES/volto.po @@ -3952,6 +3952,21 @@ msgstr "título" msgid "to" msgstr "a" +#: overrideTranslations +# defaultMessage: {action} il menu +msgid "toggle-menu" +msgstr "" + +#: overrideTranslations +# defaultMessage: Chiudi +msgid "toggleMenu_close" +msgstr "" + +#: overrideTranslations +# defaultMessage: Apri +msgid "toggleMenu_open" +msgstr "" + #: components/ItaliaTheme/Header/HeaderSearch/SearchModal #: components/ItaliaTheme/Search/Search #: components/ItaliaTheme/View/Commons/PageHeader/PageHeaderTassonomiaArgomenti diff --git a/locales/fr/LC_MESSAGES/volto.po b/locales/fr/LC_MESSAGES/volto.po index 9642bfdd9..6e206b814 100644 --- a/locales/fr/LC_MESSAGES/volto.po +++ b/locales/fr/LC_MESSAGES/volto.po @@ -3960,6 +3960,21 @@ msgstr "titre" msgid "to" msgstr "au" +#: overrideTranslations +# defaultMessage: {action} il menu +msgid "toggle-menu" +msgstr "" + +#: overrideTranslations +# defaultMessage: Chiudi +msgid "toggleMenu_close" +msgstr "" + +#: overrideTranslations +# defaultMessage: Apri +msgid "toggleMenu_open" +msgstr "" + #: components/ItaliaTheme/Header/HeaderSearch/SearchModal #: components/ItaliaTheme/Search/Search #: components/ItaliaTheme/View/Commons/PageHeader/PageHeaderTassonomiaArgomenti diff --git a/locales/it/LC_MESSAGES/volto.po b/locales/it/LC_MESSAGES/volto.po index 939c0bb9f..790033409 100644 --- a/locales/it/LC_MESSAGES/volto.po +++ b/locales/it/LC_MESSAGES/volto.po @@ -3943,6 +3943,21 @@ msgstr "titolo" msgid "to" msgstr "al" +#: overrideTranslations +# defaultMessage: {action} il menu +msgid "toggle-menu" +msgstr "" + +#: overrideTranslations +# defaultMessage: Chiudi +msgid "toggleMenu_close" +msgstr "" + +#: overrideTranslations +# defaultMessage: Apri +msgid "toggleMenu_open" +msgstr "" + #: components/ItaliaTheme/Header/HeaderSearch/SearchModal #: components/ItaliaTheme/Search/Search #: components/ItaliaTheme/View/Commons/PageHeader/PageHeaderTassonomiaArgomenti diff --git a/locales/volto.pot b/locales/volto.pot index 1d61e9560..e0de02685 100644 --- a/locales/volto.pot +++ b/locales/volto.pot @@ -1,7 +1,7 @@ msgid "" msgstr "" "Project-Id-Version: Plone\n" -"POT-Creation-Date: 2024-04-02T15:16:18.332Z\n" +"POT-Creation-Date: 2024-03-28T15:22:56.240Z\n" "Last-Translator: Plone i18n \n" "Language-Team: Plone i18n \n" "MIME-Version: 1.0\n" @@ -3280,7 +3280,7 @@ msgid "search_startDate" msgstr "" #: helpers/Translations/searchBlockExtendedTranslations -# defaultMessage: Ricerca per: {searchedtext}. +# defaultMessage: Ricerca per: {searchedtext}. msgid "searchedFor" msgstr "" @@ -3945,6 +3945,21 @@ msgstr "" msgid "to" msgstr "" +#: overrideTranslations +# defaultMessage: {action} il menu +msgid "toggle-menu" +msgstr "" + +#: overrideTranslations +# defaultMessage: Chiudi +msgid "toggleMenu_close" +msgstr "" + +#: overrideTranslations +# defaultMessage: Apri +msgid "toggleMenu_open" +msgstr "" + #: components/ItaliaTheme/Header/HeaderSearch/SearchModal #: components/ItaliaTheme/Search/Search #: components/ItaliaTheme/View/Commons/PageHeader/PageHeaderTassonomiaArgomenti diff --git a/src/customizations/volto/components/theme/Navigation/Navigation.jsx b/src/customizations/volto/components/theme/Navigation/Navigation.jsx index f710f8533..4550e9fed 100644 --- a/src/customizations/volto/components/theme/Navigation/Navigation.jsx +++ b/src/customizations/volto/components/theme/Navigation/Navigation.jsx @@ -100,7 +100,11 @@ const Navigation = ({ pathname }) => { { setCollapseOpen(!collapseOpen); setFocusTrapActive(!focusTrapActive); @@ -185,9 +189,17 @@ const messages = defineMessages({ id: 'close-menu', defaultMessage: 'Chiudi menu', }, - toggleNavigation: { - id: 'toggle-navigation', - defaultMessage: 'Apri il menu', + toggleMenu: { + id: 'toggle-menu', + defaultMessage: '{action} il menu', + }, + toggleMenu_open: { + id: 'toggleMenu_open', + defaultMessage: 'Apri', + }, + toggleMenu_close: { + id: 'toggleMenu_close', + defaultMessage: 'Chiudi', }, }); diff --git a/src/overrideTranslations.jsx b/src/overrideTranslations.jsx index d9684857d..633362aaa 100644 --- a/src/overrideTranslations.jsx +++ b/src/overrideTranslations.jsx @@ -48,4 +48,16 @@ defineMessages({ id: 'form_default_cancel_label', defaultMessage: 'Annulla', }, + toggleMenu: { + id: 'toggle-menu', + defaultMessage: '{action} il menu', + }, + toggleMenu_open: { + id: 'toggleMenu_open', + defaultMessage: 'Apri', + }, + toggleMenu_close: { + id: 'toggleMenu_close', + defaultMessage: 'Chiudi', + }, }); From bbb6b03f37be373d51f0465f206016bf3f96d3b9 Mon Sep 17 00:00:00 2001 From: Piero Nicolli Date: Wed, 3 Apr 2024 10:27:13 +0200 Subject: [PATCH 10/22] locales --- locales/volto.pot | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/locales/volto.pot b/locales/volto.pot index e0de02685..e98863915 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-28T15:22:56.240Z\n" +"POT-Creation-Date: 2024-04-03T08:27:02.322Z\n" "Last-Translator: Plone i18n \n" "Language-Team: Plone i18n \n" "MIME-Version: 1.0\n" @@ -3280,7 +3280,7 @@ msgid "search_startDate" msgstr "" #: helpers/Translations/searchBlockExtendedTranslations -# defaultMessage: Ricerca per: {searchedtext}. +# defaultMessage: Ricerca per: {searchedtext}. msgid "searchedFor" msgstr "" From 9c31812633f334bc04d11b3dd17b0426af496457 Mon Sep 17 00:00:00 2001 From: Piero Nicolli Date: Wed, 3 Apr 2024 10:27:43 +0200 Subject: [PATCH 11/22] fix release log --- RELEASE.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/RELEASE.md b/RELEASE.md index 6ce95f2de..2a609ba4e 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -43,9 +43,6 @@ ## Versione 11.9.0 (03/04/2024) -### Fix - -- Tradotto il messaggio per Screen Reader del bottone per aprire e chiudere il menu in mobile. ### Migliorie - Effettuate diverse migliorie di accessibilità. @@ -60,6 +57,7 @@ - L'etichetta della Card con Nastro (Blocco Elenco) non si sovrappone più all'icona del nastro. - Aggiustato il layout della card per le persone quando è impostata un'immagine. - Sistemato bug su blocchi di ricerca Bandi, Eventi e UO nei quali rimanevano memorizzati i risultati di ricerca anche abbandonando la pagina. +- Tradotto il messaggio per Screen Reader del bottone per aprire e chiudere il menu in mobile. ## Versione 11.8.0 (19/03/2024) From 54ea4fa06fc9558a009a537a0afc6926bcbe7864 Mon Sep 17 00:00:00 2001 From: Piero Nicolli Date: Wed, 3 Apr 2024 10:29:33 +0200 Subject: [PATCH 12/22] chore: release v11.9.0 --- CHANGELOG.md | 35 +++++++++++++++++++++++++++++++++++ package.json | 2 +- 2 files changed, 36 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fc2bce8eb..ec9a8a2e6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,40 @@ +## [11.9.0](https://github.com/redturtle/design-comuni-plone-theme/compare/v11.8.1...v11.9.0) (2024-04-03) + + +### Features + +* added new AttachmentCardTemplate listing variation ([#603](https://github.com/redturtle/design-comuni-plone-theme/issues/603)) ([26ae362](https://github.com/redturtle/design-comuni-plone-theme/commit/26ae36219955b785d994815f8c041e4c54f7889f)) +* added ppt icon file format ([#615](https://github.com/redturtle/design-comuni-plone-theme/issues/615)) ([4e5c352](https://github.com/redturtle/design-comuni-plone-theme/commit/4e5c352e783c969a12b626ecb4fd356863192369)) + + +### Bug Fixes + +* added aria label to icons across ioComune ([#557](https://github.com/redturtle/design-comuni-plone-theme/issues/557)) ([a33c93b](https://github.com/redturtle/design-comuni-plone-theme/commit/a33c93b0b414e7cfb0b6b7344c799070a14f92ea)) +* added aria-hidden attribute to icons ([#594](https://github.com/redturtle/design-comuni-plone-theme/issues/594)) ([e736bed](https://github.com/redturtle/design-comuni-plone-theme/commit/e736bed0a399aecd6ec2f399c1c5c70f1192509b)) +* added role='button' to search link ([#611](https://github.com/redturtle/design-comuni-plone-theme/issues/611)) ([32a008a](https://github.com/redturtle/design-comuni-plone-theme/commit/32a008a8dbf0516ff344e7f3579f643546db4acd)) +* added styles to spread out card-image-wrapper div ([#614](https://github.com/redturtle/design-comuni-plone-theme/issues/614)) ([661ba6e](https://github.com/redturtle/design-comuni-plone-theme/commit/661ba6ec6ee732127a4b1d76caf85869266221a7)) +* alt defaults to item.title for CompleteBlockLinksTemplate for accessibility ([#617](https://github.com/redturtle/design-comuni-plone-theme/issues/617)) ([669dfff](https://github.com/redturtle/design-comuni-plone-theme/commit/669dfffc42b3b9956396e6d00ee676bdfe798017)) +* aria-label in calendar block controls ([#620](https://github.com/redturtle/design-comuni-plone-theme/issues/620)) ([1c7bd5c](https://github.com/redturtle/design-comuni-plone-theme/commit/1c7bd5ccac6b08ee4dad6e56af4edec15c422f40)) +* footer logo responsive height ([#621](https://github.com/redturtle/design-comuni-plone-theme/issues/621)) ([282eef7](https://github.com/redturtle/design-comuni-plone-theme/commit/282eef72f5caea46f4c40f1a24529b2725193ce3)) +* p instead of headings in BrandText for a11y ([#616](https://github.com/redturtle/design-comuni-plone-theme/issues/616)) ([6b2a26d](https://github.com/redturtle/design-comuni-plone-theme/commit/6b2a26dd3d5206bff141c39945bf6792479dbb83)) +* remove dangerouslySetInnerHTML from ContactLink ([#601](https://github.com/redturtle/design-comuni-plone-theme/issues/601)) ([2e5d7f9](https://github.com/redturtle/design-comuni-plone-theme/commit/2e5d7f9b5a714b3560e790e5fab9f0cc232d832c)) +* remove icon from Organizzatori eventi card ([#628](https://github.com/redturtle/design-comuni-plone-theme/issues/628)) ([4acc74f](https://github.com/redturtle/design-comuni-plone-theme/commit/4acc74fff73d736ab743f08962bb0d76c6138302)) +* reset of search blocks results ([#625](https://github.com/redturtle/design-comuni-plone-theme/issues/625)) ([17048e2](https://github.com/redturtle/design-comuni-plone-theme/commit/17048e25cd467579118519d8789567b69207394e)) +* sovrapposizione etichetta card nastro ([#409](https://github.com/redturtle/design-comuni-plone-theme/issues/409)) ([b57f290](https://github.com/redturtle/design-comuni-plone-theme/commit/b57f290e91da06e57e04e60f892846bba0c060e4)) +* string formatting for modified date ([#608](https://github.com/redturtle/design-comuni-plone-theme/issues/608)) ([cc43200](https://github.com/redturtle/design-comuni-plone-theme/commit/cc43200b7bee1444f5149f8e280b25034a835c4f)) +* translated aria-label of menu hamburger icon ([#591](https://github.com/redturtle/design-comuni-plone-theme/issues/591)) ([c822363](https://github.com/redturtle/design-comuni-plone-theme/commit/c8223631086d310e3538d26586b831bae174df94)) +* translation id typo ([#622](https://github.com/redturtle/design-comuni-plone-theme/issues/622)) ([5cc5056](https://github.com/redturtle/design-comuni-plone-theme/commit/5cc5056ecd95bda25940321c8037a0ca0a29361a)) +* updated volto-editable-footer to fix view sidebar in edit config ([#623](https://github.com/redturtle/design-comuni-plone-theme/issues/623)) ([ae82478](https://github.com/redturtle/design-comuni-plone-theme/commit/ae824782dbe201ac3c3c501202b316b4b0ae975e)) +* updated volto-form-block ([#613](https://github.com/redturtle/design-comuni-plone-theme/issues/613)) ([0d7e84b](https://github.com/redturtle/design-comuni-plone-theme/commit/0d7e84b7eb7c24cb4fe850ccd69e9b0749ab86b5)) +* view Listing blocks inside Grid block ([#626](https://github.com/redturtle/design-comuni-plone-theme/issues/626)) ([c5549a7](https://github.com/redturtle/design-comuni-plone-theme/commit/c5549a7285822df258b53f88ad3c53bcbf3c00aa)) + + +### Documentation + +* updated publiccode and release log ([d9adb4a](https://github.com/redturtle/design-comuni-plone-theme/commit/d9adb4a8ee896258244c3fd7f9b4198288c64892)) + ## [11.8.1](https://github.com/redturtle/design-comuni-plone-theme/compare/v11.8.0...v11.8.1) (2024-03-26) diff --git a/package.json b/package.json index b75dee97f..fb3382448 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.1", + "version": "11.9.0", "main": "src/index.js", "keywords": [ "volto-addon", From 7183f75f812b387469f8cd15037811d907c0181d Mon Sep 17 00:00:00 2001 From: Piero Nicolli Date: Wed, 3 Apr 2024 13:08:35 +0200 Subject: [PATCH 13/22] fix: missing message id in navigation customization --- RELEASE.md | 6 ++++++ .../volto/components/theme/Navigation/Navigation.jsx | 6 +++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/RELEASE.md b/RELEASE.md index 2a609ba4e..0a06a9097 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -41,6 +41,12 @@ - ... --> +## Versione 11.9.1 (03/04/2024) + +### Fix + +- Risolto un problema dovuto all'assenza di una id specifico nelle traduzioni. + ## Versione 11.9.0 (03/04/2024) ### Migliorie diff --git a/src/customizations/volto/components/theme/Navigation/Navigation.jsx b/src/customizations/volto/components/theme/Navigation/Navigation.jsx index 4550e9fed..f69231d45 100644 --- a/src/customizations/volto/components/theme/Navigation/Navigation.jsx +++ b/src/customizations/volto/components/theme/Navigation/Navigation.jsx @@ -112,7 +112,11 @@ const Navigation = ({ pathname }) => { > Date: Wed, 3 Apr 2024 13:09:10 +0200 Subject: [PATCH 14/22] docs: updated publiccode and release log --- publiccode.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/publiccode.yml b/publiccode.yml index 5618c1f32..181ea56ea 100644 --- a/publiccode.yml +++ b/publiccode.yml @@ -229,7 +229,7 @@ platforms: - web releaseDate: '2024-04-03' softwareType: standalone/web -softwareVersion: 11.9.0 +softwareVersion: 11.9.1 url: 'https://github.com/italia/design-comuni-plone-theme' usedBy: - ASP Comuni Modenesi Area Nord From 051b973025ce68aceecc85cfc1d237ffa4121298 Mon Sep 17 00:00:00 2001 From: Piero Nicolli Date: Wed, 3 Apr 2024 13:12:14 +0200 Subject: [PATCH 15/22] chore: release v11.9.1 --- CHANGELOG.md | 12 ++++++++++++ package.json | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ec9a8a2e6..735332f57 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,17 @@ +## [11.9.1](https://github.com/redturtle/design-comuni-plone-theme/compare/v11.9.0...v11.9.1) (2024-04-03) + + +### Bug Fixes + +* missing message id in navigation customization ([7183f75](https://github.com/redturtle/design-comuni-plone-theme/commit/7183f75f812b387469f8cd15037811d907c0181d)) + + +### Documentation + +* updated publiccode and release log ([c05ece3](https://github.com/redturtle/design-comuni-plone-theme/commit/c05ece3acec39bcc0f43f116ff3b994666f344d5)) + ## [11.9.0](https://github.com/redturtle/design-comuni-plone-theme/compare/v11.8.1...v11.9.0) (2024-04-03) diff --git a/package.json b/package.json index fb3382448..7dabb6031 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.9.0", + "version": "11.9.1", "main": "src/index.js", "keywords": [ "volto-addon", From 93ecc0b73b109f604a439c907d369a279dda4608 Mon Sep 17 00:00:00 2001 From: sabrina-bongiovanni <116291154+sabrina-bongiovanni@users.noreply.github.com> Date: Fri, 5 Apr 2024 09:57:46 +0200 Subject: [PATCH 16/22] feat: selectFilter is now searchable for venue search in EventSearch (#631) --- RELEASE.md | 7 +++++++ .../Blocks/Common/SearchFilters/SelectFilter.jsx | 10 +++++++++- .../Blocks/EventSearch/DefaultFilters.js | 5 +++++ .../Blocks/common/_searchBlockFilters.scss | 16 ++++++++++++++++ 4 files changed, 37 insertions(+), 1 deletion(-) diff --git a/RELEASE.md b/RELEASE.md index 0a06a9097..5d8bc3d4b 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -41,6 +41,13 @@ - ... --> +## Versione X.X.X (dd/mm/yyyy) + +### Migliorie + +- Aggiunta la possibilità di inserire testo nel filtro luogo nel blocco Ricerca Eventi +- Le opzioni del menu a tendina per il filtro luogo nel blocco Ricerca Eventi sono ordinate alfabeticamente + ## Versione 11.9.1 (03/04/2024) ### Fix diff --git a/src/components/ItaliaTheme/Blocks/Common/SearchFilters/SelectFilter.jsx b/src/components/ItaliaTheme/Blocks/Common/SearchFilters/SelectFilter.jsx index c34deec02..474335694 100644 --- a/src/components/ItaliaTheme/Blocks/Common/SearchFilters/SelectFilter.jsx +++ b/src/components/ItaliaTheme/Blocks/Common/SearchFilters/SelectFilter.jsx @@ -4,7 +4,14 @@ import { SelectInput } from 'design-comuni-plone-theme/components'; import { useDispatch, useSelector } from 'react-redux'; import { searchContent, getVocabulary } from '@plone/volto/actions'; -const SelectFilter = ({ options, value, id, onChange, placeholder }) => { +const SelectFilter = ({ + options, + value, + id, + onChange, + placeholder, + isSearchable = false, +}) => { const dispatch = useDispatch(); const state = useSelector((state) => { @@ -64,6 +71,7 @@ const SelectFilter = ({ options, value, id, onChange, placeholder }) => { }} options={select_options?.filter((opt) => !!opt.value?.toString()) ?? []} isClearable={true} + isSearchable={isSearchable} // components={{ // ClearIndicator: (props) => { // const { diff --git a/src/components/ItaliaTheme/Blocks/EventSearch/DefaultFilters.js b/src/components/ItaliaTheme/Blocks/EventSearch/DefaultFilters.js index 75162dce8..6ecdf1179 100644 --- a/src/components/ItaliaTheme/Blocks/EventSearch/DefaultFilters.js +++ b/src/components/ItaliaTheme/Blocks/EventSearch/DefaultFilters.js @@ -65,6 +65,7 @@ const DefaultFilters = () => { component: SelectFilter, props: { value: null, + isSearchable: true, options: { dispatch: { path: subsite ? flattenToAppURL(subsite['@id']) : '/', @@ -72,6 +73,10 @@ const DefaultFilters = () => { fullobjects: 0, b_size: 10000, subrequests_name: 'venues', + additionalParams: { + sort_on: 'sortable_title', + sort_order: 'ascending', + }, }, placeholder: intl.formatMessage(messages.venues), }, diff --git a/src/theme/ItaliaTheme/Blocks/common/_searchBlockFilters.scss b/src/theme/ItaliaTheme/Blocks/common/_searchBlockFilters.scss index f25e64b45..1e544c53e 100644 --- a/src/theme/ItaliaTheme/Blocks/common/_searchBlockFilters.scss +++ b/src/theme/ItaliaTheme/Blocks/common/_searchBlockFilters.scss @@ -110,6 +110,18 @@ } } + .bg-primary { + .search-container { + .filter-wrapper { + &.select-filter { + .react-select__input { + color: color-contrast($primary); + } + } + } + } + } + .bg-secondary { .search-container { .filter-wrapper { @@ -140,6 +152,10 @@ .react-select__single-value { color: $secondary-text !important; } + + .react-select__input { + color: color-contrast($secondary); + } } &.date-filter .DateRangePickerInput { From 95cf313995fbe3b08b6af93867fe98d2a079e6a0 Mon Sep 17 00:00:00 2001 From: Piero Nicolli Date: Fri, 5 Apr 2024 14:44:26 +0200 Subject: [PATCH 17/22] performance testing branch --- .github/workflows/performance.yml | 47 +++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .github/workflows/performance.yml diff --git a/.github/workflows/performance.yml b/.github/workflows/performance.yml new file mode 100644 index 000000000..f6867aad7 --- /dev/null +++ b/.github/workflows/performance.yml @@ -0,0 +1,47 @@ +name: Docker build for latest performance test version +on: + push: + branches: [performance] + +jobs: + build_develop: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Login to DockerHub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Build and push Docker images + uses: docker/build-push-action@v4 + with: + context: . + file: ./dockerfiles/Dockerfile + tags: redturtletech/io-comune-base:perf + pull: true + push: true + cache-from: type=registry,ref=redturtletech/io-comune-base:perf + cache-to: type=inline + build-args: | + ADDON_NAME=design-comuni-plone-theme + ADDON_PATH=design-comuni-plone-theme + VOLTO_VERSION=17.7.0 + + - name: Deploy to rancher + uses: redturtle/rancher-deploy-action@v0.2.0 + with: + host: ${{ secrets.RANCHER_HOST }} + api-username: ${{ secrets.RANCHER_API_USERNAME }} + api-password: ${{ secrets.RANCHER_API_PASSWORD }} + cluster-id: ${{ secrets.RANCHER_CLUSTER_ID }} + project-id: ${{ secrets.RANCHER_PROJECT_ID }} + namespace: ${{ secrets.RANCHER_NAMESPACE_DEVELOP }} + workload: ${{ secrets.RANCHER_WORKLOAD_PERF }} + image: redturtletech/io-comune-base:perf + slack-hook-url: ${{ secrets.RANCHER_SLACK_HOOK_URL }} From a765cb9b21430fdaf939212862a4618e7ca93eb1 Mon Sep 17 00:00:00 2001 From: Piero Nicolli Date: Fri, 5 Apr 2024 15:20:53 +0200 Subject: [PATCH 18/22] fix: conditions for showing fields in ct documento --- .../DocumentoView/DocumentoDescrizione.jsx | 22 +++++++++++++------ 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/src/components/ItaliaTheme/View/DocumentoView/DocumentoDescrizione.jsx b/src/components/ItaliaTheme/View/DocumentoView/DocumentoDescrizione.jsx index 9e44d10c5..a5d5d17a0 100644 --- a/src/components/ItaliaTheme/View/DocumentoView/DocumentoDescrizione.jsx +++ b/src/components/ItaliaTheme/View/DocumentoView/DocumentoDescrizione.jsx @@ -42,11 +42,15 @@ const DocumentoDescrizione = ({ content }) => { return richTextHasContent(content.descrizione_estesa) || contentFolderHasItems(content, 'multimedia') || content.autori?.length > 0 || - content.licenza_distribuzione?.length > 0 ? ( + content.identificativo || + content.licenza_distribuzione?.length > 0 || + content.tipologia_licenze?.title || + content.tipologia_documento?.length > 0 || + content.tipologia_documenti_albopretorio?.title ? ( {contentFolderHasItems(content, 'multimedia') && ( @@ -61,7 +65,7 @@ const DocumentoDescrizione = ({ content }) => { )} {content.identificativo && (
-

{intl.formatMessage(messages.identificativo)}

+

{intl.formatMessage(messages.identificativo)}

{content.identificativo}

)} @@ -71,7 +75,9 @@ const DocumentoDescrizione = ({ content }) => { {(content.licenza_distribuzione?.length > 0 || content.tipologia_licenze?.title) && (
-

{intl.formatMessage(messages.licenza_distribuzione)}

+

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

{content.licenza_distribuzione?.length > 0 && (

{content.licenza_distribuzione}

)} @@ -82,7 +88,9 @@ const DocumentoDescrizione = ({ content }) => { )} {content.tipologia_documento?.length > 0 && (
-

{intl.formatMessage(messages.tipologia_documento)}

+

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

{content.tipologia_documento.map((tipo) => (

{tipo.title} @@ -92,9 +100,9 @@ const DocumentoDescrizione = ({ content }) => { )} {content.tipologia_documenti_albopretorio?.title && (

-

+

{intl.formatMessage(messages.tipologia_documenti_albopretorio)} -

+

{content.tipologia_documenti_albopretorio?.title}

From c051454fb4caebc3a35fa5130247c1edd6c9acb2 Mon Sep 17 00:00:00 2001 From: sabrina-bongiovanni <116291154+sabrina-bongiovanni@users.noreply.github.com> Date: Fri, 5 Apr 2024 17:38:22 +0200 Subject: [PATCH 19/22] fix: print styles for page ct and text editor (#630) * fix: print styles for page ct and text editor * chore: added release.md info --------- Co-authored-by: Piero Nicolli --- RELEASE.md | 1 + src/theme/ItaliaTheme/Print/_all_pages.scss | 32 +++++++++++++++++++++ src/theme/ItaliaTheme/Print/_page.scss | 20 +++++++++++++ src/theme/site.scss | 1 + 4 files changed, 54 insertions(+) create mode 100644 src/theme/ItaliaTheme/Print/_page.scss diff --git a/RELEASE.md b/RELEASE.md index 5d8bc3d4b..e12353fbb 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -47,6 +47,7 @@ - Aggiunta la possibilità di inserire testo nel filtro luogo nel blocco Ricerca Eventi - Le opzioni del menu a tendina per il filtro luogo nel blocco Ricerca Eventi sono ordinate alfabeticamente +- Migliorati gli stili per la stampa del CT pagina. ## Versione 11.9.1 (03/04/2024) diff --git a/src/theme/ItaliaTheme/Print/_all_pages.scss b/src/theme/ItaliaTheme/Print/_all_pages.scss index c2b5126bf..83d66ecc0 100644 --- a/src/theme/ItaliaTheme/Print/_all_pages.scss +++ b/src/theme/ItaliaTheme/Print/_all_pages.scss @@ -206,4 +206,36 @@ visibility: hidden; } } + + //subsite footer + .subsite-footer { + display: none; + } + + //text editor styles + .public-ui { + p.callout-bg, + p.callout { + margin: 0.5rem 0rem; + padding: 0rem 1.25rem; + font-size: 1rem; + border: none; + box-shadow: none; + } + } + + .draft-text-larger { + font-size: 1.2rem; + } + + .public-ui .draftjs-buttons a { + background-color: white; + color: $link-color; + padding: 0rem; + } + + //external link icon + svg.external-link { + display: none; + } } diff --git a/src/theme/ItaliaTheme/Print/_page.scss b/src/theme/ItaliaTheme/Print/_page.scss new file mode 100644 index 000000000..85eb00840 --- /dev/null +++ b/src/theme/ItaliaTheme/Print/_page.scss @@ -0,0 +1,20 @@ +.contenttype-document { + @media print { + .PageHeaderWrapper { + &.mb-4 { + margin-bottom: 0rem; + } + .title-description-wrapper { + h1 { + font-size: 1.5rem; + } + } + } + + p { + margin-bottom: 0rem; + margin-top: 1rem; + font-size: 1rem; + } + } +} diff --git a/src/theme/site.scss b/src/theme/site.scss index eb25da48f..ddd93954b 100644 --- a/src/theme/site.scss +++ b/src/theme/site.scss @@ -134,6 +134,7 @@ @import 'ItaliaTheme/Components/navscroll'; @import 'ItaliaTheme/Components/customerSatisfaction'; @import 'ItaliaTheme/Print/all_pages'; +@import 'ItaliaTheme/Print/page'; @import 'ItaliaTheme/Print/news_items'; @import 'ItaliaTheme/Print/bandi'; @import 'ItaliaTheme/Print/persona'; From c77afc679c8e3fbb0fdedb0f68bda8af40b6f27d Mon Sep 17 00:00:00 2001 From: Andrea Cecchi Date: Fri, 5 Apr 2024 17:58:38 +0200 Subject: [PATCH 20/22] fix: print minutes instead month in last modified info (#633) * fix: print minutes instead month in last modified info * fix: tests --------- Co-authored-by: Piero Nicolli --- src/components/ItaliaTheme/View/Commons/Metadata.jsx | 2 +- .../ItaliaTheme/View/__tests__/ServizioMetadati.test.jsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/ItaliaTheme/View/Commons/Metadata.jsx b/src/components/ItaliaTheme/View/Commons/Metadata.jsx index 2bc512e08..15fe20517 100644 --- a/src/components/ItaliaTheme/View/Commons/Metadata.jsx +++ b/src/components/ItaliaTheme/View/Commons/Metadata.jsx @@ -50,7 +50,7 @@ const Metadata = ({ {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')}

{content.rights && ( <> diff --git a/src/components/ItaliaTheme/View/__tests__/ServizioMetadati.test.jsx b/src/components/ItaliaTheme/View/__tests__/ServizioMetadati.test.jsx index 41434ddcd..10748098f 100644 --- a/src/components/ItaliaTheme/View/__tests__/ServizioMetadati.test.jsx +++ b/src/components/ItaliaTheme/View/__tests__/ServizioMetadati.test.jsx @@ -2235,7 +2235,7 @@ test('expect to render fields in page', async () => { ); expect(screen.getByText(/Ultimo aggiornamento/i)).toBeInTheDocument(); - expect(screen.getByText(/15-03-2023, 15:03/i)).toBeInTheDocument(); + expect(screen.getByText(/15-03-2023, 15:56/i)).toBeInTheDocument(); }); test('todo', () => { From b2c4e2d333082b27648dd9484a0dab61a57d4dba Mon Sep 17 00:00:00 2001 From: sabrina-bongiovanni <116291154+sabrina-bongiovanni@users.noreply.github.com> Date: Mon, 8 Apr 2024 10:24:07 +0200 Subject: [PATCH 21/22] fix: added label for organizzatore esterno field (#629) * fix: added label for organizzatore esterno field * fix: added translations --------- Co-authored-by: Piero Nicolli --- RELEASE.md | 8 ++++++++ locales/de/LC_MESSAGES/volto.po | 5 +++++ locales/en/LC_MESSAGES/volto.po | 7 ++++++- 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 ++++++- .../EventoContattiOrganizzatoreEsterno.jsx | 13 ++++++++++++- 8 files changed, 52 insertions(+), 3 deletions(-) diff --git a/RELEASE.md b/RELEASE.md index e12353fbb..c69ad24c4 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -49,6 +49,14 @@ - Le opzioni del menu a tendina per il filtro luogo nel blocco Ricerca Eventi sono ordinate alfabeticamente - Migliorati gli stili per la stampa del CT pagina. +### Novità + +- ... + +### Fix + +- Aggiunto il titolo per la sezione "Organizzatore esterno" quando il campo è compilato nel tipo di contenuto Evento. + ## Versione 11.9.1 (03/04/2024) ### Fix diff --git a/locales/de/LC_MESSAGES/volto.po b/locales/de/LC_MESSAGES/volto.po index 5aef367d5..a99f1c809 100644 --- a/locales/de/LC_MESSAGES/volto.po +++ b/locales/de/LC_MESSAGES/volto.po @@ -2743,6 +2743,11 @@ msgstr "" msgid "organizzato_da" msgstr "" +#: components/ItaliaTheme/View/EventoView/EventoContattiOrganizzatoreEsterno +# defaultMessage: Organizzatore +msgid "organizzatore" +msgstr "" + #: components/ItaliaTheme/View/Commons/TrasparenzaFields #: components/ItaliaTheme/View/TrasparenzaView/DettagliProcedimentiView # defaultMessage: Organo competente adozione provvedimento finale diff --git a/locales/en/LC_MESSAGES/volto.po b/locales/en/LC_MESSAGES/volto.po index 37135a8ab..c8b7bffef 100644 --- a/locales/en/LC_MESSAGES/volto.po +++ b/locales/en/LC_MESSAGES/volto.po @@ -2726,7 +2726,12 @@ msgstr "Order by" #: components/ItaliaTheme/View/EventoView/EventoContattiOrganizzatoreInterno # defaultMessage: Organizzato da msgid "organizzato_da" -msgstr "" +msgstr "Organized by" + +#: components/ItaliaTheme/View/EventoView/EventoContattiOrganizzatoreEsterno +# defaultMessage: Organizzatore +msgid "organizzatore" +msgstr "Organizer" #: components/ItaliaTheme/View/Commons/TrasparenzaFields #: components/ItaliaTheme/View/TrasparenzaView/DettagliProcedimentiView diff --git a/locales/es/LC_MESSAGES/volto.po b/locales/es/LC_MESSAGES/volto.po index c8d4e98ed..23f59429d 100644 --- a/locales/es/LC_MESSAGES/volto.po +++ b/locales/es/LC_MESSAGES/volto.po @@ -2737,6 +2737,11 @@ msgstr "Ordenado por" msgid "organizzato_da" msgstr "" +#: components/ItaliaTheme/View/EventoView/EventoContattiOrganizzatoreEsterno +# defaultMessage: Organizzatore +msgid "organizzatore" +msgstr "" + #: components/ItaliaTheme/View/Commons/TrasparenzaFields #: components/ItaliaTheme/View/TrasparenzaView/DettagliProcedimentiView # defaultMessage: Organo competente adozione provvedimento finale diff --git a/locales/fr/LC_MESSAGES/volto.po b/locales/fr/LC_MESSAGES/volto.po index 6e206b814..e5ca646bd 100644 --- a/locales/fr/LC_MESSAGES/volto.po +++ b/locales/fr/LC_MESSAGES/volto.po @@ -2745,6 +2745,11 @@ msgstr "Trier par" msgid "organizzato_da" msgstr "" +#: components/ItaliaTheme/View/EventoView/EventoContattiOrganizzatoreEsterno +# defaultMessage: Organizzatore +msgid "organizzatore" +msgstr "" + #: components/ItaliaTheme/View/Commons/TrasparenzaFields #: components/ItaliaTheme/View/TrasparenzaView/DettagliProcedimentiView # defaultMessage: Organo competente adozione provvedimento finale diff --git a/locales/it/LC_MESSAGES/volto.po b/locales/it/LC_MESSAGES/volto.po index 790033409..f34fb7d60 100644 --- a/locales/it/LC_MESSAGES/volto.po +++ b/locales/it/LC_MESSAGES/volto.po @@ -2728,6 +2728,11 @@ msgstr "Ordina per" msgid "organizzato_da" msgstr "Organizzato da" +#: components/ItaliaTheme/View/EventoView/EventoContattiOrganizzatoreEsterno +# defaultMessage: Organizzatore +msgid "organizzatore" +msgstr "" + #: components/ItaliaTheme/View/Commons/TrasparenzaFields #: components/ItaliaTheme/View/TrasparenzaView/DettagliProcedimentiView # defaultMessage: Organo competente adozione provvedimento finale diff --git a/locales/volto.pot b/locales/volto.pot index e98863915..a4a47e9e8 100644 --- a/locales/volto.pot +++ b/locales/volto.pot @@ -1,7 +1,7 @@ msgid "" msgstr "" "Project-Id-Version: Plone\n" -"POT-Creation-Date: 2024-04-03T08:27:02.322Z\n" +"POT-Creation-Date: 2024-04-03T13:54:10.953Z\n" "Last-Translator: Plone i18n \n" "Language-Team: Plone i18n \n" "MIME-Version: 1.0\n" @@ -2730,6 +2730,11 @@ msgstr "" msgid "organizzato_da" msgstr "" +#: components/ItaliaTheme/View/EventoView/EventoContattiOrganizzatoreEsterno +# defaultMessage: Organizzatore +msgid "organizzatore" +msgstr "" + #: components/ItaliaTheme/View/Commons/TrasparenzaFields #: components/ItaliaTheme/View/TrasparenzaView/DettagliProcedimentiView # defaultMessage: Organo competente adozione provvedimento finale diff --git a/src/components/ItaliaTheme/View/EventoView/EventoContattiOrganizzatoreEsterno.jsx b/src/components/ItaliaTheme/View/EventoView/EventoContattiOrganizzatoreEsterno.jsx index b434308a0..2dab19114 100644 --- a/src/components/ItaliaTheme/View/EventoView/EventoContattiOrganizzatoreEsterno.jsx +++ b/src/components/ItaliaTheme/View/EventoView/EventoContattiOrganizzatoreEsterno.jsx @@ -1,4 +1,5 @@ import PropTypes from 'prop-types'; +import { defineMessages, useIntl } from 'react-intl'; import { Card, CardBody } from 'design-react-kit'; import { RichText, @@ -6,12 +7,22 @@ import { ContactLink, } from 'design-comuni-plone-theme/components/ItaliaTheme/View'; +const messages = defineMessages({ + organizzatore: { + id: 'organizzatore', + defaultMessage: 'Organizzatore', + }, +}); + const EventoContattiOrganizzatoreEsterno = ({ content }) => { + const intl = useIntl(); + return richTextHasContent(content?.organizzato_da_esterno) || content?.telefono || content?.email || content?.fax ? ( -
+
+

{intl.formatMessage(messages.organizzatore)}

Date: Mon, 8 Apr 2024 11:14:05 +0200 Subject: [PATCH 22/22] feat: new trackMouse component (#568) * feat: new trackMouse component * fix: active class * feat: new TrackFocus component with active status * fix: removed forced focus on buttons * fix: css re-done * fix: removed useEffect and useState * fix: ref removed * docs: release file --------- Co-authored-by: Piero Nicolli --- RELEASE.md | 5 +- .../ItaliaTheme/AppExtras/TrackFocus.jsx | 47 +++++++++++++++++++ .../ItaliaTheme/MegaMenu/MegaMenu.jsx | 10 +++- .../MenuSecondary/MenuSecondary.jsx | 3 ++ src/config/italiaConfig.js | 9 +++- .../ItaliaTheme/Components/_navigation.scss | 15 ++++++ src/theme/site.scss | 1 + 7 files changed, 84 insertions(+), 6 deletions(-) create mode 100644 src/components/ItaliaTheme/AppExtras/TrackFocus.jsx create mode 100644 src/theme/ItaliaTheme/Components/_navigation.scss diff --git a/RELEASE.md b/RELEASE.md index c69ad24c4..ec8379cdc 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -45,8 +45,9 @@ ### Migliorie -- Aggiunta la possibilità di inserire testo nel filtro luogo nel blocco Ricerca Eventi -- Le opzioni del menu a tendina per il filtro luogo nel blocco Ricerca Eventi sono ordinate alfabeticamente +- Aggiunta la possibilità di inserire testo nel filtro luogo nel blocco Ricerca Eventi. +- Le opzioni del menu a tendina per il filtro luogo nel blocco Ricerca Eventi sono ordinate alfabeticamente. +- Il focus quando un elemento (link o pulsante) è cliccato con il mouse non ha più il bordo giallo/arancione. - Migliorati gli stili per la stampa del CT pagina. ### Novità diff --git a/src/components/ItaliaTheme/AppExtras/TrackFocus.jsx b/src/components/ItaliaTheme/AppExtras/TrackFocus.jsx new file mode 100644 index 000000000..0db5400fe --- /dev/null +++ b/src/components/ItaliaTheme/AppExtras/TrackFocus.jsx @@ -0,0 +1,47 @@ +import React, { useEffect, useRef } from 'react'; + +const DATA_FOCUS_MOUSE = 'data-focus-mouse'; +const CLASS_NAME_MOUSE_FOCUS = 'focus--mouse'; + +const TrackFocus = () => { + const usingMouse = useRef(false); + + useEffect(() => { + const handleEvent = (e) => { + usingMouse.current = e.type === 'mousedown'; + }; + const handleFocusChange = (e) => { + if (e.target) { + if (usingMouse.current) { + e.target.classList.add(CLASS_NAME_MOUSE_FOCUS); + e.target.setAttribute(DATA_FOCUS_MOUSE, true); + } else { + e.target.classList.remove(CLASS_NAME_MOUSE_FOCUS); + e.target.removeAttribute(DATA_FOCUS_MOUSE); + } + } + }; + const handleFocusOut = (e) => { + if (e.target) { + e.target.classList.remove(CLASS_NAME_MOUSE_FOCUS); + e.target.removeAttribute(DATA_FOCUS_MOUSE); + } + }; + + document.addEventListener('keydown', handleEvent); + document.addEventListener('mousedown', handleEvent); + document.addEventListener('focusin', handleFocusChange); + document.addEventListener('focusout', handleFocusOut); + + return () => { + document.removeEventListener('keydown', handleEvent); + document.removeEventListener('mousedown', handleEvent); + document.removeEventListener('focusin', handleFocusChange); + document.removeEventListener('focusout', handleFocusOut); + }; + }, []); + + return null; +}; + +export default TrackFocus; diff --git a/src/components/ItaliaTheme/MegaMenu/MegaMenu.jsx b/src/components/ItaliaTheme/MegaMenu/MegaMenu.jsx index e55aede9d..66aed8490 100644 --- a/src/components/ItaliaTheme/MegaMenu/MegaMenu.jsx +++ b/src/components/ItaliaTheme/MegaMenu/MegaMenu.jsx @@ -114,11 +114,12 @@ const MegaMenu = ({ item, pathname }) => { return item.linkUrl?.length > 0 ? ( @@ -239,7 +240,12 @@ const MegaMenu = ({ item, pathname }) => { } return ( - + { import('design-comuni-plone-theme/components/ReleaseLog/ReleaseLog'), +const ReleaseLog = loadable(() => + import('design-comuni-plone-theme/components/ReleaseLog/ReleaseLog'), ); const messages = defineMessages({ @@ -287,6 +288,10 @@ export default function applyConfig(voltoConfig) { match: '', component: PageLoader, }, + { + match: '', + component: TrackFocus, + }, ], maxFileUploadSize: null, 'volto-blocks-widget': { diff --git a/src/theme/ItaliaTheme/Components/_navigation.scss b/src/theme/ItaliaTheme/Components/_navigation.scss new file mode 100644 index 000000000..fe6451c66 --- /dev/null +++ b/src/theme/ItaliaTheme/Components/_navigation.scss @@ -0,0 +1,15 @@ +.public-ui { + .navbar { + .navbar-collapsable { + .navbar-nav { + li { + a.nav-link { + &.focus--mouse { + border-color: unset !important; + } + } + } + } + } + } +} diff --git a/src/theme/site.scss b/src/theme/site.scss index ddd93954b..0334d6208 100644 --- a/src/theme/site.scss +++ b/src/theme/site.scss @@ -41,6 +41,7 @@ @import 'ItaliaTheme/Components/sideMenu'; @import 'ItaliaTheme/Components/loginAgid'; @import 'ItaliaTheme/Components/pager'; +@import 'ItaliaTheme/Components/navigation'; @import 'ItaliaTheme/Blocks/subblocks-edit'; @import 'ItaliaTheme/Blocks/listing'; @import 'ItaliaTheme/Blocks/tableOfContents';