Skip to content

Commit

Permalink
Merge branch 'develop' into bug_45358_view_cartella_modulistica
Browse files Browse the repository at this point in the history
  • Loading branch information
pnicolli authored Oct 13, 2023
2 parents 6fe7ecd + fcd942c commit 57b10fa
Show file tree
Hide file tree
Showing 13 changed files with 84 additions and 22 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
RELEASE.md merge=union
24 changes: 23 additions & 1 deletion RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,19 @@
<!--- -----------------------------------------------------------------
Esempio:
---------------------------------------------------------------------
## Versione 7.10.9 (12/09/2023)
### Migliorie
- Fissato il layout di stampa per pagine con Accordion
### Novità
- Nuovo blocco "Informazioni" [`Istruzioni`](https://docs.google.com/document/d/1SThuxa_ah0BuNXukWs564kKPfprK41WLQE8Mome-0xg/edit#heading=h.7ty110jumgmd)
### Fix
- il numero di telefono dentro card ufficio adesso è visibile anche senza indirizzo
-->

Expand All @@ -20,20 +27,33 @@
----------------------------------------------------------------------
## Versione X.X.X (dd/mm/yyyy)
### Migliorie
- ...
### Novità
- ... [`Istruzioni`](url della documentazione relativa alla novità)
### Fix
- ...
-->

## Versione 8.x.x (xx/xx/2023)

## 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
- Alcune icone mancanti nel widget icone fontawesome sono state rese nuovamente visibili
- Sistemate inconsistenze nella visualizzazione di alcuni tipi di elementi della lista degli allegati in Cartella Modulistica

## Versione 8.7.8 (12/10/2023)
Expand All @@ -48,6 +68,8 @@

- 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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
/>
)}
</CardTitle>
Expand Down
3 changes: 0 additions & 3 deletions src/components/ItaliaTheme/Footer/FooterSmall.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,6 @@ const FooterSmall = () => {
return subFooterItems?.length > 0 || links.length > 0 || true ? (
<div className="it-footer-small-prints clearfix">
<Container tag="div">
<h3 className="visually-hidden">
{intl.formatMessage(messages.goToPage)}
</h3>
<ul className="it-footer-small-prints-list list-inline mb-0 d-flex flex-column flex-md-row">
{subFooterItems?.length > 0 &&
subFooterItems.map((item, index) => {
Expand Down
4 changes: 2 additions & 2 deletions src/components/ItaliaTheme/Footer/SubsiteFooter.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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) ? (
<div className={`subsite-footer ${isCmsUI ? 'public-ui' : ''}`}>
<div className="text">
<div className="container px-md-4">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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':
Expand Down Expand Up @@ -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;
};

Expand All @@ -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();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
/>
)}
</a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 || []);

Expand Down
2 changes: 1 addition & 1 deletion src/helpers/IconWidget/IconAliasHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion src/helpers/IconWidget/IconWidgetHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'],
Expand Down
11 changes: 11 additions & 0 deletions src/theme/ItaliaTheme/Blocks/_ctaBlock.scss
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
color: $secondary-text;
font-size: 0.9rem;
text-transform: uppercase;
position: relative;

&:hover,
&:focus {
Expand All @@ -47,6 +48,9 @@
}
.external-link {
fill: $external-link-fill-buttons !important;
position: absolute;
top: 3px;
right: 3px;
}
}

Expand Down Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@

.it-search-wrapper {
a {
&.search-link {
outline: $subsite-primary 2px solid !important;
}

&.rounded-icon {
svg {
@if $subsite-light-theme {
Expand Down
3 changes: 3 additions & 0 deletions src/theme/ItaliaTheme/_common.scss
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@

.external-link {
fill: $link-color !important;
&.align-sub {
vertical-align: sub;
}

&:hover {
fill: #004080 !important;
Expand Down

0 comments on commit 57b10fa

Please sign in to comment.