@kitconcept/volto-light-theme 7.6.3 → 7.6.4

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.
package/.changelog.draft CHANGED
@@ -1,8 +1,7 @@
1
- ## 7.6.3 (2025-12-01)
1
+ ## 7.6.4 (2025-12-01)
2
2
 
3
3
  ### Bugfix
4
4
 
5
- - Fix css of unauthorized Page @iRohitSingh [#736](https://github.com/kitconcept/volto-light-theme/pull/736)
6
- - Hide complementary logo in mobile devices @Tishasoumya-02
5
+ - Fixed problem with the description not showing in rendering if the description was undefined. @sneridagh
7
6
 
8
7
 
package/CHANGELOG.md CHANGED
@@ -8,6 +8,12 @@
8
8
 
9
9
  <!-- towncrier release notes start -->
10
10
 
11
+ ## 7.6.4 (2025-12-01)
12
+
13
+ ### Bugfix
14
+
15
+ - Fixed problem with the description not showing in rendering if the description was undefined. @sneridagh
16
+
11
17
  ## 7.6.3 (2025-12-01)
12
18
 
13
19
  ### Bugfix
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kitconcept/volto-light-theme",
3
- "version": "7.6.3",
3
+ "version": "7.6.4",
4
4
  "description": "Volto Light Theme by kitconcept",
5
5
  "main": "src/index.ts",
6
6
  "types": "src/index.ts",
@@ -20,19 +20,27 @@ const TeaserDefaultTemplate = (props) => {
20
20
  const openLinkInNewTab =
21
21
  data.openLinkInNewTab ||
22
22
  (openExternalLinkInNewTab && !isInternalURL(href['@id']));
23
- const { '@id': id, ...filteredData } = data;
23
+
24
+ // Ensures that overridden fields are used when "overwrite" is true
25
+ // and fallbacks to empty strings if they are not provided to ensure no undefined
26
+ // values are passed
27
+ const localOverrides = {
28
+ title: data.title || '',
29
+ description: data.description || '',
30
+ head_title: data.head_title || '',
31
+ };
24
32
 
25
33
  return (
26
34
  <Card item={showLink ? href : null} openLinkInNewTab={openLinkInNewTab}>
27
35
  <Card.Image
28
36
  src={url && !image?.image_field ? url : undefined}
29
- item={!data.overwrite ? href : { ...href, ...filteredData }}
37
+ item={!data.overwrite ? href : { ...href, ...localOverrides }}
30
38
  image={data.overwrite ? image : undefined}
31
39
  imageComponent={Image}
32
40
  />
33
41
  <Card.Summary>
34
42
  <Summary
35
- item={!data.overwrite ? href : { ...href, ...filteredData }}
43
+ item={!data.overwrite ? href : { ...href, ...localOverrides }}
36
44
  HeadingTag="h2"
37
45
  hide_description={props.data?.hide_description}
38
46
  />
@@ -1,94 +0,0 @@
1
- import fs from 'node:fs';
2
- import path from 'node:path';
3
- import { fileURLToPath } from 'node:url';
4
- import { describe, expect, it } from 'vitest';
5
-
6
- const __filename = fileURLToPath(import.meta.url);
7
- const __dirname = path.dirname(__filename);
8
-
9
- const recommendedAddonsPath = path.resolve(
10
- __dirname,
11
- '../../../..',
12
- 'recommendedAddons.json',
13
- );
14
- const mrsDeveloperPath = path.resolve(
15
- __dirname,
16
- '../../..',
17
- 'mrs.developer.json',
18
- );
19
-
20
- const readJSON = <T>(filePath: string): T =>
21
- JSON.parse(fs.readFileSync(filePath, 'utf-8'));
22
-
23
- const normalizeVersion = (version: unknown) =>
24
- typeof version === 'string' ? version.replace(/^[\\^~]/, '') : version;
25
-
26
- const excludedPackages = new Set(['@eeacms/volto-accordion-block']);
27
-
28
- describe('internal checks', () => {
29
- it('keeps recommended add-ons in sync with mrs.developer.json', () => {
30
- const recommendedAddons = readJSON<Record<string, string>>(
31
- recommendedAddonsPath,
32
- );
33
- const mrsDeveloper = readJSON<Record<string, unknown>>(mrsDeveloperPath);
34
-
35
- const mrsByPackage = Object.entries(mrsDeveloper).reduce<
36
- Record<string, Record<string, unknown> & { configKey: string }>
37
- >((acc, [configKey, configValue]) => {
38
- if (
39
- configValue &&
40
- typeof configValue === 'object' &&
41
- 'package' in configValue
42
- ) {
43
- acc[String((configValue as Record<string, unknown>).package)] = {
44
- ...(configValue as Record<string, unknown>),
45
- configKey,
46
- };
47
- }
48
- return acc;
49
- }, {});
50
-
51
- const issues: string[] = [];
52
-
53
- Object.entries(recommendedAddons).forEach(
54
- ([packageName, recommendedVersion]) => {
55
- if (excludedPackages.has(packageName)) return;
56
-
57
- const mrsEntry = mrsByPackage[packageName];
58
-
59
- if (!mrsEntry) {
60
- issues.push(
61
- `${packageName} is listed in recommendedAddons.json but missing from frontend/mrs.developer.json.`,
62
- );
63
- return;
64
- }
65
-
66
- const mrsVersion =
67
- (mrsEntry.tag as string | undefined) ||
68
- (mrsEntry.branch as string | undefined) ||
69
- (mrsEntry.version as string | undefined);
70
-
71
- if (!mrsVersion) {
72
- issues.push(
73
- `${packageName} (${mrsEntry.configKey}) has no tag, branch, or version specified in frontend/mrs.developer.json.`,
74
- );
75
- return;
76
- }
77
-
78
- const normalizedRecommended = normalizeVersion(recommendedVersion);
79
- const normalizedMrsVersion = normalizeVersion(mrsVersion);
80
-
81
- if (
82
- recommendedVersion !== mrsVersion &&
83
- normalizedRecommended !== normalizedMrsVersion
84
- ) {
85
- issues.push(
86
- `${packageName} differs: recommendedAddons.json=${recommendedVersion} vs frontend/mrs.developer.json(${mrsEntry.configKey})=${mrsVersion}.`,
87
- );
88
- }
89
- },
90
- );
91
-
92
- expect(issues).toEqual([]);
93
- });
94
- });