Skip to content

Commit

Permalink
Merge branch 'main' into bug_64048_card_con_immagine_senza_immagine
Browse files Browse the repository at this point in the history
  • Loading branch information
pnicolli authored Feb 6, 2025
2 parents 983a594 + fec61ee commit bb01e19
Show file tree
Hide file tree
Showing 37 changed files with 337 additions and 263 deletions.
13 changes: 12 additions & 1 deletion RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,20 @@

## Versione X.X.X (dd/mm/yyyy)

### Migliorie

- Nei blocchi elenco, gli stili dei testi nelle card che richiamano un CT persona sono conformi alle card che rappresentano gli altri CT.
- Impostando degli heading all'interno delle sezioni di testo nei vari CT, gli stili sono ora coerenti con l'ordine corretto dei titoli utilizzati.
- La sezione contatti del CT Evento è stata riorganizzata per una maggiore chiarezza e coerenza.

### Fix

- Sistemata la visualizzazione delle card con immagine in cui il contenuto rappresentato non ha un'immagine da mostrare
- I bottoni del menu nel pannello di controllo dei cookies visualizzano correttamente le icone.
- Gli argomenti nelle card con immagine sono allineati correttamente.
- Sistemata l'opzione "Mostra i PDF in anteprima" dell template "Allegati" del blocco elenco, perchè non aveva alcun effetto.
- Sistemata la visualizzazione del blocco griglia su mobile: disposti verticalmente ogni blocco della griglia
- Sistemata la visualizzazione delle card con immagine in cui il contenuto rappresentato non ha un'immagine da mostrare.
- a11y - Migliorata l'accessibilità in modifica dei blocchi Contatti, Icone, Numeri.

## Versione 11.26.3 (15/01/2025)

Expand Down
9 changes: 2 additions & 7 deletions locales/de/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -2935,16 +2935,11 @@ msgstr ""
msgid "order_by"
msgstr ""

#: components/ItaliaTheme/View/EventoView/EventoContattiOrganizzatoreInterno
#: components/ItaliaTheme/View/EventoView/EventoOrganizzatoDa
# defaultMessage: Organizzato da
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
Expand Down Expand Up @@ -2992,7 +2987,7 @@ msgstr ""
msgid "parteciperanno"
msgstr ""

#: components/ItaliaTheme/View/EventoView/EventoUlterioriInformazioni
#: components/ItaliaTheme/View/EventoView/EventoPatrocinatoDa
# defaultMessage: Patrocinato da
msgid "patrocinato_da"
msgstr ""
Expand Down
11 changes: 3 additions & 8 deletions locales/en/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -2920,16 +2920,11 @@ msgstr "Opening time"
msgid "order_by"
msgstr "Order by"

#: components/ItaliaTheme/View/EventoView/EventoContattiOrganizzatoreInterno
#: components/ItaliaTheme/View/EventoView/EventoOrganizzatoDa
# defaultMessage: Organizzato da
msgid "organizzato_da"
msgstr "Organized by"

#: components/ItaliaTheme/View/EventoView/EventoContattiOrganizzatoreEsterno
# defaultMessage: Organizzatore
msgid "organizzatore"
msgstr "Organizer"

#: components/ItaliaTheme/View/Commons/TrasparenzaFields
#: components/ItaliaTheme/View/TrasparenzaView/DettagliProcedimentiView
# defaultMessage: Organo competente adozione provvedimento finale
Expand Down Expand Up @@ -2977,7 +2972,7 @@ msgstr "Page selector"
msgid "parteciperanno"
msgstr "Will participate"

#: components/ItaliaTheme/View/EventoView/EventoUlterioriInformazioni
#: components/ItaliaTheme/View/EventoView/EventoPatrocinatoDa
# defaultMessage: Patrocinato da
msgid "patrocinato_da"
msgstr "Sponsored by"
Expand Down Expand Up @@ -3817,7 +3812,7 @@ msgstr ""
#: config/Blocks/ListingOptions/attachmentCardTemplate
# defaultMessage: Permette di aprire l'anteprima di tutti i PDF di questo elenco in una tab separata altrimenti vengono scaricati.
msgid "show_pdf_desc"
msgstr "Allows you to open the preview of all the PDFs in this list in a separate tab otherwise they will be downloaded."
msgstr "Allows preview of all PDF files in this list to be opened in a separate tab. If not set, PDF files are downloaded instead."

#: config/Blocks/ListingOptions/attachmentCardTemplate
# defaultMessage: Mostra i PDF in anteprima
Expand Down
9 changes: 2 additions & 7 deletions locales/es/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -2929,16 +2929,11 @@ msgstr "Hora de apertura"
msgid "order_by"
msgstr "Ordenado por"

#: components/ItaliaTheme/View/EventoView/EventoContattiOrganizzatoreInterno
#: components/ItaliaTheme/View/EventoView/EventoOrganizzatoDa
# defaultMessage: Organizzato da
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
Expand Down Expand Up @@ -2986,7 +2981,7 @@ msgstr ""
msgid "parteciperanno"
msgstr "Participara"

