design-comuni-plone-theme 11.12.3 → 11.12.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,10 +1,12 @@
1
1
  name: Release latest version on npm
2
+
2
3
  on:
3
4
  release:
4
5
  types: [released]
5
6
 
6
7
  jobs:
7
8
  release_to_npm:
9
+ name: Release to npm
8
10
  runs-on: ubuntu-latest
9
11
  permissions:
10
12
  contents: read
@@ -25,3 +27,16 @@ jobs:
25
27
  run: npm publish --provenance --access public
26
28
  env:
27
29
  NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
30
+
31
+ - name: Get the version
32
+ id: get_version
33
+ run: echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> "$GITHUB_OUTPUT"
34
+
35
+ - name: Trigger job
36
+ run: |
37
+ curl --fail --request POST \
38
+ --form token=${{ secrets.TOKEN }} \
39
+ --form ref=master \
40
+ --form "variables[ADDON_NAME]=design-comuni-plone-theme" \
41
+ --form "variables[ADDON_TAG]=${{ steps.get_version.outputs.VERSION }}" \
42
+ "https://gitlab.com/api/v4/projects/${{ secrets.PROJECT_ID }}/trigger/pipeline"
Binary file
package/CHANGELOG.md CHANGED
@@ -1,5 +1,34 @@
1
1
 
2
2
 
