Skip to content

Commit

Permalink
Merge branch 'main' into fix_h_titles_in_views
Browse files Browse the repository at this point in the history
  • Loading branch information
giuliaghisini committed Nov 3, 2023
2 parents 881e0b3 + d842e66 commit c5f271f
Show file tree
Hide file tree
Showing 28 changed files with 436 additions and 37 deletions.
50 changes: 50 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,55 @@


## [8.8.1](https://github.com/redturtle/design-comuni-plone-theme/compare/v8.8.0...v8.8.1) (2023-11-03)


### Bug Fixes

* fix gallery preview image ([f2ddb87](https://github.com/redturtle/design-comuni-plone-theme/commit/f2ddb8798fcdd88cc003791c483240f4d95e3880))
* fix slider dr dots margin ([8e24914](https://github.com/redturtle/design-comuni-plone-theme/commit/8e2491430c7951cbc87fcf30cb860c1ae0f55460))
* RSS template div source moved inside condition and changed release.md ([#386](https://github.com/redturtle/design-comuni-plone-theme/issues/386)) ([200fefa](https://github.com/redturtle/design-comuni-plone-theme/commit/200fefad7b0c7596cdcb3109ef5962d53b643626))
* source added for rss single card ([#384](https://github.com/redturtle/design-comuni-plone-theme/issues/384)) ([669f165](https://github.com/redturtle/design-comuni-plone-theme/commit/669f16575e93944a354119aff4a6dd4ba9cf58b8))


### Maintenance

* preparing release 8.8.1 ([d12c618](https://github.com/redturtle/design-comuni-plone-theme/commit/d12c61899c0cd5b658e6fa38234f90a029b1786c))

## [8.8.0](https://github.com/redturtle/design-comuni-plone-theme/compare/v8.7.12...v8.8.0) (2023-10-31)


### Features

* added id and title_it adttrs and handled h2 title_type in Gallery component ([4d5949e](https://github.com/redturtle/design-comuni-plone-theme/commit/4d5949eb2393f442e6541637e89123153606279e))


### Bug Fixes

* fixed image url in Photogallery listing popup ([#383](https://github.com/redturtle/design-comuni-plone-theme/issues/383)) ([b8d2e20](https://github.com/redturtle/design-comuni-plone-theme/commit/b8d2e207cdefd018824229975ac0f5ac0bdb8d0c))


### Maintenance

* preparing release ([2e6d0a5](https://github.com/redturtle/design-comuni-plone-theme/commit/2e6d0a56ddd96ecbf48e68e03fcc3caf061ceb55))

## [8.7.12](https://github.com/RedTurtle/design-comuni-plone-theme/compare/v8.7.11...v8.7.12) (2023-10-27)


### Bug Fixes

* backport white header preset from child themes and fix header mobile ([#380](https://github.com/RedTurtle/design-comuni-plone-theme/issues/380)) ([60276ec](https://github.com/RedTurtle/design-comuni-plone-theme/commit/60276ecc3aa0dc51016f0bc8d1fad2e4a09ccd4e))
* fixed conditions for rendering + fix title tag ([#371](https://github.com/RedTurtle/design-comuni-plone-theme/issues/371)) ([522774b](https://github.com/RedTurtle/design-comuni-plone-theme/commit/522774bee6dafd21dc09beef2fbc5b70936b7944))
* icon component for TextSizeButton in RichTextEditor ([#379](https://github.com/RedTurtle/design-comuni-plone-theme/issues/379)) ([d2160ce](https://github.com/RedTurtle/design-comuni-plone-theme/commit/d2160ce95eb8c98f1221c690f019ec42c20c8fcd))
* overlapping block chooser in small pages/screens ([#372](https://github.com/RedTurtle/design-comuni-plone-theme/issues/372)) ([3035ea2](https://github.com/RedTurtle/design-comuni-plone-theme/commit/3035ea2b2c1e7ddfa3968d3d685614cb3dda097d))
* release-log class added ([#376](https://github.com/RedTurtle/design-comuni-plone-theme/issues/376)) ([92e5a68](https://github.com/RedTurtle/design-comuni-plone-theme/commit/92e5a680afd15bc25a8b8eb97ab96845f77e8294))
* release-log text ([#377](https://github.com/RedTurtle/design-comuni-plone-theme/issues/377)) ([46a4d5f](https://github.com/RedTurtle/design-comuni-plone-theme/commit/46a4d5f174d9dedd6cf190466a88ade0d6746d68))


### Documentation

* updated publiccode and release log ([b1e9e81](https://github.com/RedTurtle/design-comuni-plone-theme/commit/b1e9e81c3506851e41b5f35d866353b579358edd))
* updated publiccode and release log ([276ca06](https://github.com/RedTurtle/design-comuni-plone-theme/commit/276ca0605b13923f2941a9ec843ca7e04dce20a1))

## [8.7.11](https://github.com/redturtle/design-comuni-plone-theme/compare/v8.7.10...v8.7.11) (2023-10-23)


Expand Down
15 changes: 15 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,21 @@
- ...
-->

## Versione 8.8.1 (03/11/2023)

### Fix

- Nei template dei feed RSS ora viene mostrata la sorgente se presente.

## Versione 8.7.12 (27/10/2023)

### Fix

- Migliorato il dimensionamento dell'icona del menù su dispositivi mobile
- Sistemata dimensione logo e bottone di ricerca su dispositivi mobile
- Migliorato il comportamento del menu laterale dei contenuti quando si aggiungono file nelle cartelle al loro interno
- Sistemata sovrapposizione della finestra di selezione blocchi con l'header del sito per alcune dimensioni dello schermo

## Versione 8.7.10 (19/10/2023)

## Fix
Expand Down
6 changes: 5 additions & 1 deletion locales/de/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -1595,7 +1595,6 @@ msgstr ""
msgid "desc"
msgstr ""

#: components/ItaliaTheme/View/BandoView/BandoText
#: components/ItaliaTheme/View/Commons/TrasparenzaFields
#: components/ItaliaTheme/View/TrasparenzaView/DettagliProcedimentiView
#: components/ItaliaTheme/View/VenueView/VenueDescription
Expand All @@ -1604,6 +1603,11 @@ msgstr ""
msgid "descrizione"
msgstr ""

#: components/ItaliaTheme/View/BandoView/BandoText
# defaultMessage: Descrizione
msgid "descrizione_bando"
msgstr ""

#: components/ItaliaTheme/Header/HeaderSearch/SearchModal
# defaultMessage: Non cercare nella sezione
msgid "deselectSearchSection"
Expand Down
6 changes: 5 additions & 1 deletion locales/en/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -1580,7 +1580,6 @@ msgstr "Delegations"
msgid "desc"
msgstr "Quick links"

#: components/ItaliaTheme/View/BandoView/BandoText
#: components/ItaliaTheme/View/Commons/TrasparenzaFields
#: components/ItaliaTheme/View/TrasparenzaView/DettagliProcedimentiView
#: components/ItaliaTheme/View/VenueView/VenueDescription
Expand All @@ -1589,6 +1588,11 @@ msgstr "Quick links"
msgid "descrizione"
msgstr "Description"

#: components/ItaliaTheme/View/BandoView/BandoText
# defaultMessage: Descrizione
msgid "descrizione_bando"
msgstr ""

#: components/ItaliaTheme/Header/HeaderSearch/SearchModal
# defaultMessage: Non cercare nella sezione
msgid "deselectSearchSection"
Expand Down
6 changes: 5 additions & 1 deletion locales/es/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -1589,7 +1589,6 @@ msgstr "Delegaciones"
msgid "desc"
msgstr "Enlaces rápidos"

#: components/ItaliaTheme/View/BandoView/BandoText
#: components/ItaliaTheme/View/Commons/TrasparenzaFields
#: components/ItaliaTheme/View/TrasparenzaView/DettagliProcedimentiView
#: components/ItaliaTheme/View/VenueView/VenueDescription
Expand All @@ -1598,6 +1597,11 @@ msgstr "Enlaces rápidos"
msgid "descrizione"
msgstr "Descripción"

#: components/ItaliaTheme/View/BandoView/BandoText
# defaultMessage: Descrizione
msgid "descrizione_bando"
msgstr ""

#: components/ItaliaTheme/Header/HeaderSearch/SearchModal
# defaultMessage: Non cercare nella sezione
msgid "deselectSearchSection"
Expand Down
6 changes: 5 additions & 1 deletion locales/fr/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -1597,7 +1597,6 @@ msgstr "Déléghe"
msgid "desc"
msgstr "Liens rapides"

#: components/ItaliaTheme/View/BandoView/BandoText
#: components/ItaliaTheme/View/Commons/TrasparenzaFields
#: components/ItaliaTheme/View/TrasparenzaView/DettagliProcedimentiView
#: components/ItaliaTheme/View/VenueView/VenueDescription
Expand All @@ -1606,6 +1605,11 @@ msgstr "Liens rapides"
msgid "descrizione"
msgstr "Description"

#: components/ItaliaTheme/View/BandoView/BandoText
# defaultMessage: Descrizione
msgid "descrizione_bando"
msgstr ""

#: components/ItaliaTheme/Header/HeaderSearch/SearchModal
# defaultMessage: Non cercare nella sezione
msgid "deselectSearchSection"
Expand Down
6 changes: 5 additions & 1 deletion locales/it/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -1580,7 +1580,6 @@ msgstr "Deleghe"
msgid "desc"
msgstr "Link rapidi"

#: components/ItaliaTheme/View/BandoView/BandoText
#: components/ItaliaTheme/View/Commons/TrasparenzaFields
#: components/ItaliaTheme/View/TrasparenzaView/DettagliProcedimentiView
#: components/ItaliaTheme/View/VenueView/VenueDescription
Expand All @@ -1589,6 +1588,11 @@ msgstr "Link rapidi"
msgid "descrizione"
msgstr "Descrizione"

#: components/ItaliaTheme/View/BandoView/BandoText
# defaultMessage: Descrizione
msgid "descrizione_bando"
msgstr ""

#: components/ItaliaTheme/Header/HeaderSearch/SearchModal
# defaultMessage: Non cercare nella sezione
msgid "deselectSearchSection"
Expand Down
8 changes: 6 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-10-10T15:52:06.253Z\n"
"POT-Creation-Date: 2023-11-03T10:53:24.029Z\n"
"Last-Translator: Plone i18n <[email protected]>\n"
"Language-Team: Plone i18n <[email protected]>\n"
"MIME-Version: 1.0\n"
Expand Down Expand Up @@ -1582,7 +1582,6 @@ msgstr ""
msgid "desc"
msgstr ""

#: components/ItaliaTheme/View/BandoView/BandoText
#: components/ItaliaTheme/View/Commons/TrasparenzaFields
#: components/ItaliaTheme/View/TrasparenzaView/DettagliProcedimentiView
#: components/ItaliaTheme/View/VenueView/VenueDescription
Expand All @@ -1591,6 +1590,11 @@ msgstr ""
msgid "descrizione"
msgstr ""

#: components/ItaliaTheme/View/BandoView/BandoText
# defaultMessage: Descrizione
msgid "descrizione_bando"
msgstr ""

#: components/ItaliaTheme/Header/HeaderSearch/SearchModal
# defaultMessage: Non cercare nella sezione
msgid "deselectSearchSection"
Expand Down
2 changes: 1 addition & 1 deletion 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": "8.7.11",
"version": "8.8.1",
"main": "src/index.js",
"keywords": [
"volto-addon",
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: '2023-10-23'
releaseDate: '2023-11-03'
softwareType: standalone/web
softwareVersion: 8.7.11
softwareVersion: 8.8.2
url: 'https://github.com/italia/design-comuni-plone-theme'
usedBy:
- ASP Comuni Modenesi Area Nord
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ import {
} from 'design-comuni-plone-theme/components/ItaliaTheme';
import React, { useRef, useState } from 'react';
import { defineMessages, useIntl } from 'react-intl';

import DefaultImageSVG from '@plone/volto/components/manage/Blocks/Listing/default-image.svg';
import { GalleryPreview } from 'design-comuni-plone-theme/components/ItaliaTheme';
import { Icon } from 'design-comuni-plone-theme/components/ItaliaTheme';
import PropTypes from 'prop-types';
Expand Down Expand Up @@ -139,12 +137,14 @@ const PhotogalleryTemplate = ({

const getCaption = (item) => item.description ?? item.rights ?? null;

const figure = (image, item) => (
<figure className="img-wrapper">
{image ? <>{image}</> : <img src={DefaultImageSVG} alt="" />}
{getCaption(item) && <figcaption>{getCaption(item)}</figcaption>}
</figure>
);
const figure = (image, item) => {
return (
<figure className="img-wrapper">
{image}
{getCaption(item) && <figcaption>{getCaption(item)}</figcaption>}
</figure>
);
};

return (
<div className="photogallery">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,11 @@ const CardWithImageRssTemplate = ({
</span>{' '}
</div>
<CardTitle tag="h6">{item.title}</CardTitle>
{item?.source?.length > 0 && (
<div className="source-title">
<span className="source">{item.source}</span>
</div>
)}
</CardBody>
<CardReadMore
iconName="it-arrow-right"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@ const CardWithoutImageRssTemplate = ({
)}
</div>
<CardTitle tag="h5">{item.title}</CardTitle>
{item?.source?.length > 0 && (
<div className="source-title">
<span className="source">{item.source}</span>
</div>
)}
<CardText tag="p" className="font-serif">
{item.contentSnippet}
</CardText>
Expand Down
25 changes: 15 additions & 10 deletions src/components/ItaliaTheme/GalleryPreview/GalleryPreview.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { defineMessages, useIntl } from 'react-intl';
import { flattenToAppURL } from '@plone/volto/helpers';

import PropTypes from 'prop-types';

import { Modal, ModalBody, Button, ModalHeader } from 'design-react-kit';
import { Icon } from 'design-comuni-plone-theme/components/ItaliaTheme';
import DefaultImageSVG from '@plone/volto/components/manage/Blocks/Listing/default-image.svg';
Expand Down Expand Up @@ -33,6 +32,16 @@ const messages = defineMessages({
const GalleryPreview = ({ id, viewIndex, setViewIndex, items }) => {
const intl = useIntl();
const [modalIsOpen, setModalIsOpen] = useState(false);
const image = items[viewIndex];

let checkUrlImage = image.image_field
? image.image_scales?.[image.image_field]?.[0]?.scales?.larger?.download
: image?.image?.scales?.larger?.download ||
image?.image_scales?.image[0]?.scales?.larger?.download;

if (checkUrlImage?.startsWith('@@')) {
checkUrlImage = image['@id'] + '/' + checkUrlImage;
}

const closeModal = () => {
setViewIndex(null);
Expand Down Expand Up @@ -69,12 +78,10 @@ const GalleryPreview = ({ id, viewIndex, setViewIndex, items }) => {
closeAriaLabel={intl.formatMessage(messages.close_preview)}
toggle={closeModal}
>
{items[viewIndex].title}
{image.title}
</ModalHeader>
<ModalBody>
{items[viewIndex].description && (
<p className="pb-3">{items[viewIndex].description}</p>
)}
{image.description && <p className="pb-3">{image.description}</p>}
<div className="item-preview">
{items.length > 1 && (
<Button
Expand All @@ -92,13 +99,11 @@ const GalleryPreview = ({ id, viewIndex, setViewIndex, items }) => {
</Button>
)}
<div className="image">
{items[viewIndex].image ? (
{checkUrlImage ? (
<img
src={flattenToAppURL(
items[viewIndex].image.scales.larger.download,
)}
src={flattenToAppURL(checkUrlImage)}
loading="lazy"
alt={items[viewIndex].title}
alt={image.title}
/>
) : (
<img src={DefaultImageSVG} alt="" />
Expand Down
2 changes: 1 addition & 1 deletion src/components/ItaliaTheme/View/BandoView/BandoText.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {

const messages = defineMessages({
descrizione: {
id: 'descrizione',
id: 'descrizione_bando',
defaultMessage: 'Descrizione',
},
tipologia_bando: {
Expand Down
4 changes: 4 additions & 0 deletions src/components/ItaliaTheme/View/Commons/Attachments.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,10 @@ const Attachments = ({
title={title ? title : intl.formatMessage(messages.attachments)}
>
{attachments.length > 0 && attachments_view}
{/** aggiunte conditions per attendere il render del componente mentre
* i risultati della query stanno ancora caricando
*/}
{searchResults?.[key]?.loading && !searchResults?.[key]?.loaded && <></>}
</RichTextSection>
) : (
<div className="mb-5 mt-3">
Expand Down
14 changes: 11 additions & 3 deletions src/components/ItaliaTheme/View/Commons/Gallery.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,10 @@ const messages = defineMessages({
const Gallery = ({
content,
folder_name,
id = '',
title,
title_type = 'h3',
title_id = 'galleria',
title_video,
className = '',
reactSlick,
Expand Down Expand Up @@ -121,17 +123,23 @@ const Gallery = ({
{images?.length > 0 ? (
<div
className={`it-carousel-wrapper it-carousel-landscape-abstract-three-cols ${className}`}
id={id}
>
<div className="slider-container">
<div className="it-header-block">
<div className="it-header-block-title">
{title_type === 'h2' && (
<h2 id={title_id} className="mb-3 h4">
{gallery_title}
</h2>
)}
{title_type === 'h3' && (
<h3 id="galleria" className="h5">
<h3 id={title_id} className="h5">
{gallery_title}
</h3>
)}
{title_type === 'h4' && <h4 id="galleria">{gallery_title}</h4>}
{title_type === 'h5' && <h5 id="galleria">{gallery_title}</h5>}
{title_type === 'h4' && <h4 id={title_id}>{gallery_title}</h4>}
{title_type === 'h5' && <h5 id={title_id}>{gallery_title}</h5>}
</div>
</div>
<div className="it-carousel-all it-card-bg">
Expand Down
Loading

0 comments on commit c5f271f

Please sign in to comment.