#: components/ItaliaTheme/View/EventoView/EventoUlterioriInformazioni
#: components/ItaliaTheme/View/EventoView/EventoPatrocinatoDa
# defaultMessage: Patrocinato da
msgid "patrocinato_da"
msgstr "Patrocinado por"
Expand Down
9 changes: 2 additions & 7 deletions locales/fr/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -2937,16 +2937,11 @@ msgstr "Horaire d'ouverture"
msgid "order_by"
msgstr "Trier par"

#: components/ItaliaTheme/View/EventoView/EventoContattiOrganizzatoreInterno
#: components/ItaliaTheme/View/EventoView/EventoOrganizzatoDa
# defaultMessage: Organizzato da
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
Expand Down Expand Up @@ -2994,7 +2989,7 @@ msgstr ""
msgid "parteciperanno"
msgstr "Participants"

#: components/ItaliaTheme/View/EventoView/EventoUlterioriInformazioni
#: components/ItaliaTheme/View/EventoView/EventoPatrocinatoDa
# defaultMessage: Patrocinato da
msgid "patrocinato_da"
msgstr "Sponsorisé par"
Expand Down
9 changes: 2 additions & 7 deletions locales/it/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -2920,16 +2920,11 @@ msgstr "Orario per il pubblico"
msgid "order_by"
msgstr "Ordina per"

#: components/ItaliaTheme/View/EventoView/EventoContattiOrganizzatoreInterno
#: components/ItaliaTheme/View/EventoView/EventoOrganizzatoDa
# defaultMessage: Organizzato da
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
Expand Down Expand Up @@ -2977,7 +2972,7 @@ msgstr "Selettore di pagina"
msgid "parteciperanno"
msgstr "Parteciperanno"

#: components/ItaliaTheme/View/EventoView/EventoUlterioriInformazioni
#: components/ItaliaTheme/View/EventoView/EventoPatrocinatoDa
# defaultMessage: Patrocinato da
msgid "patrocinato_da"
msgstr "Patrocinato da"
Expand Down
11 changes: 3 additions & 8 deletions 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: 2025-01-22T15:35:43.837Z\n"
"POT-Creation-Date: 2025-01-27T16:32:40.367Z\n"
"Last-Translator: Plone i18n <[email protected]>\n"
"Language-Team: Plone i18n <[email protected]>\n"
"MIME-Version: 1.0\n"
Expand Down Expand Up @@ -2922,16 +2922,11 @@ msgstr ""
msgid "order_by"
msgstr ""

#: components/ItaliaTheme/View/EventoView/EventoContattiOrganizzatoreInterno
#: components/ItaliaTheme/View/EventoView/EventoOrganizzatoDa
# defaultMessage: Organizzato da
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
Expand Down Expand Up @@ -2979,7 +2974,7 @@ msgstr ""
msgid "parteciperanno"
msgstr ""

