Skip to content

Commit

Permalink
Merge branch 'develop' into bug_46353_alert_testo_a_sx
Browse files Browse the repository at this point in the history
  • Loading branch information
sabrina-bongiovanni committed Sep 20, 2023
2 parents fded095 + eed8929 commit b5f2bca
Show file tree
Hide file tree
Showing 33 changed files with 328 additions and 182 deletions.
11 changes: 10 additions & 1 deletion RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,17 @@
- ...
-->

## Versione X.X.X
## Versione 8.7.0 (20/09/2023)

### Migliorie

- Nel template Blocco link solo immagini con link esterni, icona accessibilità per link esterni ora è disattivabile attraverso opzione del template
- Migliorata l'accessibilità e il supporto Screen Reader per il menu a tendina "Ordina Per" nella pagina di ricerca
- Migliorata la navigazione da tastiera quando si è in modifica dei blocchi Alert, Card Semplice, Card con Immagine, Accordion

### Fix

- sistemati gli oggetti link che puntano a file nella Cartella Modulistica
- Sistemato l'allineamento degli elementi nel blocco Contatti: se ci sono meno di tre elementi l'allineamento è centrato, se ce ne sono più di 3 l'allineamento è a sinistra.
- Migliorata accessibilità del calendario nel blocco ricerca Eventi e ricerca Bandi
- Fissato il layout del template Blocco link solo immagini con link esterni, posizionata l'icona di accessibilità per link esterni in overlay se presente
8 changes: 7 additions & 1 deletion locales/de/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -647,11 +647,12 @@ msgstr ""
msgid "Type description…"
msgstr ""

#: components/ItaliaTheme/Blocks/Alert/Edit
#: components/ItaliaTheme/Blocks/ArgumentsInEvidence/Block
#: components/ItaliaTheme/Blocks/TextCard/CardWithImage/Block
#: components/ItaliaTheme/Blocks/TextCard/SimpleCard/Block
#: components/ItaliaTheme/manage/Widgets/TextEditorWidget
# defaultMessage: Digita un testo…
# defaultMessage: Digita il testo…
msgid "Type text…"
msgstr ""

Expand Down Expand Up @@ -2633,6 +2634,11 @@ msgstr ""
msgid "other_info"
msgstr ""

#: config/Blocks/ListingOptions/smallBlockLinksTemplate
# defaultMessage: Non mostrare l'icona di accessibilità per i link a siti esterni
msgid "override_links_accessibility_marker"
msgstr "Barrierefreiheitssymbol nicht für Links anzeigen, die auf externe Websites oder Ressourcen verweisen"

#: components/ItaliaTheme/View/Commons/TrasparenzaFields
# defaultMessage: Pagamenti previsti e modalità
msgid "pagamenti"
Expand Down
8 changes: 7 additions & 1 deletion locales/en/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -632,11 +632,12 @@ msgstr ""
msgid "Type description…"
msgstr ""

#: components/ItaliaTheme/Blocks/Alert/Edit
#: components/ItaliaTheme/Blocks/ArgumentsInEvidence/Block
#: components/ItaliaTheme/Blocks/TextCard/CardWithImage/Block
#: components/ItaliaTheme/Blocks/TextCard/SimpleCard/Block
#: components/ItaliaTheme/manage/Widgets/TextEditorWidget
# defaultMessage: Digita un testo…
# defaultMessage: Digita il testo…
msgid "Type text…"
msgstr ""

Expand Down Expand Up @@ -2618,6 +2619,11 @@ msgstr "Ohter topics"
msgid "other_info"
msgstr "Further information"

#: config/Blocks/ListingOptions/smallBlockLinksTemplate
# defaultMessage: Non mostrare l'icona di accessibilità per i link a siti esterni
msgid "override_links_accessibility_marker"
msgstr "Do not show accessibility icon for links pointing to external websites or resources"

#: components/ItaliaTheme/View/Commons/TrasparenzaFields
# defaultMessage: Pagamenti previsti e modalità
msgid "pagamenti"
Expand Down
8 changes: 7 additions & 1 deletion locales/es/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -641,11 +641,12 @@ msgstr "Transparencia"
msgid "Type description…"
msgstr "Escribe la descripción..."

#: components/ItaliaTheme/Blocks/Alert/Edit
#: components/ItaliaTheme/Blocks/ArgumentsInEvidence/Block
#: components/ItaliaTheme/Blocks/TextCard/CardWithImage/Block
#: components/ItaliaTheme/Blocks/TextCard/SimpleCard/Block
#: components/ItaliaTheme/manage/Widgets/TextEditorWidget
# defaultMessage: Digita un testo…
# defaultMessage: Digita il testo…
msgid "Type text…"
msgstr "Ingrese texto..."

Expand Down Expand Up @@ -2627,6 +2628,11 @@ msgstr "Otros temas"
msgid "other_info"
msgstr "Más información"

#: config/Blocks/ListingOptions/smallBlockLinksTemplate
# defaultMessage: Non mostrare l'icona di accessibilità per i link a siti esterni
msgid "override_links_accessibility_marker"
msgstr "No mostrar el ícono de accesibilidad para enlaces que apuntan a sitios web o recursos externos"

