Skip to content

Commit

Permalink
Merge branch 'slate' of github.com:RedTurtle/design-comuni-plone-them…
Browse files Browse the repository at this point in the history
…e into slate
  • Loading branch information
giuliaghisini committed Jan 25, 2024
2 parents 406e48d + 137b136 commit e513603
Show file tree
Hide file tree
Showing 9 changed files with 77 additions and 57 deletions.
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
## [11.0.0-alpha.2](https://github.com/RedTurtle/design-comuni-plone-theme/compare/v11.0.0-alpha.1...v11.0.0-alpha.2) (2023-11-29)

## [11.3.2](https://github.com/redturtle/design-comuni-plone-theme/compare/v11.3.1...v11.3.2) (2024-01-19)


### Bug Fixes

* bug when importing svg icons without viewBox ([#489](https://github.com/redturtle/design-comuni-plone-theme/issues/489)) ([8b2cd7d](https://github.com/redturtle/design-comuni-plone-theme/commit/8b2cd7da5e22ffe1ac279f226a872586ac43bc74))
* close button of menu in mobile showing when menu is closed ([#491](https://github.com/redturtle/design-comuni-plone-theme/issues/491)) ([e398437](https://github.com/redturtle/design-comuni-plone-theme/commit/e3984374d1f6e096dc089f1fb11263d4b372211b))
* footer second level navigation disappearing ([#490](https://github.com/redturtle/design-comuni-plone-theme/issues/490)) ([39a54be](https://github.com/redturtle/design-comuni-plone-theme/commit/39a54beeae2571d0f9187582a4ab1e4307a9fb0c))


### Documentation

* updated publiccode and release log ([b9893ff](https://github.com/redturtle/design-comuni-plone-theme/commit/b9893ff17fc2bc4a0088594e00184dff7ad579b2))

## [11.3.1](https://github.com/redturtle/design-comuni-plone-theme/compare/v11.3.0...v11.3.1) (2024-01-17)


Expand Down
18 changes: 10 additions & 8 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,25 +41,27 @@
- ...
-->

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

### Migliorie

- ...

### Novità

- ... [`Istruzioni`](url della documentazione relativa alla novità)
- Introdotto nuovo editor Slate, al posto di DratJS, per i blocchi di contenuto con formattazione

### Fix

- Sistemata la visualizzazione per la barra di Slate, ora è possibile visualizzare tutti i pulsanti anche su schermi più piccoli

### Novità

- Modificata l'altezza delle immagini delle card, per essere in linea con i template agid.
## Versione 11.1.4 (dd/mm/yyyy)
## Versione x.x.x (dd/mm/yyyy)
## Versione 11.3.2 (19/01/2023)

### Fix

- Risolto un problema di visualizzazione di alcune icone social.
- Risolto un problema con il menù di navigazione del footer, in cui a volte scomparivano le voci di secondo livello.
- Risolto problema di sovrapposizione del bottone "Chiudi" del menu laterale su mobile quando il menu è chiuso.

## Versione 11.3.0 (16/01/2024)

### Novità
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": "11.3.1",
"version": "12.0.0-alpha1",
"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: '2024-01-17'
releaseDate: '2024-01-19'
softwareType: standalone/web
softwareVersion: 11.3.1
softwareVersion: 11.3.2
url: 'https://github.com/italia/design-comuni-plone-theme'
usedBy:
- ASP Comuni Modenesi Area Nord
Expand Down
1 change: 1 addition & 0 deletions razzle.extend.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ const modify = (webpackConfig, { target, dev }, webpackObject) => {
params: { removeUselessStrokeAndFill: true },
},
{ name: 'removeViewBox', params: { removeViewBox: false } },
'removeDimensions',
],
},
},
Expand Down
68 changes: 30 additions & 38 deletions src/components/ItaliaTheme/Footer/FooterNavigation.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,11 @@
* @module components/ItaliaTheme/Footer/FooterNavigation
*/

import React, { useEffect } from 'react';
import { Link } from 'react-router-dom';
import { useDispatch, useSelector } from 'react-redux';
import { useSelector } from 'react-redux';

import { defineMessages, useIntl } from 'react-intl';
import { isEqual } from 'lodash';
import { getBaseUrl } from '@plone/volto/helpers';
import { getNavigation } from '@plone/volto/actions';
import { UniversalLink } from '@plone/volto/components';
import { Row, Col, LinkList, LinkListItem } from 'design-react-kit';
import { SectionIcon } from 'design-comuni-plone-theme/components/ItaliaTheme';
Expand All @@ -25,23 +22,15 @@ const messages = defineMessages({

const FooterNavigation = () => {
const intl = useIntl();
const currentLang = useSelector((state) => state.intl.locale);
const dispatch = useDispatch();
const items = useSelector((state) => state.navigation.items, isEqual);

let path = '';
if (config.settings.isMultilingual) {
path = '/' + currentLang;
}

useEffect(() => {
dispatch(
getNavigation(
getBaseUrl(path),
config.settings.siteProperties.footerNavigationDepth,
),
// DEPRECATED: isFooterCollapsed to be removed in version 12
if (config.settings.isFooterCollapsed) {
// eslint-disable-next-line no-console
console.warn(
'DEPRECATED: config.settings.isFooterCollapsed will be removed in version 12. Use config.settings.siteProperties.footerNavigationDepth instead.',
);
}, [path, dispatch]);
}

return (
<>
Expand Down Expand Up @@ -70,26 +59,29 @@ const FooterNavigation = () => {
{item.title}
</Link>
</h4>
{!config.settings.isFooterCollapsed && item.items && (
<LinkList className="footer-list clearfix" tag="div">
{item.items.map((subitem) => {
return (
<LinkListItem
key={subitem.url}
href={subitem.url}
tag={UniversalLink}
title={
intl.formatMessage(messages.goToPage) +
': ' +
subitem.title
}
>
{subitem.title}
</LinkListItem>
);
})}
</LinkList>
)}
{/* DEPRECATED: isFooterCollapsed to be removed in version 12 */}
{!config.settings.isFooterCollapsed &&
config.settings.siteProperties.footerNavigationDepth > 1 &&
item.items && (
<LinkList className="footer-list clearfix" tag="div">
{item.items.map((subitem) => {
return (
<LinkListItem
key={subitem.url}
href={subitem.url}
tag={UniversalLink}
title={
intl.formatMessage(messages.goToPage) +
': ' +
subitem.title
}
>
{subitem.title}
</LinkListItem>
);
})}
</LinkList>
)}
</Col>
))}
</Row>
Expand Down
6 changes: 4 additions & 2 deletions src/components/ItaliaTheme/Icons/DesignIcon.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,10 @@ const Icon = ({ icon, title, className, size }) => {
const { current: name } = ImportedIconRef;
return (
<svg
xmlns={name.attributes && name.attributes.xmlns}
viewBox={name.attributes && name.attributes.viewBox}
xmlns={name.attributes?.xmlns}
viewBox={name.attributes?.viewBox}
width={name.attributes?.width}
height={name.attributes?.height}
style={{ height: size, width: 'auto' }}
className={className}
aria-hidden="true"
Expand Down
13 changes: 8 additions & 5 deletions src/config/italiaConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ import { schemaListing } from 'design-comuni-plone-theme/components/ItaliaTheme/

import reducers from 'design-comuni-plone-theme/reducers';

const ReleaseLog = loadable(() =>
import('design-comuni-plone-theme/components/ReleaseLog/ReleaseLog'),
const ReleaseLog = loadable(
() => import('design-comuni-plone-theme/components/ReleaseLog/ReleaseLog'),
);

const messages = defineMessages({
Expand Down Expand Up @@ -104,6 +104,7 @@ export default function applyConfig(voltoConfig) {
// },
}),
isMultilingual: false,
// DEPRECATED: isFooterCollapsed to be removed in version 12. Use siteProperties.footerNavigationDepth instead.
isFooterCollapsed: false, // false(default) -> vedere il footer automatico esploso | true -> implodere il footer menu automatico
supportedLanguages: ['it'],
defaultLanguage: 'it',
Expand All @@ -112,6 +113,7 @@ export default function applyConfig(voltoConfig) {
showSelfRegistration: false,
useEmailAsLogin: false,
defaultPageSize: 24,
navDepth: 2,
cookieExpires: 15552000, //6 month
serverConfig: {
...config.settings.serverConfig,
Expand Down Expand Up @@ -447,9 +449,10 @@ export default function applyConfig(voltoConfig) {
delete config.blocks.blocksConfig['leadimage'];

// Remove Horizontal Menu variation of TOC Block
config.blocks.blocksConfig.toc.variations = config.blocks.blocksConfig.toc.variations.filter(
(v) => v.id !== 'horizontalMenu',
);
config.blocks.blocksConfig.toc.variations =
config.blocks.blocksConfig.toc.variations.filter(
(v) => v.id !== 'horizontalMenu',
);

// COMPONENTS
config.components = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,12 @@ const Navigation = ({ pathname }) => {
document.body.removeEventListener('click', blocksClickListener);
}, []);

const closeButtonStyle = collapseOpen
? {
display: 'block',
}
: { display: 'none' };

return (
<Header theme="" type="navbar">
{menu?.length > 0 ? (
Expand Down Expand Up @@ -148,7 +154,7 @@ const Navigation = ({ pathname }) => {
{/* Headerslim Menu - parent site (if subsite) */}
{subsite && <ParentSiteMenu />}
</div>
<div className="close-div">
<div className="close-div" style={closeButtonStyle}>
<button
className="btn close-menu"
type="button"
Expand Down

0 comments on commit e513603

Please sign in to comment.