#: components/ItaliaTheme/View/EventoView/EventoUlterioriInformazioni
#: components/ItaliaTheme/View/EventoView/EventoPatrocinatoDa
# defaultMessage: Patrocinato da
msgid "patrocinato_da"
msgstr ""
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@
"volto-subblocks": "2.1.0",
"volto-subfooter": "3.1.1",
"volto-subsites": "4.0.2",
"volto-venue": "4.1.0",
"volto-venue": "4.1.1",
"webpack-image-resize-loader": "^5.0.0"
},
"devDependencies": {
Expand Down
32 changes: 17 additions & 15 deletions src/components/ItaliaTheme/Blocks/ContactsBlock/Block/EditBlock.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,24 +52,13 @@ class EditBlock extends SubblockEdit {
// eslint-disable-next-line no-unused-expressions
this.contact_item_ref?.current?.addEventListener('keydown', (e) => {
if (e.keyCode === 13) {
if (!(this.state.focusOn === 'text')) {
this.setState({ focusOn: 'text' });
if (!(this.state.focusOn === 'title')) {
this.setState({ focusOn: 'title' });
}
}
});
}

UNSAFE_componentWillReceiveProps(nextProps) {
if (!this.props.selected && nextProps.focusOn) {
this.props.onSelectBlock(this.props.block);
}

if (nextProps.selected && !this.state.focusOn) {
this.setState({ focusOn: 'title' });
} else if (!nextProps.selected) {
this.setState({ focusOn: null });
}
}
/**
* Render method.
* @method render
Expand All @@ -95,6 +84,7 @@ class EditBlock extends SubblockEdit {
{/* eslint-disable */}
<TextEditorWidget
{...this.props}
index={this.props.blockIndex}
key="title"
showToolbar={false}
data={this.props.data}
Expand Down Expand Up @@ -125,6 +115,7 @@ class EditBlock extends SubblockEdit {
<div className="contact-text">
<TextEditorWidget
{...this.props}
index={this.props.blockIndex}
key="text"
data={this.props.data}
fieldName="text"
Expand All @@ -135,7 +126,9 @@ class EditBlock extends SubblockEdit {
this.props.onChangeBlock(this.props.index, _data);
}}
selected={this.props.selected && this.state.focusOn === 'text'}
setSelected={(f) => this.setState({ focusOn: f })}
setSelected={(f) => {
this.setState({ focusOn: f });
}}
focusPrevField={() => {
this.setState({ focusOn: 'title' });
}}
Expand All @@ -151,6 +144,7 @@ class EditBlock extends SubblockEdit {
</div>
<TextEditorWidget
{...this.props}
index={this.props.blockIndex}
key="tel"
data={this.props.data}
fieldName="tel"
Expand All @@ -177,6 +171,7 @@ class EditBlock extends SubblockEdit {
</div>
<TextEditorWidget
{...this.props}
index={this.props.blockIndex}
key="email"
wrapClass="email"
data={this.props.data}
Expand All @@ -188,7 +183,14 @@ class EditBlock extends SubblockEdit {
placeholder={this.props.intl.formatMessage(
messages.textPlaceholder,
)}
setSelected={(f) => this.setState({ focusOn: f })}
setSelected={(f) => {
if (!this.props.selected) {
//a11y - per il focus del blocco da tastiera con navigazione inversa
this.props.onSubblockChangeFocus(this.props.index);
this.props.onSelectBlock(this.props.block);
}
this.setState({ focusOn: f });
}}
focusPrevField={() => {
this.setState({ focusOn: 'tel' });
}}
Expand Down
18 changes: 12 additions & 6 deletions src/components/ItaliaTheme/Blocks/ContactsBlock/Edit.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,10 @@ class Edit extends SubblocksEdit {
UNSAFE_componentWillReceiveProps(newProps) {
if (newProps.selected) {
if (!this.props.selected) {
this.setState({ selectedField: 'title' });
if (!this.state.selectedField && this.state.subIndexSelected < 0) {
//a11y - test subIndexSelected<0 per gestire il focus con navigazione da tastiera al contrario (dal blocco successivo a questo blocco)
this.setState({ selectedField: 'title' });
}
}
} else {
this.setState({ selectedField: null });
Expand Down Expand Up @@ -122,6 +125,8 @@ class Edit extends SubblocksEdit {
className={`full-width section bg-${
this.props.data.bg_color ?? 'primary'
} py-5`}
role="form"
aria-label={this.props.blocksConfig[this.props.type].title}
>
<Container className="px-md-4">
<div className="block-header">
Expand All @@ -134,9 +139,12 @@ class Edit extends SubblocksEdit {
fieldName="title"
selected={this.state.selectedField === 'title'}
placeholder={this.props.intl.formatMessage(messages.title)}
onSelectBlock={() => {}}
setSelected={(f) => {
this.setState({ selectedField: f, subIndexSelected: -1 });
if (!this.props.selected) {
//a11y - per il focus del blocco da tastiera
this.props.onSelectBlock(this.props.block);
}
}}
focusNextField={() => {
this.setState({ selectedField: 'description' });
Expand All @@ -154,7 +162,6 @@ class Edit extends SubblocksEdit {
placeholder={this.props.intl.formatMessage(
messages.description,
)}
onSelectBlock={() => {}}
setSelected={(f) => {
this.setState({ selectedField: f, subIndexSelected: -1 });
}}
Expand Down Expand Up @@ -182,12 +189,11 @@ class Edit extends SubblocksEdit {
{...this.props}
data={subblock}
index={subindex}
blockIndex={this.props.index}
selected={this.isSubblockSelected(subindex)}
{...this.subblockProps}
openObjectBrowser={this.props.openObjectBrowser}
onSubblockChangeFocus={this.onSubblockChangeFocus}
onChangeFocus={this.onSubblockChangeFocus}
isLast={this.state.subblocks.length - 1 === subindex}
isLast={subindex === this.state.subblocks.length - 1}
isFirst={subindex === 0}
onFocusPreviousBlock={() => {
this.setState({
Expand Down
19 changes: 12 additions & 7 deletions src/components/ItaliaTheme/Blocks/IconBlocks/Block/EditBlock.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,13 @@ class EditBlock extends SubblockEdit {

componentDidMount() {
// eslint-disable-next-line no-unused-expressions
this.subblock_ref?.current?.addEventListener('keydown', (e) => {
if (e.keyCode === 13) {
if (!(this.state.focusOn === 'text')) {
this.setState({ focusOn: 'text' });
}
}
});
// this.subblock_ref?.current?.addEventListener('keydown', (e) => {
// if (e.keyCode === 13) {
// if (!(this.state.focusOn === 'text')) {
// this.setState({ focusOn: 'text' });
// }
// }
// });
}
/**
* Render method.
Expand Down Expand Up @@ -149,6 +149,11 @@ class EditBlock extends SubblockEdit {
fieldName="text"
selected={this.props.selected && this.state.focusOn === 'text'}
setSelected={(f) => {
if (!this.props.selected) {
//a11y - per il focus del blocco da tastiera con navigazione inversa
this.props.onSubblockChangeFocus(this.props.index);
this.props.onSelectBlock(this.props.block);
}
this.setState({ focusOn: f });
}}
onChangeBlock={(block, _data) => {
Expand Down
Loading

0 comments on commit bb01e19

Please sign in to comment.