From 601e16c51938aefb45524d8661a901427ff79c86 Mon Sep 17 00:00:00 2001 From: sabrina-bongiovanni <116291154+sabrina-bongiovanni@users.noreply.github.com> Date: Tue, 28 May 2024 21:43:27 +0200 Subject: [PATCH 01/16] fix: removed figure tag + added prop for link condition (#685) * fix: added class to fit images right in listing * fix: removed figure tag + added prop for link condition * fix: moved new parameter into props --- .../Listing/CardWithImage/CardWithImageDefault.jsx | 2 +- .../ItaliaTheme/Blocks/Listing/Commons/ListingImage.jsx | 9 +++++++-- .../ItaliaTheme/Blocks/Listing/InEvidenceTemplate.jsx | 2 +- .../ItaliaTheme/Blocks/Listing/PhotogalleryTemplate.jsx | 5 +++-- .../Blocks/Listing/SmallBlockLinksTemplate.jsx | 1 + 5 files changed, 13 insertions(+), 6 deletions(-) diff --git a/src/components/ItaliaTheme/Blocks/Listing/CardWithImage/CardWithImageDefault.jsx b/src/components/ItaliaTheme/Blocks/Listing/CardWithImage/CardWithImageDefault.jsx index c21f5b906..ffa41fe45 100644 --- a/src/components/ItaliaTheme/Blocks/Listing/CardWithImage/CardWithImageDefault.jsx +++ b/src/components/ItaliaTheme/Blocks/Listing/CardWithImage/CardWithImageDefault.jsx @@ -102,7 +102,7 @@ const CardWithImageDefault = (props) => { })} > <div className="img-responsive img-responsive-panoramic"> - <figure className="img-wrapper">{image}</figure> + {image} {item['@type'] === 'Event' && ( <CardCalendar start={item.start} diff --git a/src/components/ItaliaTheme/Blocks/Listing/Commons/ListingImage.jsx b/src/components/ItaliaTheme/Blocks/Listing/Commons/ListingImage.jsx index f8e0ecc14..b085a2977 100644 --- a/src/components/ItaliaTheme/Blocks/Listing/Commons/ListingImage.jsx +++ b/src/components/ItaliaTheme/Blocks/Listing/Commons/ListingImage.jsx @@ -11,6 +11,7 @@ const ListingImage = ({ responsive = true, showTitleAttr = true, sizes = '(max-width:320px) 200px, (max-width:425px) 300px, (max-width:767px) 500px, 410px', + noWrapLink = false, ...imageProps }) => { const Image = config.getComponent({ name: 'Image' }).component; @@ -30,8 +31,12 @@ const ListingImage = ({ // photogallery needs to check for null image // https://stackoverflow.com/questions/33136399/is-there-a-way-to-tell-if-reactelement-renders-null - const image = ( - <UniversalLink item={item}>{Image(commonImageProps)}</UniversalLink> + const image = !noWrapLink ? ( + <UniversalLink item={item} className="img-wrapper"> + {Image(commonImageProps)} + </UniversalLink> + ) : ( + Image(commonImageProps) ); if (image === null) return showDefault ? <img src={DefaultImageSVG} alt="" /> : null; diff --git a/src/components/ItaliaTheme/Blocks/Listing/InEvidenceTemplate.jsx b/src/components/ItaliaTheme/Blocks/Listing/InEvidenceTemplate.jsx index 869f1842b..835e60f0e 100644 --- a/src/components/ItaliaTheme/Blocks/Listing/InEvidenceTemplate.jsx +++ b/src/components/ItaliaTheme/Blocks/Listing/InEvidenceTemplate.jsx @@ -109,7 +109,7 @@ const InEvidenceTemplate = (props) => { {index === 0 && image && ( <div className="img-responsive-wrapper"> <div className="img-responsive"> - <figure className="img-wrapper">{image}</figure> + {image} {item['@type'] === 'Event' && ( <CardCalendar start={item.start} end={item.end} /> )} diff --git a/src/components/ItaliaTheme/Blocks/Listing/PhotogalleryTemplate.jsx b/src/components/ItaliaTheme/Blocks/Listing/PhotogalleryTemplate.jsx index 7a6462e1f..a900bb682 100644 --- a/src/components/ItaliaTheme/Blocks/Listing/PhotogalleryTemplate.jsx +++ b/src/components/ItaliaTheme/Blocks/Listing/PhotogalleryTemplate.jsx @@ -160,9 +160,10 @@ const PhotogalleryTemplate = ({ items.length === 1 ? '1300' : items.length === 2 - ? '650' - : '450' + ? '650' + : '450' }px`, + noWrapLink: true, }); return ( <SingleSlideWrapper diff --git a/src/components/ItaliaTheme/Blocks/Listing/SmallBlockLinksTemplate.jsx b/src/components/ItaliaTheme/Blocks/Listing/SmallBlockLinksTemplate.jsx index a1c359e6b..a3affc62f 100644 --- a/src/components/ItaliaTheme/Blocks/Listing/SmallBlockLinksTemplate.jsx +++ b/src/components/ItaliaTheme/Blocks/Listing/SmallBlockLinksTemplate.jsx @@ -43,6 +43,7 @@ const SmallBlockLinksTemplate = ({ sizes: '(max-width:575px) 520px, 200px', style: {}, alt: item.title, + noWrapLink: true, }); return ( From 79cae2059c5135d4f036eb16b193f072dd176f86 Mon Sep 17 00:00:00 2001 From: Piero Nicolli <piero.nicolli@redturtle.it> Date: Tue, 28 May 2024 21:45:05 +0200 Subject: [PATCH 02/16] docs: updated publiccode --- publiccode.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/publiccode.yml b/publiccode.yml index 251a49938..6c9da8b4f 100644 --- a/publiccode.yml +++ b/publiccode.yml @@ -227,9 +227,9 @@ maintenance: name: io-Comune - Il sito AgID per Comuni ed Enti Pubblici platforms: - web -releaseDate: '2024-05-27' +releaseDate: '2024-05-28' softwareType: standalone/web -softwareVersion: 11.12.2 +softwareVersion: 11.12.3 url: 'https://github.com/italia/design-comuni-plone-theme' usedBy: - ASP Comuni Modenesi Area Nord From 982b0201da5e998ba019b177a20ad870fefb704b Mon Sep 17 00:00:00 2001 From: Piero Nicolli <piero.nicolli@redturtle.it> Date: Tue, 28 May 2024 21:45:42 +0200 Subject: [PATCH 03/16] chore: release v11.12.3 --- CHANGELOG.md | 12 ++++++++++++ package.json | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f851ae325..2e526720a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,17 @@ +## [11.12.3](https://github.com/RedTurtle/design-comuni-plone-theme/compare/v11.12.2...v11.12.3) (2024-05-28) + + +### Bug Fixes + +* removed figure tag + added prop for link condition ([#685](https://github.com/RedTurtle/design-comuni-plone-theme/issues/685)) ([601e16c](https://github.com/RedTurtle/design-comuni-plone-theme/commit/601e16c51938aefb45524d8661a901427ff79c86)) + + +### Documentation + +* updated publiccode ([79cae20](https://github.com/RedTurtle/design-comuni-plone-theme/commit/79cae2059c5135d4f036eb16b193f072dd176f86)) + ## [11.12.2](https://github.com/RedTurtle/design-comuni-plone-theme/compare/v11.12.1...v11.12.2) (2024-05-27) diff --git a/package.json b/package.json index 01f7a113a..300a5673a 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "design-comuni-plone-theme", "description": "Volto Theme for Italia design guidelines", "license": "GPL-v3", - "version": "11.12.2", + "version": "11.12.3", "main": "src/index.js", "repository": { "type": "git", From ec415d1615524b79755d3f562fcef909f1a126d1 Mon Sep 17 00:00:00 2001 From: sabrina-bongiovanni <116291154+sabrina-bongiovanni@users.noreply.github.com> Date: Thu, 30 May 2024 15:14:49 +0200 Subject: [PATCH 04/16] fix: added styles for recurrence widget fields layout (#686) --- RELEASE.md | 14 ++++++++++++++ src/theme/ItaliaTheme/Views/_evento.scss | 4 ---- src/theme/_cms-ui.scss | 16 ++++++++++++++++ 3 files changed, 30 insertions(+), 4 deletions(-) diff --git a/RELEASE.md b/RELEASE.md index 21a06bfa9..163cc62ed 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -41,6 +41,20 @@ - ... --> +## Versione X.X.X (dd/mm/yyyy) + +### Migliorie + +- ... + +### Novità + +- ... + +### Fix + +- Aggiustato il layout dei campi nel widget delle ricorrenze. + ## Versione 11.12.1 (21/05/2024) ### Migliorie diff --git a/src/theme/ItaliaTheme/Views/_evento.scss b/src/theme/ItaliaTheme/Views/_evento.scss index 7b8a62f73..3abc3da85 100644 --- a/src/theme/ItaliaTheme/Views/_evento.scss +++ b/src/theme/ItaliaTheme/Views/_evento.scss @@ -22,8 +22,4 @@ body.contenttype-event { } } } - - &.cms-ui .ui.button { - padding: 0px; - } } diff --git a/src/theme/_cms-ui.scss b/src/theme/_cms-ui.scss index fe3cf30ce..142ec9b3a 100644 --- a/src/theme/_cms-ui.scss +++ b/src/theme/_cms-ui.scss @@ -745,6 +745,22 @@ body.cms-ui { @import 'bootstrap-italia/src/scss/custom/card'; @import './bootstrap-override/bootstrap-italia/_card.scss'; } + + .recurrence-form { + .byday-field { + .ui.button { + padding: 0px; + } + } + + .byyear-field { + .byyear-byday { + display: flex; + flex-wrap: wrap; + align-items: center; + } + } + } } body.has-toolbar { From 6c483a79fbe6d40d688c33a36bb61e96f37372fb Mon Sep 17 00:00:00 2001 From: Piero Nicolli <piero.nicolli@redturtle.it> Date: Thu, 30 May 2024 15:35:21 +0200 Subject: [PATCH 05/16] chore: improve cors error logging --- .../volto/components/theme/Error/Error.jsx | 16 ++++++-- .../volto/components/theme/View/View.jsx | 38 +++++++++++++++++-- 2 files changed, 46 insertions(+), 8 deletions(-) diff --git a/src/customizations/volto/components/theme/Error/Error.jsx b/src/customizations/volto/components/theme/Error/Error.jsx index 4ba225652..68bb78bdc 100644 --- a/src/customizations/volto/components/theme/Error/Error.jsx +++ b/src/customizations/volto/components/theme/Error/Error.jsx @@ -25,7 +25,7 @@ const Error = (props) => { let FoundView; // CUSTOMIZATION: added logging of errors - const notifySentry = (error) => { + const notifySentry = (message) => { const loaders = Object.entries(sentryLibraries).map( ([name, Lib]) => new Promise((resolve) => @@ -37,7 +37,15 @@ const Error = (props) => { {}, ...libs.map(([name, lib]) => ({ [name]: lib })), ); - libraries.Sentry.captureException(error); + class MaybeCorsError extends Error { + constructor({ error, ...props }, ...args) { + super(...args); + this.name = 'MaybeCorsError'; + this.error = error; + this.props = props; + } + } + libraries.Sentry.captureException(new MaybeCorsError(props, message)); }); }; @@ -50,7 +58,7 @@ const Error = (props) => { 'DEV MODE CORS ERROR in Error component: ', JSON.stringify(props, null, 2), ); - notifySentry(props); + notifySentry('DEV MODE CORS ERROR in Error component'); FoundView = views.errorViews.corsError; } else { if (error.status.toString() === 'corsError') { @@ -59,7 +67,7 @@ const Error = (props) => { 'CORS ERROR in Error component: ', JSON.stringify(props, null, 2), ); - notifySentry(props); + notifySentry('CORS ERROR in Error component'); } FoundView = views.errorViews[error.status.toString()]; } diff --git a/src/customizations/volto/components/theme/View/View.jsx b/src/customizations/volto/components/theme/View/View.jsx index 2714ed81e..dcae4bb50 100644 --- a/src/customizations/volto/components/theme/View/View.jsx +++ b/src/customizations/volto/components/theme/View/View.jsx @@ -209,7 +209,7 @@ class View extends Component { .toLowerCase(); // CUSTOMIZATION: added logging of errors - notifySentry = (error) => { + notifySentry = (message) => { const loaders = Object.entries(sentryLibraries).map( ([name, Lib]) => new Promise((resolve) => @@ -221,7 +221,37 @@ class View extends Component { {}, ...libs.map(([name, lib]) => ({ [name]: lib })), ); - libraries.Sentry.captureException(error); + class MaybeCorsError extends Error { + constructor( + { + error, + apiError, + actions, + token, + content, + connectionRefused, + pathname, + versionId, + ...props + }, + ...args + ) { + super(...args); + this.name = 'MaybeCorsError'; + this.error = error; + this.apiError = apiError; + this.actions = actions; + this.token = token; + this.content = content; + this.connectionRefused = connectionRefused; + this.pathname = pathname; + this.versionId = versionId; + this.props = props; + } + } + libraries.Sentry.captureException( + new MaybeCorsError(this.props, message), + ); }); }; @@ -246,7 +276,7 @@ class View extends Component { 'DEV MODE CORS ERROR in View component: ', JSON.stringify(this.props, null, 2), ); - this.notifySentry(this.props); + this.notifySentry('DEV MODE CORS ERROR in View component'); FoundView = views.errorViews.corsError; } else { if (this.props.error.status.toString() === 'corsError') { @@ -255,7 +285,7 @@ class View extends Component { 'CORS ERROR in View component: ', JSON.stringify(this.props, null, 2), ); - this.notifySentry(this.props); + this.notifySentry('CORS ERROR in View component'); } FoundView = views.errorViews[this.props.error.status.toString()]; } From 312af90e5c708e090df1ccd7eaa194a7f03360ec Mon Sep 17 00:00:00 2001 From: Piero Nicolli <piero.nicolli@redturtle.it> Date: Thu, 30 May 2024 15:36:06 +0200 Subject: [PATCH 06/16] docs: updated publiccode and release log --- RELEASE.md | 10 +--------- publiccode.yml | 4 ++-- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/RELEASE.md b/RELEASE.md index 163cc62ed..7f2f1d97a 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -41,15 +41,7 @@ - ... --> -## Versione X.X.X (dd/mm/yyyy) - -### Migliorie - -- ... - -### Novità - -- ... +## Versione 11.12.4 (30/05/2024) ### Fix diff --git a/publiccode.yml b/publiccode.yml index 6c9da8b4f..0cc0ba3ef 100644 --- a/publiccode.yml +++ b/publiccode.yml @@ -227,9 +227,9 @@ maintenance: name: io-Comune - Il sito AgID per Comuni ed Enti Pubblici platforms: - web -releaseDate: '2024-05-28' +releaseDate: '2024-05-30' softwareType: standalone/web -softwareVersion: 11.12.3 +softwareVersion: 11.12.4 url: 'https://github.com/italia/design-comuni-plone-theme' usedBy: - ASP Comuni Modenesi Area Nord From da3aaee6834856707f84377e7807e2378c5ca2a3 Mon Sep 17 00:00:00 2001 From: Piero Nicolli <piero.nicolli@redturtle.it> Date: Thu, 30 May 2024 15:37:22 +0200 Subject: [PATCH 07/16] chore: release v11.12.4 --- CHANGELOG.md | 17 +++++++++++++++++ package.json | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2e526720a..84d310f48 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,22 @@ +## [11.12.4](https://github.com/RedTurtle/design-comuni-plone-theme/compare/v11.12.3...v11.12.4) (2024-05-30) + + +### Bug Fixes + +* added styles for recurrence widget fields layout ([#686](https://github.com/RedTurtle/design-comuni-plone-theme/issues/686)) ([ec415d1](https://github.com/RedTurtle/design-comuni-plone-theme/commit/ec415d1615524b79755d3f562fcef909f1a126d1)) + + +### Maintenance + +* improve cors error logging ([6c483a7](https://github.com/RedTurtle/design-comuni-plone-theme/commit/6c483a79fbe6d40d688c33a36bb61e96f37372fb)) + + +### Documentation + +* updated publiccode and release log ([312af90](https://github.com/RedTurtle/design-comuni-plone-theme/commit/312af90e5c708e090df1ccd7eaa194a7f03360ec)) + ## [11.12.3](https://github.com/RedTurtle/design-comuni-plone-theme/compare/v11.12.2...v11.12.3) (2024-05-28) diff --git a/package.json b/package.json index 300a5673a..8dded6619 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "design-comuni-plone-theme", "description": "Volto Theme for Italia design guidelines", "license": "GPL-v3", - "version": "11.12.3", + "version": "11.12.4", "main": "src/index.js", "repository": { "type": "git", From ff99a3b0081d734e63a853e6d44830cf9624a3f3 Mon Sep 17 00:00:00 2001 From: Piero Nicolli <piero.nicolli@redturtle.it> Date: Thu, 30 May 2024 15:59:03 +0200 Subject: [PATCH 08/16] fix: card with image when elements have no image --- RELEASE.md | 6 ++++++ publiccode.yml | 2 +- .../Blocks/Listing/Commons/ListingImage.jsx | 15 ++++++++------- 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/RELEASE.md b/RELEASE.md index 7f2f1d97a..0780d053a 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -41,6 +41,12 @@ - ... --> +## Versione 11.12.5 (30/05/2024) + +### Fix + +- Sistemato il layout "Card con immagine" dei blocchi elenco quando gli elementi non hanno immagine. + ## Versione 11.12.4 (30/05/2024) ### Fix diff --git a/publiccode.yml b/publiccode.yml index 0cc0ba3ef..cc1bf33bf 100644 --- a/publiccode.yml +++ b/publiccode.yml @@ -229,7 +229,7 @@ platforms: - web releaseDate: '2024-05-30' softwareType: standalone/web -softwareVersion: 11.12.4 +softwareVersion: 11.12.5 url: 'https://github.com/italia/design-comuni-plone-theme' usedBy: - ASP Comuni Modenesi Area Nord diff --git a/src/components/ItaliaTheme/Blocks/Listing/Commons/ListingImage.jsx b/src/components/ItaliaTheme/Blocks/Listing/Commons/ListingImage.jsx index b085a2977..1b2a84bf5 100644 --- a/src/components/ItaliaTheme/Blocks/Listing/Commons/ListingImage.jsx +++ b/src/components/ItaliaTheme/Blocks/Listing/Commons/ListingImage.jsx @@ -31,17 +31,18 @@ const ListingImage = ({ // photogallery needs to check for null image // https://stackoverflow.com/questions/33136399/is-there-a-way-to-tell-if-reactelement-renders-null - const image = !noWrapLink ? ( + const image = Image(commonImageProps); + const defaultImage = <img src={DefaultImageSVG} alt="" />; + + if (image === null && !showDefault) return null; + + return !noWrapLink ? ( <UniversalLink item={item} className="img-wrapper"> - {Image(commonImageProps)} + {image ?? defaultImage} </UniversalLink> ) : ( - Image(commonImageProps) + image ?? defaultImage ); - if (image === null) - return showDefault ? <img src={DefaultImageSVG} alt="" /> : null; - - return image; }; export const getListingImageBackground = (item = {}, size = 'listing') => { From 1318aad487cb310b7d445a305fb311243ee2fac5 Mon Sep 17 00:00:00 2001 From: Piero Nicolli <piero.nicolli@redturtle.it> Date: Thu, 30 May 2024 16:01:30 +0200 Subject: [PATCH 09/16] ci: update release jobs --- .github/workflows/npm.yml | 15 +++++++++++++++ .github/workflows/themes.yml | 23 ----------------------- 2 files changed, 15 insertions(+), 23 deletions(-) delete mode 100644 .github/workflows/themes.yml diff --git a/.github/workflows/npm.yml b/.github/workflows/npm.yml index 881833853..b0aa85113 100644 --- a/.github/workflows/npm.yml +++ b/.github/workflows/npm.yml @@ -1,10 +1,12 @@ name: Release latest version on npm + on: release: types: [released] jobs: release_to_npm: + name: Release to npm runs-on: ubuntu-latest permissions: contents: read @@ -25,3 +27,16 @@ jobs: run: npm publish --provenance --access public env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + + - name: Get the version + id: get_version + run: echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> "$GITHUB_OUTPUT" + + - name: Trigger job + run: | + curl --fail --request POST \ + --form token=${{ secrets.TOKEN }} \ + --form ref=master \ + --form "variables[ADDON_NAME]=design-comuni-plone-theme" \ + --form "variables[ADDON_TAG]=${{ steps.get_version.outputs.VERSION }}" \ + "https://gitlab.com/api/v4/projects/${{ secrets.PROJECT_ID }}/trigger/pipeline" diff --git a/.github/workflows/themes.yml b/.github/workflows/themes.yml deleted file mode 100644 index 66fa8343b..000000000 --- a/.github/workflows/themes.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: Update related themes - -on: - release: - types: [released] - -jobs: - update: - name: Update themes - runs-on: ubuntu-latest - steps: - - name: Get the version - id: get_version - run: echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> "$GITHUB_OUTPUT" - - - name: Trigger job - run: | - curl --fail --request POST \ - --form token=${{ secrets.TOKEN }} \ - --form ref=master \ - --form "variables[ADDON_NAME]=design-comuni-plone-theme" \ - --form "variables[ADDON_TAG]=${{ steps.get_version.outputs.VERSION }}" \ - "https://gitlab.com/api/v4/projects/${{ secrets.PROJECT_ID }}/trigger/pipeline" From 75bf344216be9965da9109325c11a36ea6ec7150 Mon Sep 17 00:00:00 2001 From: Piero Nicolli <piero.nicolli@redturtle.it> Date: Thu, 30 May 2024 16:12:45 +0200 Subject: [PATCH 10/16] chore: release v11.12.5 --- CHANGELOG.md | 12 ++++++++++++ package.json | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 84d310f48..3a67bf2a1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,17 @@ +## [11.12.5](https://github.com/RedTurtle/design-comuni-plone-theme/compare/v11.12.4...v11.12.5) (2024-05-30) + + +### Bug Fixes + +* card with image when elements have no image ([ff99a3b](https://github.com/RedTurtle/design-comuni-plone-theme/commit/ff99a3b0081d734e63a853e6d44830cf9624a3f3)) + + +### Maintenance + +* update release jobs ([1318aad](https://github.com/RedTurtle/design-comuni-plone-theme/commit/1318aad487cb310b7d445a305fb311243ee2fac5)) + ## [11.12.4](https://github.com/RedTurtle/design-comuni-plone-theme/compare/v11.12.3...v11.12.4) (2024-05-30) diff --git a/package.json b/package.json index 8dded6619..31d52ad10 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "design-comuni-plone-theme", "description": "Volto Theme for Italia design guidelines", "license": "GPL-v3", - "version": "11.12.4", + "version": "11.12.5", "main": "src/index.js", "repository": { "type": "git", From b66d5af94a754eaebc55336ad1c136611a9b01fe Mon Sep 17 00:00:00 2001 From: sabrina-bongiovanni <116291154+sabrina-bongiovanni@users.noreply.github.com> Date: Thu, 30 May 2024 18:23:45 +0200 Subject: [PATCH 11/16] fix: applied img-wrapper styles to all html elements with class (#688) --- RELEASE.md | 14 ++++++++++++++ src/theme/ItaliaTheme/Blocks/_cardWithImage.scss | 4 ++-- src/theme/ItaliaTheme/Blocks/_ctaBlock.scss | 2 +- .../ItaliaTheme/Blocks/_inEvidenceTemplate.scss | 2 +- .../ItaliaTheme/Blocks/_photogallerytemplate.scss | 4 ++-- src/theme/ItaliaTheme/Blocks/_sliderTemplate.scss | 8 ++++---- 6 files changed, 24 insertions(+), 10 deletions(-) diff --git a/RELEASE.md b/RELEASE.md index 0780d053a..e268715ed 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -41,6 +41,20 @@ - ... --> +## Versione X.X.X (dd/mm/yyyy) + +### Migliorie + +- ... + +### Novità + +- ... + +### Fix + +- Il layout delle card con immagini rimane corretto anche selezionando l'opzione "Non alterare le dimensioni naturali dell'immagine". + ## Versione 11.12.5 (30/05/2024) ### Fix diff --git a/src/theme/ItaliaTheme/Blocks/_cardWithImage.scss b/src/theme/ItaliaTheme/Blocks/_cardWithImage.scss index 6b2104b3c..8cae6be83 100644 --- a/src/theme/ItaliaTheme/Blocks/_cardWithImage.scss +++ b/src/theme/ItaliaTheme/Blocks/_cardWithImage.scss @@ -39,7 +39,7 @@ height: auto; padding: 0; - figure.img-wrapper { + .img-wrapper { position: static; margin: 0; } @@ -155,7 +155,7 @@ height: auto; padding: 0; - figure.img-wrapper { + .img-wrapper { position: static; margin: 0; } diff --git a/src/theme/ItaliaTheme/Blocks/_ctaBlock.scss b/src/theme/ItaliaTheme/Blocks/_ctaBlock.scss index d1b759154..c10d78ae1 100644 --- a/src/theme/ItaliaTheme/Blocks/_ctaBlock.scss +++ b/src/theme/ItaliaTheme/Blocks/_ctaBlock.scss @@ -80,7 +80,7 @@ display: flex; } - figure.img-wrapper, + .img-wrapper, picture { position: absolute; z-index: -1; diff --git a/src/theme/ItaliaTheme/Blocks/_inEvidenceTemplate.scss b/src/theme/ItaliaTheme/Blocks/_inEvidenceTemplate.scss index 9aba74934..34e0e9f05 100644 --- a/src/theme/ItaliaTheme/Blocks/_inEvidenceTemplate.scss +++ b/src/theme/ItaliaTheme/Blocks/_inEvidenceTemplate.scss @@ -39,7 +39,7 @@ height: auto; padding: 0; - figure.img-wrapper { + .img-wrapper { position: static; margin: 0; } diff --git a/src/theme/ItaliaTheme/Blocks/_photogallerytemplate.scss b/src/theme/ItaliaTheme/Blocks/_photogallerytemplate.scss index 02ca07e1f..49ebc4937 100644 --- a/src/theme/ItaliaTheme/Blocks/_photogallerytemplate.scss +++ b/src/theme/ItaliaTheme/Blocks/_photogallerytemplate.scss @@ -6,7 +6,7 @@ } .single-slide { - figure.img-wrapper { + .img-wrapper { height: auto; max-height: 500px; @@ -16,7 +16,7 @@ } } - figure.img-wrapper { + .img-wrapper { display: flex; flex-direction: column; justify-content: center; diff --git a/src/theme/ItaliaTheme/Blocks/_sliderTemplate.scss b/src/theme/ItaliaTheme/Blocks/_sliderTemplate.scss index 6cb5783ad..296939b6c 100644 --- a/src/theme/ItaliaTheme/Blocks/_sliderTemplate.scss +++ b/src/theme/ItaliaTheme/Blocks/_sliderTemplate.scss @@ -55,7 +55,7 @@ position: relative; margin: 0 auto; - figure.img-wrapper { + .img-wrapper { position: relative; overflow: hidden; width: 100%; @@ -129,7 +129,7 @@ .slide-wrapper { .img-placeholder, - figure.img-wrapper { + .img-wrapper { height: 300px; img { @@ -214,7 +214,7 @@ height: auto; padding: 0; - figure.img-wrapper { + .img-wrapper { position: static; margin: 0; } @@ -266,7 +266,7 @@ .slick-slide { .slide-wrapper { .img-placeholder, - figure.img-wrapper { + .img-wrapper { height: 150px; img { From 6d86f99887b6622aa4f238a020d546fa8004eeb5 Mon Sep 17 00:00:00 2001 From: Piero Nicolli <piero.nicolli@redturtle.it> Date: Thu, 30 May 2024 18:30:07 +0200 Subject: [PATCH 12/16] docs: updated publiccode and release log --- RELEASE.md | 10 +--------- publiccode.yml | 2 +- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/RELEASE.md b/RELEASE.md index e268715ed..4c400b415 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -41,15 +41,7 @@ - ... --> -## Versione X.X.X (dd/mm/yyyy) - -### Migliorie - -- ... - -### Novità - -- ... +## Versione 11.12.6 (30/05/2024) ### Fix diff --git a/publiccode.yml b/publiccode.yml index cc1bf33bf..d9abaea95 100644 --- a/publiccode.yml +++ b/publiccode.yml @@ -229,7 +229,7 @@ platforms: - web releaseDate: '2024-05-30' softwareType: standalone/web -softwareVersion: 11.12.5 +softwareVersion: 11.12.6 url: 'https://github.com/italia/design-comuni-plone-theme' usedBy: - ASP Comuni Modenesi Area Nord From 5fa6c54a8456d1e47792305dd95648f27762bc7a Mon Sep 17 00:00:00 2001 From: Piero Nicolli <piero.nicolli@redturtle.it> Date: Thu, 30 May 2024 18:30:55 +0200 Subject: [PATCH 13/16] chore: release v11.12.6 --- CHANGELOG.md | 12 ++++++++++++ package.json | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3a67bf2a1..4875eb088 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,17 @@ +## [11.12.6](https://github.com/RedTurtle/design-comuni-plone-theme/compare/v11.12.5...v11.12.6) (2024-05-30) + + +### Bug Fixes + +* applied img-wrapper styles to all html elements with class ([#688](https://github.com/RedTurtle/design-comuni-plone-theme/issues/688)) ([b66d5af](https://github.com/RedTurtle/design-comuni-plone-theme/commit/b66d5af94a754eaebc55336ad1c136611a9b01fe)) + + +### Documentation + +* updated publiccode and release log ([6d86f99](https://github.com/RedTurtle/design-comuni-plone-theme/commit/6d86f99887b6622aa4f238a020d546fa8004eeb5)) + ## [11.12.5](https://github.com/RedTurtle/design-comuni-plone-theme/compare/v11.12.4...v11.12.5) (2024-05-30) diff --git a/package.json b/package.json index 31d52ad10..a298709c6 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "design-comuni-plone-theme", "description": "Volto Theme for Italia design guidelines", "license": "GPL-v3", - "version": "11.12.5", + "version": "11.12.6", "main": "src/index.js", "repository": { "type": "git", From b9d4513d58101d13315a3cfc1a06cffecb3b0307 Mon Sep 17 00:00:00 2001 From: Piero Nicolli <piero.nicolli@redturtle.it> Date: Mon, 3 Jun 2024 16:52:05 +0200 Subject: [PATCH 14/16] chore: improve cors error logging --- .../volto/components/theme/Error/Error.jsx | 8 ++--- .../volto/components/theme/View/View.jsx | 29 ++++--------------- 2 files changed, 9 insertions(+), 28 deletions(-) diff --git a/src/customizations/volto/components/theme/Error/Error.jsx b/src/customizations/volto/components/theme/Error/Error.jsx index 68bb78bdc..80ca4fd12 100644 --- a/src/customizations/volto/components/theme/Error/Error.jsx +++ b/src/customizations/volto/components/theme/Error/Error.jsx @@ -38,14 +38,14 @@ const Error = (props) => { ...libs.map(([name, lib]) => ({ [name]: lib })), ); class MaybeCorsError extends Error { - constructor({ error, ...props }, ...args) { + constructor(...args) { super(...args); this.name = 'MaybeCorsError'; - this.error = error; - this.props = props; } } - libraries.Sentry.captureException(new MaybeCorsError(props, message)); + libraries.Sentry.captureException(new MaybeCorsError(message), { + props, + }); }); }; diff --git a/src/customizations/volto/components/theme/View/View.jsx b/src/customizations/volto/components/theme/View/View.jsx index dcae4bb50..11bfdbdd7 100644 --- a/src/customizations/volto/components/theme/View/View.jsx +++ b/src/customizations/volto/components/theme/View/View.jsx @@ -222,35 +222,16 @@ class View extends Component { ...libs.map(([name, lib]) => ({ [name]: lib })), ); class MaybeCorsError extends Error { - constructor( - { - error, - apiError, - actions, - token, - content, - connectionRefused, - pathname, - versionId, - ...props - }, - ...args - ) { + constructor(...args) { super(...args); this.name = 'MaybeCorsError'; - this.error = error; - this.apiError = apiError; - this.actions = actions; - this.token = token; - this.content = content; - this.connectionRefused = connectionRefused; - this.pathname = pathname; - this.versionId = versionId; - this.props = props; } } libraries.Sentry.captureException( - new MaybeCorsError(this.props, message), + new MaybeCorsError(message, { + props: this.props, + isAnonymous: !this.props.token, + }), ); }); }; From a27789465ba8a4f7214ddaf01181573a55ee3664 Mon Sep 17 00:00:00 2001 From: Piero Nicolli <piero.nicolli@redturtle.it> Date: Mon, 3 Jun 2024 16:52:38 +0200 Subject: [PATCH 15/16] docs: updated publiccode --- publiccode.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/publiccode.yml b/publiccode.yml index d9abaea95..4fe59f36a 100644 --- a/publiccode.yml +++ b/publiccode.yml @@ -227,9 +227,9 @@ maintenance: name: io-Comune - Il sito AgID per Comuni ed Enti Pubblici platforms: - web -releaseDate: '2024-05-30' +releaseDate: '2024-06-03' softwareType: standalone/web -softwareVersion: 11.12.6 +softwareVersion: 11.12.7 url: 'https://github.com/italia/design-comuni-plone-theme' usedBy: - ASP Comuni Modenesi Area Nord From e489cd9bd818451a5575e8ab9b4b58d040f6c460 Mon Sep 17 00:00:00 2001 From: Piero Nicolli <piero.nicolli@redturtle.it> Date: Mon, 3 Jun 2024 16:52:58 +0200 Subject: [PATCH 16/16] chore: release v11.12.7 --- CHANGELOG.md | 12 ++++++++++++ package.json | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4875eb088..8fa3e4522 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,17 @@ +## [11.12.7](https://github.com/RedTurtle/design-comuni-plone-theme/compare/v11.12.6...v11.12.7) (2024-06-03) + + +### Maintenance + +* improve cors error logging ([b9d4513](https://github.com/RedTurtle/design-comuni-plone-theme/commit/b9d4513d58101d13315a3cfc1a06cffecb3b0307)) + + +### Documentation + +* updated publiccode ([a277894](https://github.com/RedTurtle/design-comuni-plone-theme/commit/a27789465ba8a4f7214ddaf01181573a55ee3664)) + ## [11.12.6](https://github.com/RedTurtle/design-comuni-plone-theme/compare/v11.12.5...v11.12.6) (2024-05-30) diff --git a/package.json b/package.json index a298709c6..f7a9d1e6f 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "design-comuni-plone-theme", "description": "Volto Theme for Italia design guidelines", "license": "GPL-v3", - "version": "11.12.6", + "version": "11.12.7", "main": "src/index.js", "repository": { "type": "git",