Skip to content

Commit

Permalink
Merge branch 'main' into fix_bg_image_icon_blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
pnicolli authored Mar 19, 2024
2 parents 286f4bd + d076b0a commit d8f34c3
Show file tree
Hide file tree
Showing 40 changed files with 739 additions and 150 deletions.
32 changes: 32 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,37 @@


## [11.7.0](https://github.com/redturtle/design-comuni-plone-theme/compare/v11.6.2...v11.7.0) (2024-03-15)


### Features

* editable footer top ([#528](https://github.com/redturtle/design-comuni-plone-theme/issues/528)) ([542e2ec](https://github.com/redturtle/design-comuni-plone-theme/commit/542e2ecc95be9b182f7d9f6b45ef893852587022))
* update volto-feedback 0.3.0 ([3d9dfbe](https://github.com/redturtle/design-comuni-plone-theme/commit/3d9dfbe16111065ec04924430a6d3487ab6d1b05))
* updated volto-form-block to fix multiple form in same page and added schema field custom validator ([#586](https://github.com/redturtle/design-comuni-plone-theme/issues/586)) ([407ae18](https://github.com/redturtle/design-comuni-plone-theme/commit/407ae18d876f6d5ada3095a2990ccbe3727ba06e))
* view error for each form field, validate form config ([#578](https://github.com/redturtle/design-comuni-plone-theme/issues/578)) ([45e2f72](https://github.com/redturtle/design-comuni-plone-theme/commit/45e2f727ac6ea5f23f57661a1acef83f94b19a2e))


### Bug Fixes

* added condition for focus when going back within feedback form ([#588](https://github.com/redturtle/design-comuni-plone-theme/issues/588)) ([7911d89](https://github.com/redturtle/design-comuni-plone-theme/commit/7911d892e04fcb5584ba52d180f8bb79768d5c28))
* button clear in form block ([68c8bf8](https://github.com/redturtle/design-comuni-plone-theme/commit/68c8bf85183edfeb53cd5525327d6210fae18df3))
* button type of cancel button in form block ([9a10ff8](https://github.com/redturtle/design-comuni-plone-theme/commit/9a10ff8f40b20753c9400ceb6909e3ff5a543805))
* default value for show_type in card-with-image-template ([#579](https://github.com/redturtle/design-comuni-plone-theme/issues/579)) ([fe95462](https://github.com/redturtle/design-comuni-plone-theme/commit/fe95462a49e99c5a442023d727676b485ab8edfe))
* imaged full width view in edit mode ([#570](https://github.com/redturtle/design-comuni-plone-theme/issues/570)) ([053183b](https://github.com/redturtle/design-comuni-plone-theme/commit/053183baea2ce3e11b365bf29559ea532af33fc1))
* restored right border in listing block small links template ([#582](https://github.com/redturtle/design-comuni-plone-theme/issues/582)) ([beb07ad](https://github.com/redturtle/design-comuni-plone-theme/commit/beb07ad251cb5e5b96c67c6a64ac01ea3f229526))
* update volto-form-block for subdomain mail validation ([#584](https://github.com/redturtle/design-comuni-plone-theme/issues/584)) ([92939a2](https://github.com/redturtle/design-comuni-plone-theme/commit/92939a28e59d829e05423f83dc0564b9c008692e))


### Maintenance

* Update RELEASE.md ([f308e6b](https://github.com/redturtle/design-comuni-plone-theme/commit/f308e6bf000ca0d41ccfd63557f73b1372ab8faa))


### Documentation

* fix merge mistake in the release docs ([232af7a](https://github.com/redturtle/design-comuni-plone-theme/commit/232af7a1624724e60722c346533223bea95fd8be))
* updated publiccode and release log ([3e48692](https://github.com/redturtle/design-comuni-plone-theme/commit/3e48692faa06bf6fff7ee16a06032e1b1e7dd782))

## [11.6.2](https://github.com/redturtle/design-comuni-plone-theme/compare/v11.6.1...v11.6.2) (2024-03-08)


Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ Si veda ad esempio:
- [Comune di Piacenza](https://www.comune.piacenza.it/)
- [Comune di Prignano sulla Secchia](https://www.comune.prignano.mo.it/)
- [Comune di Reggio Emilia](https://www.comune.re.it/)
- [Comune di Rolo](https://www.comune.rolo.re.it/)
- [Comune di San Felice sul Panaro](https://www.comune.sanfelice.mo.it/)
- [Comune di San Lazzaro di Savena](https://www.comune.sanlazzaro.bo.it)
- [Comune di San Polo d'Enza](https://www.comune.sanpolodenza.re.it/)
Expand Down
31 changes: 27 additions & 4 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,24 +41,47 @@
- ...
-->

## Versione x.x.x (xx/xx/xxxx)
## Versione X.X.X (dd/mm/yyyy)

### Migliorie

- Gli stili del tipo di contenuto Unità Organizzativa sono stati ottimizzati per la stampa.

### Novità

- È possibile scaricare il file o l'immagine caricata dal widget di upload file cliccando sul nome del file stesso.
- È possibile aggiungere un testo alternativo per l'immagine del blocco Card con Immagine.

### Fix

- Nel blocco con icone, se era impostata una immagine di sfondo non si vedeva.

## Versione 11.6.1 (06/03/2024)
## Versione 11.7.0 (15/03/2024)

### Novità

- Ora la fascia del footer contenente il logo e il nome del sito è configurabile da pannello di controllo.
- Nel pannello di controllo dei Feedback, ora gli utenti con permesso di eliminare elementi da questa sezione, possono eliminare i feedback.

### Migliorie

- Nel blocco form, se in fase di compilazione ci sono degli errori, viene mostrato un messaggio di errore specifico per ogni campo con errori.

### Fix

- Quando si imposta una ricorrenza per giorni feriali negli Eventi, viene visualizzato il testo corretto "ogni giorno feriale".
- Il bordo destro della variazione Link solo immagine del blocco Elenco è stato ripristinato.
- Se si mettono due blocchi Form nella stessa pagina, ora funzionano correttamente.
- Aggiustato il modulo di Feedback quando si cambia valutazione dopo averne già selezionata un'altra.

## Versione 11.6.0 (05/03/2024)
## Versione 11.6.1 (06/03/2024)

### Fix

- Quando si imposta una ricorrenza per giorni feriali negli Eventi, viene visualizzato il testo corretto "ogni giorno feriale".
- Le icone social nel menu laterale mobile sono tutte dello stesso colore.

## Versione 11.6.0 (05/03/2024)

### Migliorie

- Nel blocco form è stata aggiunta una legenda per i campi obbligatori.
Expand Down
2 changes: 2 additions & 0 deletions jest-addon.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ module.exports = {
'^volto-dropdownmenu/(.*)$':
'<rootDir>/node_modules/volto-dropdownmenu/src/$1',
'^volto-feedback/(.*)$': '<rootDir>/node_modules/volto-feedback/src/$1',
'^volto-blocks-widget/(.*)$':
'<rootDir>/node_modules/volto-blocks-widget/src/$1',
},
collectCoverage: false,
collectCoverageFrom: [
Expand Down
5 changes: 5 additions & 0 deletions locales/de/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -778,6 +778,11 @@ msgstr ""
msgid "allegati"
msgstr ""

#: components/ItaliaTheme/Blocks/TextCard/CardWithImage/Sidebar
# defaultMessage: Testo alternativo per l'immagine
msgid "altText"
msgstr ""

#: components/ItaliaTheme/View/PersonaView/PersonaDocumenti
# defaultMessage: Altre cariche
msgid "altre_cariche"
Expand Down
5 changes: 5 additions & 0 deletions locales/en/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -763,6 +763,11 @@ msgstr "All topics"
msgid "allegati"
msgstr "Attached documents"

#: components/ItaliaTheme/Blocks/TextCard/CardWithImage/Sidebar
# defaultMessage: Testo alternativo per l'immagine
msgid "altText"
msgstr ""

#: components/ItaliaTheme/View/PersonaView/PersonaDocumenti
# defaultMessage: Altre cariche
msgid "altre_cariche"
Expand Down
5 changes: 5 additions & 0 deletions locales/es/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -772,6 +772,11 @@ msgstr "Todos los temas"
msgid "allegati"
msgstr "Documentos adjuntos"

#: components/ItaliaTheme/Blocks/TextCard/CardWithImage/Sidebar
# defaultMessage: Testo alternativo per l'immagine
msgid "altText"
msgstr ""

#: components/ItaliaTheme/View/PersonaView/PersonaDocumenti
# defaultMessage: Altre cariche
msgid "altre_cariche"
Expand Down
5 changes: 5 additions & 0 deletions locales/fr/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -780,6 +780,11 @@ msgstr "Tous les sujets"
msgid "allegati"
msgstr "Documents attachés"

#: components/ItaliaTheme/Blocks/TextCard/CardWithImage/Sidebar
# defaultMessage: Testo alternativo per l'immagine
msgid "altText"
msgstr ""

#: components/ItaliaTheme/View/PersonaView/PersonaDocumenti
# defaultMessage: Altre cariche
msgid "altre_cariche"
Expand Down
5 changes: 5 additions & 0 deletions locales/it/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -763,6 +763,11 @@ msgstr "Tutti gli argomenti"
msgid "allegati"
msgstr "Documenti allegati"

#: components/ItaliaTheme/Blocks/TextCard/CardWithImage/Sidebar
# defaultMessage: Testo alternativo per l'immagine
msgid "altText"
msgstr ""

#: components/ItaliaTheme/View/PersonaView/PersonaDocumenti
# defaultMessage: Altre cariche
msgid "altre_cariche"
Expand Down
7 changes: 6 additions & 1 deletion locales/volto.pot
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
msgid ""
msgstr ""
"Project-Id-Version: Plone\n"
"POT-Creation-Date: 2024-03-06T10:48:38.114Z\n"
"POT-Creation-Date: 2024-03-07T15:23:38.346Z\n"
"Last-Translator: Plone i18n <[email protected]>\n"
"Language-Team: Plone i18n <[email protected]>\n"
"MIME-Version: 1.0\n"
Expand Down Expand Up @@ -765,6 +765,11 @@ msgstr ""
msgid "allegati"
msgstr ""

#: components/ItaliaTheme/Blocks/TextCard/CardWithImage/Sidebar
# defaultMessage: Testo alternativo per l'immagine
msgid "altText"
msgstr ""

#: components/ItaliaTheme/View/PersonaView/PersonaDocumenti
# defaultMessage: Altre cariche
msgid "altre_cariche"
Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "design-comuni-plone-theme",
"description": "Volto Theme for Italia design guidelines",
"license": "GPL-v3",
"version": "11.6.2",
"version": "11.7.0",
"main": "src/index.js",
"keywords": [
"volto-addon",
Expand Down Expand Up @@ -141,16 +141,16 @@
"typeface-lora": "0.0.72",
"typeface-roboto-mono": "0.0.75",
"typeface-titillium-web": "0.0.72",
"volto-blocks-widget": "3.1.0",
"volto-blocks-widget": "3.4.0",
"volto-data-grid-widget": "2.3.1",
"volto-dropdownmenu": "4.1.1",
"volto-editablefooter": "5.0.3",
"volto-feedback": "0.2.0",
"volto-form-block": "3.3.1",
"volto-editablefooter": "5.1.0",
"volto-feedback": "0.3.0",
"volto-form-block": "3.7.0",
"volto-gdpr-privacy": "2.1.1",
"volto-google-analytics": "2.0.0",
"volto-multilingual-widget": "3.0.0",
"volto-querywidget-with-browser": "0.4.1",
"volto-querywidget-with-browser": "0.4.2",
"volto-rss-block": "3.0.0",
"volto-secondarymenu": "4.0.0",
"volto-social-settings": "3.0.0",
Expand Down
5 changes: 3 additions & 2 deletions publiccode.yml
Original file line number Diff line number Diff line change
Expand Up @@ -227,9 +227,9 @@ maintenance:
name: io-Comune - Il sito AgID per Comuni ed Enti Pubblici
platforms:
- web
releaseDate: '2024-03-08'
releaseDate: '2024-03-15'
softwareType: standalone/web
softwareVersion: 11.6.2
softwareVersion: 11.7.0
url: 'https://github.com/italia/design-comuni-plone-theme'
usedBy:
- ASP Comuni Modenesi Area Nord
Expand Down Expand Up @@ -277,6 +277,7 @@ usedBy:
- Comune di Piacenza
- Comune di Prignano
- Comune di Reggio Emilia
- Comune di Rolo
- Comune di San Felice sul Panaro
- Comune di San Lazzaro di Savena
- Comune di San Polo d'Enza
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ const CardWithImageTemplate = (props) => {
show_block_bg = false,
always_show_image = false,
set_four_columns = false,
show_type = true,
show_type = false,
show_section,
show_icon = true,
show_description = true,
Expand Down
18 changes: 14 additions & 4 deletions src/components/ItaliaTheme/Blocks/TextCard/CardWithImage/Block.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const messages = defineMessages({
},
});

const renderImage = (image, showImage, sizeNatural) =>
const renderImage = (image, showImage, sizeNatural, altText = '') =>
showImage && image ? (
<div className="img-responsive-wrapper">
<div
Expand All @@ -35,7 +35,7 @@ const renderImage = (image, showImage, sizeNatural) =>
<figure className="img-wrapper">
<img
src={`data:${image['content-type']};${image.encoding},${image.data}`}
alt=""
alt={altText}
aria-hidden="true"
loading="lazy"
/>
Expand Down Expand Up @@ -117,7 +117,12 @@ const Block = ({
>
{hasImage && (
<Col className="my-1 px-0" key={'col-0'}>
{renderImage(data?.image, hasImage, data?.sizeNatural)}
{renderImage(
data?.image,
hasImage,
data?.sizeNatural,
data?.altText,
)}
</Col>
)}
<div
Expand Down Expand Up @@ -170,7 +175,12 @@ const Block = ({
})}
>
<Col className="my-1 p-0" key={'col-0'} data-testid={'col-0'}>
{renderImage(data?.image, hasImage, data?.sizeNatural)}
{renderImage(
data?.image,
hasImage,
data?.sizeNatural,
data?.altText,
)}
</Col>
<div
key={'col-1'}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
FileWidget,
CheckboxWidget,
FormFieldWrapper,
TextWidget,
} from '@plone/volto/components';
import ImageSizeWidget from '@plone/volto/components/manage/Widgets/ImageSizeWidget';

Expand Down Expand Up @@ -44,6 +45,10 @@ const messages = defineMessages({
id: 'Grande',
defaultMessage: 'Grande',
},
altText: {
id: 'altText',
defaultMessage: "Testo alternativo per l'immagine",
},
});

const Sidebar = ({ data, block, onChangeBlock }) => {
Expand Down Expand Up @@ -105,6 +110,14 @@ const Sidebar = ({ data, block, onChangeBlock }) => {
value={data.sizeImage || 's'}
/>
</FormFieldWrapper>
<TextWidget
id="altText"
title={intl.formatMessage(messages.altText)}
value={data.altText}
onChange={(name, value) => {
onChangeBlock({ ...data, altText: value });
}}
/>
</Accordion.Content>
</Accordion>
</Segment.Group>
Expand Down
12 changes: 4 additions & 8 deletions src/components/ItaliaTheme/CustomerSatisfaction/FeedbackForm.jsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
import React, {
useState,
useEffect,
useLayoutEffect,
useCallback,
useMemo,
} from 'react';
import React, { useState, useEffect, useCallback } from 'react';
import { useSelector, useDispatch } from 'react-redux';
import { useLocation } from 'react-router-dom';
import { useIntl, defineMessages } from 'react-intl';
Expand Down Expand Up @@ -215,7 +209,9 @@ const FeedbackForm = ({ contentType, pathname }) => {
satisfaction > threshold ? 'positive' : 'negative'
}-${getFormFieldValue('answer')}`,
);
selectedAnswer.focus();
if (selectedAnswer) {
selectedAnswer.focus();
}
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [step]);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useRef, useEffect } from 'react';
import React from 'react';
import { TextArea, Form, FormGroup } from 'design-react-kit';
import { defineMessages } from 'react-intl';
import { FormHeader } from 'volto-feedback';
Expand Down
18 changes: 13 additions & 5 deletions src/components/ItaliaTheme/Footer/FooterMain.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,32 @@ import {
FooterPNRRLogo,
} from 'design-comuni-plone-theme/components/ItaliaTheme/';

import { FooterTop } from 'volto-editablefooter';

/**
* FooterMain component class.
* @class FooterMain
* @extends Component
*/
const FooterMain = () => {
const footerTopContent = FooterTop();

return (
<div className="it-footer-main">
<Container tag="div">
<section>
<Row className="clearfix" tag="div">
<Col sm={12} tag="div" widths={['xs', 'sm', 'md', 'lg', 'xl']}>
<div className="it-brand-wrapper">
<FooterPNRRLogo />
<UniversalLink href="/">
<LogoFooter />
<BrandTextFooter />
</UniversalLink>
{footerTopContent ?? (
<>
<FooterPNRRLogo />
<UniversalLink href="/">
<LogoFooter />
<BrandTextFooter />
</UniversalLink>
</>
)}
</div>
</Col>
</Row>
Expand Down
Loading

0 comments on commit d8f34c3

Please sign in to comment.