3
+ ## [11.12.5](https://github.com/RedTurtle/design-comuni-plone-theme/compare/v11.12.4...v11.12.5) (2024-05-30)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * card with image when elements have no image ([ff99a3b](https://github.com/RedTurtle/design-comuni-plone-theme/commit/ff99a3b0081d734e63a853e6d44830cf9624a3f3))
9
+
10
+
11
+ ### Maintenance
12
+
13
+ * update release jobs ([1318aad](https://github.com/RedTurtle/design-comuni-plone-theme/commit/1318aad487cb310b7d445a305fb311243ee2fac5))
14
+
15
+ ## [11.12.4](https://github.com/RedTurtle/design-comuni-plone-theme/compare/v11.12.3...v11.12.4) (2024-05-30)
16
+
17
+
18
+ ### Bug Fixes
19
+
20
+ * 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))
21
+
22
+
23
+ ### Maintenance
24
+
25
+ * improve cors error logging ([6c483a7](https://github.com/RedTurtle/design-comuni-plone-theme/commit/6c483a79fbe6d40d688c33a36bb61e96f37372fb))
26
+
27
+
28
+ ### Documentation
29
+
30
+ * updated publiccode and release log ([312af90](https://github.com/RedTurtle/design-comuni-plone-theme/commit/312af90e5c708e090df1ccd7eaa194a7f03360ec))
31
+
3
32
  ## [11.12.3](https://github.com/RedTurtle/design-comuni-plone-theme/compare/v11.12.2...v11.12.3) (2024-05-28)
4
33
 
5
34
 
package/RELEASE.md CHANGED
@@ -41,6 +41,18 @@
41
41
  - ...
42
42
  -->
43
43
 
44
+ ## Versione 11.12.5 (30/05/2024)
45
+
46
+ ### Fix
47
+
48
+ - Sistemato il layout "Card con immagine" dei blocchi elenco quando gli elementi non hanno immagine.
49
+
50
+ ## Versione 11.12.4 (30/05/2024)
51
+
52
+ ### Fix
53
+
54
+ - Aggiustato il layout dei campi nel widget delle ricorrenze.
55
+
44
56
  ## Versione 11.12.1 (21/05/2024)
45
57
 
46
58
  ### Migliorie
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "design-comuni-plone-theme",
3
3
  "description": "Volto Theme for Italia design guidelines",
4
4
  "license": "GPL-v3",
5
- "version": "11.12.3",
5
+ "version": "11.12.5",
6
6
  "main": "src/index.js",
7
7
  "repository": {
8
8
  "type": "git",
package/publiccode.yml CHANGED
@@ -227,9 +227,9 @@ maintenance:
227
227
  name: io-Comune - Il sito AgID per Comuni ed Enti Pubblici
228
228
  platforms:
229
229
  - web
230
- releaseDate: '2024-05-28'
230
+ releaseDate: '2024-05-30'
231
231
  softwareType: standalone/web
232
- softwareVersion: 11.12.3
232
+ softwareVersion: 11.12.5
233
233
  url: 'https://github.com/italia/design-comuni-plone-theme'
234
234
  usedBy:
235
235
  - ASP Comuni Modenesi Area Nord
@@ -31,17 +31,18 @@ const ListingImage = ({
31
31
  // photogallery needs to check for null image
32
32
  // https://stackoverflow.com/questions/33136399/is-there-a-way-to-tell-if-reactelement-renders-null
33
33
 
34
- const image = !noWrapLink ? (
34
+ const image = Image(commonImageProps);
35
+ const defaultImage = <img src={DefaultImageSVG} alt="" />;
36
+
37
+ if (image === null && !showDefault) return null;
38
+
39
+ return !noWrapLink ? (
35
40
  <UniversalLink item={item} className="img-wrapper">
36
- {Image(commonImageProps)}
41
+ {image ?? defaultImage}
37
42
  </UniversalLink>
38
43
  ) : (
39
- Image(commonImageProps)
44
+ image ?? defaultImage
40
45
  );
41
- if (image === null)
42
- return showDefault ? <img src={DefaultImageSVG} alt="" /> : null;
43
-
44
- return image;
45
46
  };
46
47
 
47
48
  export const getListingImageBackground = (item = {}, size = 'listing') => {
@@ -25,7 +25,7 @@ const Error = (props) => {
25
25
  let FoundView;
26
26
 
27
27
  // CUSTOMIZATION: added logging of errors
28
- const notifySentry = (error) => {
28
+ const notifySentry = (message) => {
29
29
  const loaders = Object.entries(sentryLibraries).map(
30
30
  ([name, Lib]) =>
31
31
  new Promise((resolve) =>
@@ -37,7 +37,15 @@ const Error = (props) => {
37
37
  {},
38
38
  ...libs.map(([name, lib]) => ({ [name]: lib })),
39
39
  );
40
- libraries.Sentry.captureException(error);
40
+ class MaybeCorsError extends Error {
41
+ constructor({ error, ...props }, ...args) {
42
+ super(...args);
43
+ this.name = 'MaybeCorsError';
44
+ this.error = error;
45
+ this.props = props;
46
+ }
47
+ }
48
+ libraries.Sentry.captureException(new MaybeCorsError(props, message));
41
49
  });
42
50
  };
43
51
 
@@ -50,7 +58,7 @@ const Error = (props) => {
50
58
  'DEV MODE CORS ERROR in Error component: ',
51
59
  JSON.stringify(props, null, 2),
52
60
  );
53
- notifySentry(props);
61
+ notifySentry('DEV MODE CORS ERROR in Error component');
54
62
  FoundView = views.errorViews.corsError;
55
63
  } else {
56
64
  if (error.status.toString() === 'corsError') {
@@ -59,7 +67,7 @@ const Error = (props) => {
59
67
  'CORS ERROR in Error component: ',
60
68
  JSON.stringify(props, null, 2),
61
69
  );
62
- notifySentry(props);
70
+ notifySentry('CORS ERROR in Error component');
63
71
  }
64
72
  FoundView = views.errorViews[error.status.toString()];
65
73
  }
@@ -209,7 +209,7 @@ class View extends Component {
209
209
  .toLowerCase();
210
210
 
211
211
  // CUSTOMIZATION: added logging of errors
212
- notifySentry = (error) => {
212
+ notifySentry = (message) => {
213
213
  const loaders = Object.entries(sentryLibraries).map(
214
214
  ([name, Lib]) =>
215
215
  new Promise((resolve) =>
@@ -221,7 +221,37 @@ class View extends Component {
221
221
  {},
222
222
  ...libs.map(([name, lib]) => ({ [name]: lib })),
223
223
  );
224
- libraries.Sentry.captureException(error);
224
+ class MaybeCorsError extends Error {
225
+ constructor(
226
+ {
227
+ error,
228
+ apiError,
229
+ actions,
230
+ token,
231
+ content,
232
+ connectionRefused,
233
+ pathname,
234
+ versionId,
235
+ ...props
236
+ },
237
+ ...args
238
+ ) {
239
+ super(...args);
240
+ this.name = 'MaybeCorsError';
241
+ this.error = error;
242
+ this.apiError = apiError;
243
+ this.actions = actions;
244
+ this.token = token;
245
+ this.content = content;
246
+ this.connectionRefused = connectionRefused;
247
+ this.pathname = pathname;
248
+ this.versionId = versionId;
249
+ this.props = props;
250
+ }
251
+ }
252
+ libraries.Sentry.captureException(
253
+ new MaybeCorsError(this.props, message),
254
+ );
225
255
  });
226
256
  };
227
257
 
@@ -246,7 +276,7 @@ class View extends Component {
246
276
  'DEV MODE CORS ERROR in View component: ',
247
277
  JSON.stringify(this.props, null, 2),
248
278
  );
249
- this.notifySentry(this.props);
279
+ this.notifySentry('DEV MODE CORS ERROR in View component');
250
280
  FoundView = views.errorViews.corsError;
251
281
  } else {
252
282
  if (this.props.error.status.toString() === 'corsError') {
@@ -255,7 +285,7 @@ class View extends Component {
255
285
  'CORS ERROR in View component: ',
256
286
  JSON.stringify(this.props, null, 2),
257
287
  );
258
- this.notifySentry(this.props);
288
+ this.notifySentry('CORS ERROR in View component');
259
289
  }
260
290
  FoundView = views.errorViews[this.props.error.status.toString()];
261
291
  }
@@ -22,8 +22,4 @@ body.contenttype-event {
22
22
  }
23
23
  }
24
24
  }
25
-
26
- &.cms-ui .ui.button {
27
- padding: 0px;
28
- }
29
25
  }
@@ -745,6 +745,22 @@ body.cms-ui {
745
745
  @import 'bootstrap-italia/src/scss/custom/card';
746
746
  @import './bootstrap-override/bootstrap-italia/_card.scss';
747
747
  }
748
+
749
+ .recurrence-form {
750
+ .byday-field {
751
+ .ui.button {
752
+ padding: 0px;
753
+ }
754
+ }
755
+
756
+ .byyear-field {
757
+ .byyear-byday {
758
+ display: flex;
759
+ flex-wrap: wrap;
760
+ align-items: center;
761
+ }
762
+ }
763
+ }
748
764
  }
749
765
 
750
766
  body.has-toolbar {
@@ -1,23 +0,0 @@
1
- name: Update related themes
2
-
3
- on:
4
- release:
5
- types: [released]
6
-
7
- jobs:
8
- update:
9
- name: Update themes
10
- runs-on: ubuntu-latest
11
- steps:
12
- - name: Get the version
13
- id: get_version
14
- run: echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> "$GITHUB_OUTPUT"
15
-
16
- - name: Trigger job
17
- run: |
18
- curl --fail --request POST \
19
- --form token=${{ secrets.TOKEN }} \
20
- --form ref=master \
21
- --form "variables[ADDON_NAME]=design-comuni-plone-theme" \
22
- --form "variables[ADDON_TAG]=${{ steps.get_version.outputs.VERSION }}" \
23
- "https://gitlab.com/api/v4/projects/${{ secrets.PROJECT_ID }}/trigger/pipeline"