Skip to content

Commit

Permalink
Merge branch 'main' into us_51461_icon_block_icons_aria_hidden_attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
sabrina-bongiovanni committed Mar 25, 2024
2 parents e46ab65 + 01b331e commit 35ec3df
Show file tree
Hide file tree
Showing 18 changed files with 435 additions and 21 deletions.
27 changes: 27 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,32 @@


## [11.8.0](https://github.com/redturtle/design-comuni-plone-theme/compare/v11.7.0...v11.8.0) (2024-03-19)


### Features

* added download link to filename in file widget ([#587](https://github.com/redturtle/design-comuni-plone-theme/issues/587)) ([96649e2](https://github.com/redturtle/design-comuni-plone-theme/commit/96649e29e79a7b71bf93a27406baa4fc1994a213))
* print styles for UO ([#581](https://github.com/redturtle/design-comuni-plone-theme/issues/581)) ([91b4752](https://github.com/redturtle/design-comuni-plone-theme/commit/91b47526b69b0957eba6c8e803798f4b3ffcf9bb))
* TextWidget to add alt text to image ([#573](https://github.com/redturtle/design-comuni-plone-theme/issues/573)) ([d183f27](https://github.com/redturtle/design-comuni-plone-theme/commit/d183f2749a2604ebecb0f0df09ec8770d84c7f59))
* updated volto-form-block with email validation ([#596](https://github.com/redturtle/design-comuni-plone-theme/issues/596)) ([c21f65b](https://github.com/redturtle/design-comuni-plone-theme/commit/c21f65bc7e54d2fa092ae4bcfbfd1c99670cab5c))


### Bug Fixes

* link in header doesn't change color when inside cms-ui ([#583](https://github.com/redturtle/design-comuni-plone-theme/issues/583)) ([d076b0a](https://github.com/redturtle/design-comuni-plone-theme/commit/d076b0a540cf3de3c9f7f08cefca27eff3917f70))
* updated volto-querywidget-with-browser to fix infinite loops on lost reference ([#599](https://github.com/redturtle/design-comuni-plone-theme/issues/599)) ([c6d4cb6](https://github.com/redturtle/design-comuni-plone-theme/commit/c6d4cb6b51447514fedf2938f40031e42779644e))
* view form block ([5ff7ea7](https://github.com/redturtle/design-comuni-plone-theme/commit/5ff7ea70474963e3dca126a44d531cc4dc17be74))


### Maintenance

* updated volto-form-block to fix view form ([80a6586](https://github.com/redturtle/design-comuni-plone-theme/commit/80a6586ac7d458c46efe51bcc4fa4a9cb3b8d619))


### Documentation

* updated publiccode and release log ([3c52c12](https://github.com/redturtle/design-comuni-plone-theme/commit/3c52c12edfed3c12a4fdac212b9f229644bf913f))

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


Expand Down
10 changes: 10 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,16 @@
### Migliorie

- Migliorata l'accessibilità del blocco Icone.
## Versione 11.8.0 (19/03/2024)

### 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.

## Versione 11.7.0 (15/03/2024)

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
6 changes: 3 additions & 3 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.7.0",
"version": "11.8.0",
"main": "src/index.js",
"keywords": [
"volto-addon",
Expand Down Expand Up @@ -146,11 +146,11 @@
"volto-dropdownmenu": "4.1.1",
"volto-editablefooter": "5.1.0",
"volto-feedback": "0.3.0",
"volto-form-block": "3.5.2",
"volto-form-block": "3.7.0",
"volto-gdpr-privacy": "2.1.1",
"volto-google-analytics": "2.0.0",
"volto-multilingual-widget": "3.0.0",
"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
4 changes: 2 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-15'
releaseDate: '2024-03-19'
softwareType: standalone/web
softwareVersion: 11.7.0
softwareVersion: 11.8.0
url: 'https://github.com/italia/design-comuni-plone-theme'
usedBy:
- ASP Comuni Modenesi Area Nord
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
Loading

0 comments on commit 35ec3df

Please sign in to comment.