gatsby-core-theme 5.1.0 → 5.1.3
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/.ci.yml +6 -3
- package/CHANGELOG.md +61 -0
- package/gatsby-node.esm.js +3 -1
- package/package.json +1 -1
- package/src/components/atoms/spotlights/index.js +8 -6
- package/src/components/molecules/header/header.test.js +1 -1
- package/src/components/pages/tracker/index.js +3 -1
- package/src/helpers/strings.js +4 -1
package/.ci.yml
CHANGED
|
@@ -9,9 +9,14 @@ Theme Tests:
|
|
|
9
9
|
- yarn config set cache-folder .yarn
|
|
10
10
|
- yarn
|
|
11
11
|
- yarn workspace gatsby-core-theme test
|
|
12
|
+
artifacts:
|
|
13
|
+
paths:
|
|
14
|
+
- gatsby-theme/coverage/
|
|
12
15
|
coverage: /All files\s*\|\s*([\d\.]+)/
|
|
13
16
|
rules:
|
|
14
17
|
- if: '$CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "master"'
|
|
18
|
+
- if: '$CI_COMMIT_BRANCH == "master" && $PIPELINE == "automated"'
|
|
19
|
+
- if: '$CI_PIPELINE_SOURCE == "push" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "master" && $PIPELINE == "automated"'
|
|
15
20
|
|
|
16
21
|
Theme Publish:
|
|
17
22
|
image: git.ilcd.rocks:4567/team-floyd/themes/gatsby-themes:node14
|
|
@@ -28,11 +33,9 @@ Theme Publish:
|
|
|
28
33
|
- yarn
|
|
29
34
|
- cd gatsby-theme/
|
|
30
35
|
- npx semantic-release -b $CI_COMMIT_REF_NAME
|
|
31
|
-
when:
|
|
32
|
-
manual
|
|
36
|
+
when: manual
|
|
33
37
|
only:
|
|
34
38
|
refs:
|
|
35
39
|
- master
|
|
36
40
|
variables:
|
|
37
41
|
- $PIPELINE != "content-trigger"
|
|
38
|
-
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,64 @@
|
|
|
1
|
+
## [5.1.3](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v5.1.2...v5.1.3) (2022-03-16)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* calculate number of items default ([ef72a91](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/ef72a91e7de83f08a6ef9869d40629fd05714554))
|
|
7
|
+
* check no columns specified default add 3 columns ([c94b18c](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/c94b18cf4466d875ee58f7f0e14aece922aa4c03))
|
|
8
|
+
* reorder pipeline stages ([aa21ba3](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/aa21ba36f81e8270d071c87e5c661d9e2978b1be))
|
|
9
|
+
* reorder pipeline stages ([b52d2c8](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/b52d2c8892f2cb829714c691956df29f04a6ff6a))
|
|
10
|
+
* show full items in the archive page ([c1f0ff1](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/c1f0ff133d62a95a9457411a6012557886e69fed))
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
* Merge branch 'fix-lighthouse-order' into 'master' ([e0f459a](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/e0f459a0a2fd3f7e4757fdee6bf9237cc7ba3ef7))
|
|
14
|
+
* Merge branch 'tm-2763-archive-module' into 'master' ([fd0d258](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/fd0d25811cecc14bc054c0fd06e2434ee7f168b8))
|
|
15
|
+
|
|
16
|
+
## [5.1.2](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v5.1.1...v5.1.2) (2022-03-10)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### Bug Fixes
|
|
20
|
+
|
|
21
|
+
* add artifacts and move back stage of lighthouse ([ea69601](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/ea696013e650505ae1e90b51c261e819c9eaa351))
|
|
22
|
+
* content module gif image and spotlight image ([a54a5a9](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/a54a5a9614be85f7e6dcd90b371b5dbe2713390e))
|
|
23
|
+
* return back assertions ([0cefa07](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/0cefa07edd2c9f6ea73086fe7622c683aa857adf))
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
### Code Refactoring
|
|
27
|
+
|
|
28
|
+
* add flag for docker issue ([b4120b2](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/b4120b2d417f6cccedda7187ccb911c17949d97a))
|
|
29
|
+
* add max assertion for testing ([04e4361](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/04e4361a3858e56b9a9e59b1491d3cb1197051b8))
|
|
30
|
+
* add max assertion for testing ([78d375f](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/78d375f61806140fb7fe860436f7e7b9d3a3bf30))
|
|
31
|
+
* fix error on ci file ([37cc845](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/37cc84555a8a0a62e4036621c45eb89fe5bb1aa0))
|
|
32
|
+
* fix error on ci file ([e78536f](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/e78536ff1f2acf6beaabf8f31435b9845dd3f9d1))
|
|
33
|
+
* fix error on ci file ([f02439a](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/f02439a15ebee6088dfee42ff84c55c380410286))
|
|
34
|
+
* remove unnecessary line in ci yml ([8e041be](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/8e041be54d13593f721a909614515367c4f04819))
|
|
35
|
+
* replace image ([6aacf01](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/6aacf0164c03f3ec153e996b6f2117a095a920a6))
|
|
36
|
+
* replace lighthouse ci with google chrome lighthouse ([aa579c1](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/aa579c15b30f275b2bc151a781181e9b1ec4612f))
|
|
37
|
+
* replace lighthouse ci with google chrome lighthouse ([fef864b](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/fef864bb9182003d7b496d6bfa54f211b3b64036))
|
|
38
|
+
* replace lighthouse ci with google chrome lighthouse ([847e99d](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/847e99d6f63784d63e20bc4ac76b65fcab1714f2))
|
|
39
|
+
* return image ([38e3c74](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/38e3c7467638faae7c0c56d1a26f0e4caaa58896))
|
|
40
|
+
* test lighthouse upgrade ([764656d](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/764656d9dd6511e2ef25c53d7f84b206a7ed5f1d))
|
|
41
|
+
* uncomment lighthouse for testing ([633f6c6](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/633f6c6a95fe84e6771212912a317940d563b73f))
|
|
42
|
+
* uncomment lighthouse for testing ([b288b1a](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/b288b1a9c7ac885a0c7cbb7fcfa1ce2ed46bfb05))
|
|
43
|
+
* undo changes to check pipeline ([45083a5](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/45083a52fc6fbc7913b0cc0b25116bac742cff39))
|
|
44
|
+
* undo changes to check pipeline ([79041a2](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/79041a23aba7fbb58954bd460721b6378c007a4c))
|
|
45
|
+
* upgrade version lighthouse ci ([a5279da](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/a5279da1d2318ca3fe93a9c3170872d5ebeda979))
|
|
46
|
+
* upload coverage as artifact on test pipeline ([6e5d98b](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/6e5d98b7a62bc8326c8e14046ee61d077a3fce7e))
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
* Merge branch 'tm-2758-lighthouse' into 'master' ([57d659c](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/57d659cb8f56f690564bc225e55836b23e9d8a37))
|
|
50
|
+
|
|
51
|
+
## [5.1.1](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v5.1.0...v5.1.1) (2022-03-09)
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
### Bug Fixes
|
|
55
|
+
|
|
56
|
+
* test ([75ad3f0](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/75ad3f0c3a0d12a0355f3c632a2a209f6b19dc95))
|
|
57
|
+
* tracker links redirect logic ([3694cfc](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/3694cfc6b208fc07f223a1ddc054f2a2b50dea1c))
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
* Merge branch 'tracker-links-fix' into 'master' ([7394d4d](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/7394d4d9d947cc0b7ab4e50e92de912687b6a4ba))
|
|
61
|
+
|
|
1
62
|
# [5.1.0](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v5.0.2...v5.1.0) (2022-03-07)
|
|
2
63
|
|
|
3
64
|
|
package/gatsby-node.esm.js
CHANGED
|
@@ -52,9 +52,11 @@ function createArchivePage(pageObject, marketSections, prefilledModules, createP
|
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
if (archiveModule.pagination_type !== 'load_more') {
|
|
55
|
+
const numOfColumns = archiveModule.desktop_num_of_columns;
|
|
56
|
+
const calDefaultNrOfItems = (numOfColumns !== null ? numOfColumns : 3) * 3;
|
|
55
57
|
const numOfItemsPerPage = Math.sign(archiveModule.num_of_items)
|
|
56
58
|
? archiveModule.num_of_items
|
|
57
|
-
:
|
|
59
|
+
: calDefaultNrOfItems;
|
|
58
60
|
const chunked = chunk(cloneDeep(archivePages), numOfItemsPerPage);
|
|
59
61
|
const numOfPages = chunked.length;
|
|
60
62
|
chunked.forEach((value, index) => {
|
package/package.json
CHANGED
|
@@ -21,12 +21,14 @@ const Spotlights = ({ module, themeStyles = {} }) => {
|
|
|
21
21
|
|
|
22
22
|
return (
|
|
23
23
|
<>
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
24
|
+
{img && (
|
|
25
|
+
<LazyImage
|
|
26
|
+
width={100}
|
|
27
|
+
height={50}
|
|
28
|
+
alt={item.label || item?.link_text || fileName}
|
|
29
|
+
src={imageSrc}
|
|
30
|
+
/>
|
|
31
|
+
)}
|
|
30
32
|
<label>{item.label}</label>
|
|
31
33
|
{item.subtitle && <span>{item.subtitle}</span>}
|
|
32
34
|
</>
|
|
@@ -14,7 +14,7 @@ describe('header component', () => {
|
|
|
14
14
|
expect(container.querySelectorAll('.headerContent')).toHaveLength(1);
|
|
15
15
|
|
|
16
16
|
// Inner HTML
|
|
17
|
-
expect(container.querySelectorAll('p')).toHaveLength(
|
|
17
|
+
expect(container.querySelectorAll('p')).toHaveLength(2);
|
|
18
18
|
expect(container.querySelectorAll('i')).toHaveLength(1);
|
|
19
19
|
|
|
20
20
|
// Testing image
|
|
@@ -3,6 +3,7 @@ import PropTypes from 'prop-types';
|
|
|
3
3
|
import Button from '~atoms/button';
|
|
4
4
|
import LazyImage from '~hooks/lazy-image';
|
|
5
5
|
import { prettyTracker } from '~helpers/getters';
|
|
6
|
+
import { generateTrackerLink } from '~helpers/generators';
|
|
6
7
|
import { isMobileDevice } from '~helpers/device-detect';
|
|
7
8
|
import styles from './tracker.module.scss';
|
|
8
9
|
|
|
@@ -26,7 +27,8 @@ const Tracker = ({
|
|
|
26
27
|
let tracker = '';
|
|
27
28
|
for (let i = 0; i < trackerLinks.length; i += 1) {
|
|
28
29
|
const trackerLink = trackerLinks[i].toLowerCase().replace(' ', '_');
|
|
29
|
-
|
|
30
|
+
|
|
31
|
+
if (generateTrackerLink(operator, trackerLink) === path) {
|
|
30
32
|
tracker =
|
|
31
33
|
operator.links[
|
|
32
34
|
Object.keys(operator.links).find((key) => key.toLowerCase() === trackerLink.toLowerCase())
|
package/src/helpers/strings.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { imagePrettyUrl } from './getters';
|
|
2
|
+
|
|
1
3
|
export function capitalize(string) {
|
|
2
4
|
return string.replace(/^\w/, (c) => c.toUpperCase());
|
|
3
5
|
}
|
|
@@ -60,7 +62,8 @@ export function parseContentImageUrl(src) {
|
|
|
60
62
|
const srcArr = src && src.split('//');
|
|
61
63
|
if (srcArr && srcArr.length === 2) {
|
|
62
64
|
const refUrl = srcArr[1].substring(srcArr[1].indexOf('/'));
|
|
63
|
-
|
|
65
|
+
|
|
66
|
+
return imagePrettyUrl(refUrl.substring(1));
|
|
64
67
|
}
|
|
65
68
|
|
|
66
69
|
return src;
|