Skip to content

Commit

Permalink
Merge branch 'main' into us_53092_stampa_ct_uffici
Browse files Browse the repository at this point in the history
  • Loading branch information
pnicolli authored Mar 19, 2024
2 parents 4af1d64 + 96649e2 commit ac6c448
Show file tree
Hide file tree
Showing 28 changed files with 582 additions and 143 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
24 changes: 21 additions & 3 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,18 +47,36 @@

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

## Versione 11.6.1 (06/03/2024)
### Novità

- E' possibile scaricare il file o l'immagine caricata dal widget di upload file cliccando sul nome del file stesso.

## Versione 11.7.0 (15/03/2024)

### Novità

- 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
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
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
3 changes: 3 additions & 0 deletions src/components/ItaliaTheme/View/Commons/RenderBlocks.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ const RenderBlocks = ({
if (block['@type'] === 'text' && !block.text) {
return null;
}
if (block['@type'] === 'slate' && block.plaintext?.length === 0) {
return null;
}
}
return items?.length > 0 ? (
<>
Expand Down
34 changes: 30 additions & 4 deletions src/components/ItaliaTheme/manage/Widgets/FileWidget.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

import React from 'react';
import PropTypes from 'prop-types';
import cx from 'classnames';
import { Dimmer, Button } from 'design-react-kit';
import { readAsDataURL } from 'promise-file-reader';
import { injectIntl, defineMessages, useIntl } from 'react-intl';
Expand Down Expand Up @@ -56,14 +57,25 @@ const messages = defineMessages({
* @returns {string} Markup of the component.
*/
const FileWidget = (props) => {
const { id, value, onChange, label, onEdit, infoText, required, invalid } =
props;
const {
id,
value,
onChange,
label,
onEdit,
infoText,
required,
invalid,
validationText,
} = props;
const [isImage, setIsImage] = React.useState(false);
const intl = useIntl();

React.useEffect(() => {
if (value && imageMimetypes.includes(value['content-type'])) {
setIsImage(true);
} else {
setIsImage(false);
}
}, [value]);

Expand Down Expand Up @@ -150,7 +162,7 @@ const FileWidget = (props) => {
</div>
)}

<small className="form-text text-muted">
<small className="form-text">
{value
? intl.formatMessage(messages.replaceFile)
: intl.formatMessage(messages.addNewFile)}
Expand All @@ -171,7 +183,16 @@ const FileWidget = (props) => {
</div>
)}
</Dropzone>
{infoText && <small className="form-text text-muted">{infoText}</small>}
{infoText && (
<small
className={cx('form-text', {
'invalid-feedback form-feedback just-validate-error-label form-feedback just-validate-error-label':
invalid,
})}
>
{infoText}
</small>
)}
{value && (
<div className="field-file-name">
{value.filename}
Expand All @@ -189,6 +210,11 @@ const FileWidget = (props) => {
</div>
)}
</div>
{validationText && (
<div className="invalid-feedback form-feedback just-validate-error-label form-text form-feedback just-validate-error-label">
{validationText}
</div>
)}
</div>
);
};
Expand Down
Loading

0 comments on commit ac6c448

Please sign in to comment.