#: components/ItaliaTheme/View/Commons/TrasparenzaFields
# defaultMessage: Pagamenti previsti e modalità
msgid "pagamenti"
Expand Down
8 changes: 7 additions & 1 deletion locales/fr/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -649,11 +649,12 @@ msgstr ""
msgid "Type description…"
msgstr ""

#: components/ItaliaTheme/Blocks/Alert/Edit
#: components/ItaliaTheme/Blocks/ArgumentsInEvidence/Block
#: components/ItaliaTheme/Blocks/TextCard/CardWithImage/Block
#: components/ItaliaTheme/Blocks/TextCard/SimpleCard/Block
#: components/ItaliaTheme/manage/Widgets/TextEditorWidget
# defaultMessage: Digita un testo…
# defaultMessage: Digita il testo…
msgid "Type text…"
msgstr ""

Expand Down Expand Up @@ -2635,6 +2636,11 @@ msgstr "Autres sujets"
msgid "other_info"
msgstr "Informations complémentaires"

#: config/Blocks/ListingOptions/smallBlockLinksTemplate
# defaultMessage: Non mostrare l'icona di accessibilità per i link a siti esterni
msgid "override_links_accessibility_marker"
msgstr "Ne pas afficher l'icône d'accessibilité pour les liens pointant vers des sites Web ou des ressources externes"

#: components/ItaliaTheme/View/Commons/TrasparenzaFields
# defaultMessage: Pagamenti previsti e modalità
msgid "pagamenti"
Expand Down
8 changes: 7 additions & 1 deletion locales/it/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -632,11 +632,12 @@ msgstr "Trasparenza"
msgid "Type description…"
msgstr "Digita la descrizione…"

#: components/ItaliaTheme/Blocks/Alert/Edit
#: components/ItaliaTheme/Blocks/ArgumentsInEvidence/Block
#: components/ItaliaTheme/Blocks/TextCard/CardWithImage/Block
#: components/ItaliaTheme/Blocks/TextCard/SimpleCard/Block
#: components/ItaliaTheme/manage/Widgets/TextEditorWidget
# defaultMessage: Digita un testo…
# defaultMessage: Digita il testo…
msgid "Type text…"
msgstr "Digita testo…"

Expand Down Expand Up @@ -2618,6 +2619,11 @@ msgstr "Altri argomenti"
msgid "other_info"
msgstr "Ulteriori informazioni"

#: config/Blocks/ListingOptions/smallBlockLinksTemplate
# defaultMessage: Non mostrare l'icona di accessibilità per i link a siti esterni
msgid "override_links_accessibility_marker"
msgstr ""

#: components/ItaliaTheme/View/Commons/TrasparenzaFields
# defaultMessage: Pagamenti previsti e modalità
msgid "pagamenti"
Expand Down
10 changes: 8 additions & 2 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: 2023-08-28T07:32:02.134Z\n"
"POT-Creation-Date: 2023-09-20T11:30:56.175Z\n"
"Last-Translator: Plone i18n <[email protected]>\n"
"Language-Team: Plone i18n <[email protected]>\n"
"MIME-Version: 1.0\n"
Expand Down Expand Up @@ -634,11 +634,12 @@ msgstr ""
msgid "Type description…"
msgstr ""

#: components/ItaliaTheme/Blocks/Alert/Edit
#: components/ItaliaTheme/Blocks/ArgumentsInEvidence/Block
#: components/ItaliaTheme/Blocks/TextCard/CardWithImage/Block
#: components/ItaliaTheme/Blocks/TextCard/SimpleCard/Block
#: components/ItaliaTheme/manage/Widgets/TextEditorWidget
# defaultMessage: Digita un testo…
# defaultMessage: Digita il testo…
msgid "Type text…"
msgstr ""

Expand Down Expand Up @@ -2620,6 +2621,11 @@ msgstr ""
msgid "other_info"
msgstr ""

#: config/Blocks/ListingOptions/smallBlockLinksTemplate
# defaultMessage: Non mostrare l'icona di accessibilità per i link a siti esterni
msgid "override_links_accessibility_marker"
msgstr ""

#: components/ItaliaTheme/View/Commons/TrasparenzaFields
# defaultMessage: Pagamenti previsti e modalità
msgid "pagamenti"
Expand Down
6 changes: 3 additions & 3 deletions publiccode.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This repository adheres to the publiccode.yml standard by including this
# This repository adheres to the publiccode.yml standard by including this
# metadata file that makes public software easily discoverable.
# More info at https://github.com/italia/publiccode.yml

Expand Down Expand Up @@ -227,9 +227,9 @@ maintenance:
name: io-Comune - Il sito AgID per Comuni ed Enti Pubblici
platforms:
- web
releaseDate: '2023-09-18'
releaseDate: '2023-09-20'
softwareType: standalone/web
softwareVersion: 8.5.1
softwareVersion: 8.7.0
url: 'https://github.com/italia/design-comuni-plone-theme'
usedBy:
- ASP Comuni Modenesi Area Nord
Expand Down
46 changes: 26 additions & 20 deletions src/components/ItaliaTheme/Blocks/Accordion/Block/EditBlock.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,6 @@ class EditBlock extends SubblockEdit {
this.accordion_item_ref = React.createRef();
}

