From 33635ecc80256051a597eacce87f047942781585 Mon Sep 17 00:00:00 2001
From: sabrina-bongiovanni
<116291154+sabrina-bongiovanni@users.noreply.github.com>
Date: Fri, 13 Oct 2023 12:37:14 +0200
Subject: [PATCH 1/7] fix: icona link esterni in linea con il testo (#355)
* fix: aligned external link icon with text
* fix: changed alignment of external link icon in cta button
---
.../Blocks/Listing/CompleteBlockLinksTemplate.jsx | 2 +-
.../components/manage/UniversalLink/UniversalLink.jsx | 2 +-
src/theme/ItaliaTheme/Blocks/_ctaBlock.scss | 11 +++++++++++
src/theme/ItaliaTheme/_common.scss | 3 +++
4 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/src/components/ItaliaTheme/Blocks/Listing/CompleteBlockLinksTemplate.jsx b/src/components/ItaliaTheme/Blocks/Listing/CompleteBlockLinksTemplate.jsx
index ee893de2a..d304bae96 100644
--- a/src/components/ItaliaTheme/Blocks/Listing/CompleteBlockLinksTemplate.jsx
+++ b/src/components/ItaliaTheme/Blocks/Listing/CompleteBlockLinksTemplate.jsx
@@ -83,7 +83,7 @@ const CompleteBlockLinksTemplate = ({
icon="it-external-link"
title={title}
size="xs"
- className="align-top ms-1 external-link"
+ className="ms-1 align-sub external-link"
/>
)}
diff --git a/src/customizations/volto/components/manage/UniversalLink/UniversalLink.jsx b/src/customizations/volto/components/manage/UniversalLink/UniversalLink.jsx
index baea0b2ec..1d48aa773 100644
--- a/src/customizations/volto/components/manage/UniversalLink/UniversalLink.jsx
+++ b/src/customizations/volto/components/manage/UniversalLink/UniversalLink.jsx
@@ -123,7 +123,7 @@ const UniversalLink = ({
icon="it-external-link"
title={title}
size="xs"
- className="align-top ms-1 external-link"
+ className="ms-1 align-sub external-link"
/>
)}
diff --git a/src/theme/ItaliaTheme/Blocks/_ctaBlock.scss b/src/theme/ItaliaTheme/Blocks/_ctaBlock.scss
index 816df337c..7902dd71d 100644
--- a/src/theme/ItaliaTheme/Blocks/_ctaBlock.scss
+++ b/src/theme/ItaliaTheme/Blocks/_ctaBlock.scss
@@ -36,6 +36,7 @@
color: $secondary-text;
font-size: 0.9rem;
text-transform: uppercase;
+ position: relative;
&:hover,
&:focus {
@@ -47,6 +48,9 @@
}
.external-link {
fill: $external-link-fill-buttons !important;
+ position: absolute;
+ top: 3px;
+ right: 3px;
}
}
@@ -121,6 +125,13 @@
padding: 18px 60px;
font-weight: bold;
font-size: 1rem;
+ position: relative;
+
+ .external-link {
+ position: absolute;
+ top: 3px;
+ right: 3px;
+ }
&:hover,
&:focus {
diff --git a/src/theme/ItaliaTheme/_common.scss b/src/theme/ItaliaTheme/_common.scss
index d5c812ef4..5be0e208d 100644
--- a/src/theme/ItaliaTheme/_common.scss
+++ b/src/theme/ItaliaTheme/_common.scss
@@ -72,6 +72,9 @@
.external-link {
fill: $link-color !important;
+ &.align-sub {
+ vertical-align: sub;
+ }
&:hover {
fill: #004080 !important;
From 3d7bb923b056620ec499c2f235bd2c64aaf13279 Mon Sep 17 00:00:00 2001
From: Martina Bustacchini <41484878+deodorhunter@users.noreply.github.com>
Date: Fri, 13 Oct 2023 12:39:09 +0200
Subject: [PATCH 2/7] fix: do not show subsite footer banner when field is
empty (#356)
---
RELEASE.md | 1 +
src/components/ItaliaTheme/Footer/SubsiteFooter.jsx | 4 ++--
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/RELEASE.md b/RELEASE.md
index 4ec34801f..e116ff474 100644
--- a/RELEASE.md
+++ b/RELEASE.md
@@ -45,6 +45,7 @@
### Fix
- Uniformato e impostato a sinistra l'allineamento del testo nel blocco Elenco nella variazione Quadratoni con immagine
+- Non mostrare la fascia colorata del footer di un sottosito quando questo non è compilato
## Versione 8.7.3 (26/09/2023)
diff --git a/src/components/ItaliaTheme/Footer/SubsiteFooter.jsx b/src/components/ItaliaTheme/Footer/SubsiteFooter.jsx
index 90fd05b9f..6b289eeea 100644
--- a/src/components/ItaliaTheme/Footer/SubsiteFooter.jsx
+++ b/src/components/ItaliaTheme/Footer/SubsiteFooter.jsx
@@ -7,13 +7,13 @@ import React from 'react';
import { useSelector } from 'react-redux';
import { useLocation } from 'react-router-dom';
import { flattenHTMLToAppURL, isCmsUi } from '@plone/volto/helpers';
+import { richTextHasContent } from 'design-comuni-plone-theme/components/ItaliaTheme/View';
const SubsiteFooter = () => {
const location = useLocation();
const isCmsUI = isCmsUi(location.pathname);
const subsite = useSelector((state) => state.subsite?.data);
-
- return subsite?.subsite_footer?.data ? (
+ return richTextHasContent(subsite?.subsite_footer) ? (
From e4d1db1519746819aedab28a210ffe6f7fda332f Mon Sep 17 00:00:00 2001
From: Piero Nicolli
Date: Fri, 13 Oct 2023 14:34:16 +0200
Subject: [PATCH 3/7] chore: update git merge strategy for RELEASE.md
---
.gitattributes | 1 +
1 file changed, 1 insertion(+)
create mode 100644 .gitattributes
diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 000000000..aebb5c663
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1 @@
+RELEASE.md merge=union
From de2a9c1ac3820eac65279cce3041d370add12fee Mon Sep 17 00:00:00 2001
From: Wagner Trezub <60133113+Wagner3UB@users.noreply.github.com>
Date: Fri, 13 Oct 2023 14:49:12 +0200
Subject: [PATCH 4/7] fix: removed unnecessary h3 in footer (#360)
---
src/components/ItaliaTheme/Footer/FooterSmall.jsx | 3 ---
1 file changed, 3 deletions(-)
diff --git a/src/components/ItaliaTheme/Footer/FooterSmall.jsx b/src/components/ItaliaTheme/Footer/FooterSmall.jsx
index 9e7f00d57..998509fdf 100644
--- a/src/components/ItaliaTheme/Footer/FooterSmall.jsx
+++ b/src/components/ItaliaTheme/Footer/FooterSmall.jsx
@@ -50,9 +50,6 @@ const FooterSmall = () => {
return subFooterItems?.length > 0 || links.length > 0 || true ? (
-
- {intl.formatMessage(messages.goToPage)}
-
{subFooterItems?.length > 0 &&
subFooterItems.map((item, index) => {
From 4fea6cdab31d46e4d3c3386024a17067a8e8b94d Mon Sep 17 00:00:00 2001
From: sabrina-bongiovanni
<116291154+sabrina-bongiovanni@users.noreply.github.com>
Date: Fri, 13 Oct 2023 14:55:32 +0200
Subject: [PATCH 5/7] fix: outline color of search icon in header for subsites
(#358)
* fix: changed outline color of search icon in header for subsites
* chore: updated release.md
---------
Co-authored-by: Piero Nicolli
---
RELEASE.md | 10 +++++++++-
.../bootstrap-italia/custom/_headercenter.scss | 4 ++++
2 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/RELEASE.md b/RELEASE.md
index e116ff474..3f727807f 100644
--- a/RELEASE.md
+++ b/RELEASE.md
@@ -30,6 +30,13 @@
- ...
-->
+## Versione X.X.X (dd/mm/yyyy)
+
+### Fix
+
+- Cambiato il colore del bordo dell'icona Ricerca nell'header dei sottositi per garantire il contrasto per accessibilità
+- Non mostrare la fascia colorata del footer di un sottosito quando questo non è compilato
+
## Versione 8.7.8 (12/10/2023)
### Fix
@@ -42,10 +49,11 @@
- Aggiornata nuova icona di Twitter
+## Versione 8.7.6 (06/10/2023)
+
### Fix
- Uniformato e impostato a sinistra l'allineamento del testo nel blocco Elenco nella variazione Quadratoni con immagine
-- Non mostrare la fascia colorata del footer di un sottosito quando questo non è compilato
## Versione 8.7.3 (26/09/2023)
diff --git a/src/theme/ItaliaTheme/Subsites/bootstrap-italia/custom/_headercenter.scss b/src/theme/ItaliaTheme/Subsites/bootstrap-italia/custom/_headercenter.scss
index d03251a88..ee20c8560 100644
--- a/src/theme/ItaliaTheme/Subsites/bootstrap-italia/custom/_headercenter.scss
+++ b/src/theme/ItaliaTheme/Subsites/bootstrap-italia/custom/_headercenter.scss
@@ -42,6 +42,10 @@
.it-search-wrapper {
a {
+ &.search-link {
+ outline: $subsite-primary 2px solid !important;
+ }
+
&.rounded-icon {
svg {
@if $subsite-light-theme {
From f6e9c3565518914731b55543a0c2bc622b53f0d9 Mon Sep 17 00:00:00 2001
From: Martina Bustacchini <41484878+deodorhunter@users.noreply.github.com>
Date: Fri, 13 Oct 2023 14:58:18 +0200
Subject: [PATCH 6/7] fix: object browser limit is now respected, add logic for
deselection and conditional closing of ob in some cases (#363)
* fix: object browser limit is now respected, add logic for deselection and conditional closing of ob in some cases
* docs: added Release docs and infos
* fix: remove stray console.log
---------
Co-authored-by: Piero Nicolli
---
RELEASE.md | 16 ++++++++
.../manage/Sidebar/ObjectBrowserBody.jsx | 37 ++++++++++++++-----
.../manage/Widgets/ObjectBrowserWidget.jsx | 11 +++++-
3 files changed, 52 insertions(+), 12 deletions(-)
diff --git a/RELEASE.md b/RELEASE.md
index 3f727807f..9b62ee032 100644
--- a/RELEASE.md
+++ b/RELEASE.md
@@ -6,12 +6,19 @@
@@ -20,22 +27,31 @@
----------------------------------------------------------------------
## Versione X.X.X (dd/mm/yyyy)
+
### Migliorie
+
- ...
### Novità
+
- ... [`Istruzioni`](url della documentazione relativa alla novità)
### Fix
+
- ...
-->
## Versione X.X.X (dd/mm/yyyy)
+### Migliorie
+
+- Migliorato il comportamento alla selezione/deselezione degli elementi multipli nel componente Object Browser
+
### Fix
- Cambiato il colore del bordo dell'icona Ricerca nell'header dei sottositi per garantire il contrasto per accessibilità
- Non mostrare la fascia colorata del footer di un sottosito quando questo non è compilato
+- Risolto un bug nel componente Object Browser che permetteva di selezionare più elementi di quelli consentiti
## Versione 8.7.8 (12/10/2023)
diff --git a/src/customizations/volto/components/manage/Sidebar/ObjectBrowserBody.jsx b/src/customizations/volto/components/manage/Sidebar/ObjectBrowserBody.jsx
index 0efa97811..2730b2cd7 100644
--- a/src/customizations/volto/components/manage/Sidebar/ObjectBrowserBody.jsx
+++ b/src/customizations/volto/components/manage/Sidebar/ObjectBrowserBody.jsx
@@ -247,7 +247,6 @@ class ObjectBrowserBody extends Component {
onSelectItem = (item) => {
const url = item['@id'];
const { block, data, mode, dataName, onChangeBlock } = this.props;
-
const updateState = (mode) => {
switch (mode) {
case 'image':
@@ -312,8 +311,18 @@ class ObjectBrowserBody extends Component {
};
isSelectable = (item) => {
- return this.props.selectableTypes.length > 0
- ? this.props.selectableTypes.indexOf(item['@type']) >= 0
+ const { maximumSelectionSize, data, mode, selectableTypes } = this.props;
+ if (
+ maximumSelectionSize &&
+ data &&
+ mode === 'multiple' &&
+ maximumSelectionSize <= data.length
+ )
+ return data.some(
+ (d) => flattenToAppURL(d['@id']) === flattenToAppURL(item['@id']),
+ );
+ return selectableTypes.length > 0
+ ? selectableTypes.indexOf(item['@type']) >= 0
: true;
};
@@ -331,16 +340,24 @@ class ObjectBrowserBody extends Component {
!this.props.maximumSelectionSize ||
this.props.mode === 'multiple' ||
!this.props.data ||
- this.props.data.length < this.props.maximumSelectionSize
+ this.props.data.length <= this.props.maximumSelectionSize
) {
+ let isDeselecting;
+ if (this.props.mode === 'multiple' && Array.isArray(this.props.data))
+ isDeselecting = this.props.data.some(
+ (d) => flattenToAppURL(d['@id']) === flattenToAppURL(item['@id']),
+ );
this.onSelectItem(item);
let length = this.props.data ? this.props.data.length : 0;
-
- let stopSelecting =
- this.props.mode !== 'multiple' ||
- (this.props.maximumSelectionSize > 0 &&
- length + 1 >= this.props.maximumSelectionSize);
-
+ let stopSelecting = this.props.mode !== 'multiple';
+ if (isDeselecting && !stopSelecting)
+ stopSelecting =
+ this.props.maximumSelectionSize > 0 &&
+ length - 1 >= this.props.maximumSelectionSize;
+ else
+ stopSelecting =
+ this.props.maximumSelectionSize > 0 &&
+ length + 1 >= this.props.maximumSelectionSize;
if (stopSelecting) {
this.props.closeObjectBrowser();
}
diff --git a/src/customizations/volto/components/manage/Widgets/ObjectBrowserWidget.jsx b/src/customizations/volto/components/manage/Widgets/ObjectBrowserWidget.jsx
index f66382de7..65dfc725f 100644
--- a/src/customizations/volto/components/manage/Widgets/ObjectBrowserWidget.jsx
+++ b/src/customizations/volto/components/manage/Widgets/ObjectBrowserWidget.jsx
@@ -321,8 +321,15 @@ export class ObjectBrowserWidgetComponent extends Component {
* @returns {string} Markup for the component.
*/
render() {
- const { id, description, fieldSet, value, mode, onChange, isDisabled } =
- this.props;
+ const {
+ id,
+ description,
+ fieldSet,
+ value,
+ mode,
+ onChange,
+ isDisabled,
+ } = this.props;
let items = compact(!isArray(value) && value ? [value] : value || []);
From fcd942cbfdaaef6dd2255f478a18c58a2f52c8cd Mon Sep 17 00:00:00 2001
From: Martina Bustacchini <41484878+deodorhunter@users.noreply.github.com>
Date: Fri, 13 Oct 2023 15:26:57 +0200
Subject: [PATCH 7/7] fix: restore missing IconWidget and FontawesomeIcons
(#365)
Co-authored-by: Piero Nicolli
---
RELEASE.md | 1 +
src/helpers/IconWidget/IconAliasHelper.js | 2 +-
src/helpers/IconWidget/IconWidgetHelper.js | 2 +-
3 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/RELEASE.md b/RELEASE.md
index 9b62ee032..56194c165 100644
--- a/RELEASE.md
+++ b/RELEASE.md
@@ -52,6 +52,7 @@
- Cambiato il colore del bordo dell'icona Ricerca nell'header dei sottositi per garantire il contrasto per accessibilità
- Non mostrare la fascia colorata del footer di un sottosito quando questo non è compilato
- Risolto un bug nel componente Object Browser che permetteva di selezionare più elementi di quelli consentiti
+- Alcune icone mancanti nel widget icone fontawesome sono state rese nuovamente visibili
## Versione 8.7.8 (12/10/2023)
diff --git a/src/helpers/IconWidget/IconAliasHelper.js b/src/helpers/IconWidget/IconAliasHelper.js
index 747b9f612..7cbfdbfed 100644
--- a/src/helpers/IconWidget/IconAliasHelper.js
+++ b/src/helpers/IconWidget/IconAliasHelper.js
@@ -417,7 +417,7 @@ export const fontAwesomeAliases = {
'pencil-paintbrush': 'pen-paintbrush',
'pencil-ruler': 'pen-ruler',
pennant: 'flag-pennant',
- 'people-arrows': 'people-arrows-left-right',
+ 'people-arrows': 'people-arrows',
'people-carry': 'people-carry-box',
percentage: 'percent',
'person-carry': 'person-carry-box',
diff --git a/src/helpers/IconWidget/IconWidgetHelper.js b/src/helpers/IconWidget/IconWidgetHelper.js
index ff117c206..66c195557 100644
--- a/src/helpers/IconWidget/IconWidgetHelper.js
+++ b/src/helpers/IconWidget/IconWidgetHelper.js
@@ -20,7 +20,7 @@ export const defaultIconWidgetOptions = [
['bus', 'Trasporto'],
['heart', 'Matrimonio'],
['person-booth', 'Procedura elettorale e voto'],
- ['masks-theater ', 'Tempo libero'],
+ ['masks-theater', 'Tempo libero'],
['book', 'Cultura'],
['passport', 'Immigrazione'],
['smog', 'Inquinamento'],