componentDidMount() {
// eslint-disable-next-line no-unused-expressions
this.accordion_item_ref?.current?.addEventListener('keydown', (e) => {
if (e.keyCode === 13) {
if (!(this.state.focusOn === 'text')) {
this.setState({ focusOn: 'text' });
}
}
});
}
/**
* Render method.
* @method render
Expand Down Expand Up @@ -105,12 +95,20 @@ class EditBlock extends SubblockEdit {
placeholder={this.props.intl.formatMessage(
messages.titlePlaceholder,
)}
nextFocus="text"
prevFocus="text"
disableMoveToNearest={true}
setFocus={(f) => {
this.setState({ focusOn: f });
onSelectBlock={() => {}}
onAddBlock={() => {
this.setState({ focusOn: 'text' });
}}
onFocusNextBlock={() => {
this.setState({ focusOn: 'text' });
}}
onFocusPreviousBlock={
this.props.isFirst
? this.props.onFocusPreviousBlock
: () => {
this.props.onSubblockChangeFocus(this.props.index - 1);
}
}
showToolbar={false}
key="title"
/>
Expand All @@ -135,11 +133,19 @@ class EditBlock extends SubblockEdit {
placeholder={this.props.intl.formatMessage(
messages.textPlaceholder,
)}
disableMoveToNearest={true}
prevFocus="title"
nextFocus="title"
setFocus={(f) => {
this.setState({ focusOn: f });
onAddBlock={this.props.onFocusNextBlock}
onFocusNextBlock={
this.props.isLast
? this.props.onFocusNextBlock
: () => {
this.setState({ focusOn: null });
this.props.onSubblockChangeFocus(
this.props.index + 1,
);
}
}
onFocusPreviousBlock={() => {
this.setState({ focusOn: 'title' });
}}
key="text"
/>
Expand Down
10 changes: 9 additions & 1 deletion src/components/ItaliaTheme/Blocks/Accordion/Edit.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,17 @@ class Edit extends SubblocksEdit {
<EditBlock
data={subblock}
index={subindex}
selected={this.isSubblockSelected(subindex)}
selected={
this.props.selected &&
this.isSubblockSelected(subindex)
}
{...this.subblockProps}
openObjectBrowser={this.props.openObjectBrowser}
onFocusPreviousBlock={this.props.onFocusPreviousBlock}
onFocusNextBlock={this.props.onFocusNextBlock}
onSubblockChangeFocus={this.onSubblockChangeFocus}
isLast={this.state.subblocks.length - 1 === subindex}
isFirst={subindex === 0}
/>
</div>
))}
Expand Down
37 changes: 25 additions & 12 deletions src/components/ItaliaTheme/Blocks/Alert/Edit.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,25 @@ import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { compose } from 'redux';
import { injectIntl } from 'react-intl';

import cx from 'classnames';
import { Container, Row, Col } from 'design-react-kit';

import { createContent } from '@plone/volto/actions';
import { SidebarPortal } from '@plone/volto/components';
import { EditTextBlock } from '@plone/volto/components';
import { defineMessages, injectIntl } from 'react-intl';

import {
AlertSidebar,
TextEditorWidget,
} from 'design-comuni-plone-theme/components/ItaliaTheme';

import { AlertSidebar } from 'design-comuni-plone-theme/components/ItaliaTheme';
const messages = defineMessages({
content_placeholder: {
id: 'Type text…',
defaultMessage: 'Digita il testo…',
},
});
/**
* Edit Alert block class.
* @class Edit
Expand Down Expand Up @@ -84,20 +94,23 @@ class Edit extends Component {
</Col>
)}
<Col>
<EditTextBlock
<TextEditorWidget
data={this.props.data}
detached={true}
index={this.props.index}
fieldName="text"
selected={this.props.selected}
block={this.props.block}
onChangeBlock={(data) =>
this.props.onChangeBlock(this.props.block, data)
}
placeholder={this.props.intl.formatMessage(
messages.content_placeholder,
)}
showToolbar={true}
onSelectBlock={this.props.onSelectBlock}
onAddBlock={this.props.onAddBlock}
onChangeBlock={this.props.onChangeBlock}
onDeleteBlock={this.props.onDeleteBlock}
onMutateBlock={this.props.onMutateBlock}
onFocusPreviousBlock={this.props.onFocusPreviousBlock}
index={this.props.index}
onFocusNextBlock={this.props.onFocusNextBlock}
onSelectBlock={this.props.onSelectBlock}
blockNode={this.blockNode}
onFocusPreviousBlock={this.props.onFocusPreviousBlock}
/>
</Col>
</Row>
Expand Down
Loading

0 comments on commit b5f2bca

Please sign in to comment.