@eeacms/volto-clms-theme 1.0.48 → 1.0.49

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.md CHANGED
@@ -4,8 +4,16 @@ All notable changes to this project will be documented in this file. Dates are d
4
4
 
5
5
  Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
6
6
 
7
+ #### [1.0.49](https://github.com/eea/volto-clms-theme/compare/1.0.48...1.0.49)
8
+
9
+ - labels and conformity pass [`59be2fd`](https://github.com/eea/volto-clms-theme/commit/59be2fd5034fdfed211c4e0b0872504432e254e9)
10
+ - image [`47cc7dc`](https://github.com/eea/volto-clms-theme/commit/47cc7dc37974848f2d90cdf6a035970620489cf8)
11
+
7
12
  #### [1.0.48](https://github.com/eea/volto-clms-theme/compare/1.0.47...1.0.48)
8
13
 
14
+ > 16 December 2021
15
+
16
+ - Develop [`#156`](https://github.com/eea/volto-clms-theme/pull/156)
9
17
  - dataset view [`38faa9d`](https://github.com/eea/volto-clms-theme/commit/38faa9d291e22c92a1c9049c7241555b2300f830)
10
18
  - tab editor [`cfbcf74`](https://github.com/eea/volto-clms-theme/commit/cfbcf742b370cc665c689a2480a09d3b640dc318)
11
19
  - remove required to description in proptypes [`9f6da1d`](https://github.com/eea/volto-clms-theme/commit/9f6da1d9c2125865c329a263d0a7b3e771baa287)
package/README.md CHANGED
@@ -1,7 +1,18 @@
1
1
  # volto-clms-theme
2
+
2
3
  [![Releases](https://img.shields.io/github/v/release/eea/volto-clms-theme)](https://github.com/eea/volto-clms-theme/releases)
4
+
3
5
  [![Pipeline](https://ci.eionet.europa.eu/buildStatus/icon?job=volto-addons%2Fvolto-clms-theme%2Fmaster&subject=master)](https://ci.eionet.europa.eu/view/Github/job/volto-addons/job/volto-clms-theme/job/master/display/redirect)
6
+ [![Lines of Code](https://sonarqube.eea.europa.eu/api/project_badges/measure?project=volto-clms-theme-master&metric=ncloc)](https://sonarqube.eea.europa.eu/dashboard?id=volto-clms-theme-master)
7
+ [![Coverage](https://sonarqube.eea.europa.eu/api/project_badges/measure?project=volto-clms-theme-master&metric=coverage)](https://sonarqube.eea.europa.eu/dashboard?id=volto-clms-theme-master)
8
+ [![Bugs](https://sonarqube.eea.europa.eu/api/project_badges/measure?project=volto-clms-theme-master&metric=bugs)](https://sonarqube.eea.europa.eu/dashboard?id=volto-clms-theme-master)
9
+ [![Duplicated Lines (%)](https://sonarqube.eea.europa.eu/api/project_badges/measure?project=volto-clms-theme-master&metric=duplicated_lines_density)](https://sonarqube.eea.europa.eu/dashboard?id=volto-clms-theme-master)
10
+
4
11
  [![Pipeline](https://ci.eionet.europa.eu/buildStatus/icon?job=volto-addons%2Fvolto-clms-theme%2Fdevelop&subject=develop)](https://ci.eionet.europa.eu/view/Github/job/volto-addons/job/volto-clms-theme/job/develop/display/redirect)
12
+ [![Lines of Code](https://sonarqube.eea.europa.eu/api/project_badges/measure?project=volto-clms-theme-develop&metric=ncloc)](https://sonarqube.eea.europa.eu/dashboard?id=volto-clms-theme-develop)
13
+ [![Coverage](https://sonarqube.eea.europa.eu/api/project_badges/measure?project=volto-clms-theme-develop&metric=coverage)](https://sonarqube.eea.europa.eu/dashboard?id=volto-clms-theme-develop)
14
+ [![Bugs](https://sonarqube.eea.europa.eu/api/project_badges/measure?project=volto-clms-theme-develop&metric=bugs)](https://sonarqube.eea.europa.eu/dashboard?id=volto-clms-theme-develop)
15
+ [![Duplicated Lines (%)](https://sonarqube.eea.europa.eu/api/project_badges/measure?project=volto-clms-theme-develop&metric=duplicated_lines_density)](https://sonarqube.eea.europa.eu/dashboard?id=volto-clms-theme-develop)
5
16
 
6
17
  [Volto](https://github.com/plone/volto) add-on
7
18
 
@@ -46,6 +57,81 @@ Demo GIF
46
57
 
47
58
  1. Happy editing!
48
59
 
60
+ ## Release
61
+
62
+ ### Automatic release using Jenkins
63
+
64
+ * The automatic release is started by creating a [Pull Request](../../compare/master...develop) from `develop` to `master`. The pull request status checks correlated to the branch and PR Jenkins jobs need to be processed successfully. 1 review from a github user with rights is mandatory.
65
+ * It runs on every commit on `master` branch, which is protected from direct commits, only allowing pull request merge commits.
66
+ * The automatic release is done by [Jenkins](https://ci.eionet.europa.eu). The status of the release job can be seen both in the Readme.md badges and the green check/red cross/yellow circle near the last commit information. If you click on the icon, you will have the list of checks that were run. The `continuous-integration/jenkins/branch` link goes to the Jenkins job execution webpage.
67
+ * Automated release scripts are located in the `eeacms/gitflow` docker image, specifically [js-release.sh](https://github.com/eea/eea.docker.gitflow/blob/master/src/js-release.sh) script. It uses the `release-it` tool.
68
+ * As long as a PR request is open from develop to master, the PR Jenkins job will automatically re-create the CHANGELOG.md and package.json files to be production-ready.
69
+ * The version format must be MAJOR.MINOR.PATCH. By default, next release is set to next minor version (with patch 0).
70
+ * You can manually change the version in `package.json`. The new version must not be already present in the tags/releases of the repository, otherwise it will be automatically increased by the script. Any changes to the version will trigger a `CHANGELOG.md` re-generation.
71
+ * Automated commits and commits with [JENKINS] or [YARN] in the commit log are excluded from `CHANGELOG.md` file.
72
+
73
+ ### Manual release from the develop branch ( beta release )
74
+
75
+ #### Installation and configuration of release-it
76
+
77
+ You need to first install the [release-it](https://github.com/release-it/release-it) client.
78
+
79
+ ```
80
+ npm install -g release-it
81
+ ```
82
+
83
+ Release-it uses the configuration written in the [`.release-it.json`](./.release-it.json) file located in the root of the repository.
84
+
85
+ Release-it is a tool that automates 4 important steps in the release process:
86
+
87
+ 1. Version increase in `package.json` ( increased from the current version in `package.json`)
88
+ 2. `CHANGELOG.md` automatic generation from commit messages ( grouped by releases )
89
+ 3. GitHub release on the commit with the changelog and package.json modification on the develop branch
90
+ 4. NPM release ( by default it's disabled, but can be enabled in the configuration file )
91
+
92
+ To configure the authentification, you need to export GITHUB_TOKEN for [GitHub](https://github.com/settings/tokens)
93
+
94
+ ```
95
+ export GITHUB_TOKEN=XXX-XXXXXXXXXXXXXXXXXXXXXX
96
+ ```
97
+
98
+ To configure npm, you can use the `npm login` command or use a configuration file with a TOKEN :
99
+
100
+ ```
101
+ echo "//registry.npmjs.org/:_authToken=YYYYYYYYYYYYYYYYYYYYYYYYYYYYYY" > .npmrc
102
+ ```
103
+
104
+ #### Using release-it tool
105
+
106
+ There are 3 yarn scripts that can be run to do the release
107
+
108
+ ##### yarn release-beta
109
+
110
+ Automatically calculates and presents 3 beta versions - patch, minor and major for you to choose ( or Other for manual input).
111
+
112
+ ```
113
+ ? Select increment (next version):
114
+ ❯ prepatch (0.1.1-beta.0)
115
+ preminor (0.2.0-beta.0)
116
+ premajor (1.0.0-beta.0)
117
+ Other, please specify...
118
+ ```
119
+
120
+ ##### yarn release-major-beta
121
+
122
+ Same as `yarn release-beta`, but with premajor version pre-selected.
123
+
124
+ ##### yarn release
125
+
126
+ Generic command, does not automatically add the `beta` to version, but you can still manually write it if you choose Other.
127
+
128
+ #### Important notes
129
+
130
+ > Do not use release-it tool on master branch, the commit on CHANGELOG.md file and the version increase in the package.json file can't be done without a PULL REQUEST.
131
+
132
+ > Do not keep Pull Requests from develop to master branches open when you are doing beta releases from the develop branch. As long as a PR to master is open, an automatic script will run on every commit and will update both the version and the changelog to a production-ready state - ( MAJOR.MINOR.PATCH mandatory format for version).
133
+
134
+
49
135
  ## How to contribute
50
136
 
51
137
  See [DEVELOP.md](https://github.com/eea/volto-clms-theme/blob/master/DEVELOP.md).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-clms-theme",
3
- "version": "1.0.48",
3
+ "version": "1.0.49",
4
4
  "description": "volto-clms-theme: Volto theme for CLMS site",
5
5
  "main": "src/index.js",
6
6
  "author": "CodeSyntax for the European Environment Agency",
@@ -105,6 +105,8 @@
105
105
  },
106
106
  "scripts": {
107
107
  "release": "release-it",
108
+ "release-major-beta": "release-it major --preRelease=beta",
109
+ "release-beta": "release-it --preRelease=beta",
108
110
  "bootstrap": "npm install -g ejs; npm link ejs; node bootstrap",
109
111
  "stylelint": "../../../node_modules/stylelint/bin/stylelint.js --allow-empty-input 'src/**/*.{css,less}'",
110
112
  "stylelint:theme": "../../../node_modules/stylelint/bin/stylelint.js --allow-empty-input 'theme/**/*.{css,less}'",
@@ -64,16 +64,34 @@ const MetadataContent = (data) => {
64
64
  <CclInfoDescription
65
65
  title="Keywords"
66
66
  tooltip=""
67
- description={data?.keywords.map((keyword) => {
68
- return <Label color="olive">{keyword}</Label>;
69
- })}
67
+ description={
68
+ <Label.Group>
69
+ {data?.keywords.map((keyword, key) => {
70
+ return (
71
+ <Label key={key} color="olive">
72
+ {keyword}
73
+ </Label>
74
+ );
75
+ })}
76
+ </Label.Group>
77
+ }
70
78
  />
71
79
  )}
72
- {data?.geographicCoverage && (
80
+ {data?.geographicCoverage?.geolocation && (
73
81
  <CclInfoDescription
74
82
  title="Geographic coverage"
75
83
  tooltip=""
76
- description={JSON.stringify(data?.geographicCoverage)}
84
+ description={
85
+ <Label.Group>
86
+ {data?.geographicCoverage?.geolocation.map((location, key) => {
87
+ return (
88
+ <Label key={key} color="olive">
89
+ {location.label}
90
+ </Label>
91
+ );
92
+ })}
93
+ </Label.Group>
94
+ }
77
95
  />
78
96
  )}
79
97
  {data?.accessAndUseLimitationPublic_line && (
@@ -100,10 +118,16 @@ const MetadataContent = (data) => {
100
118
  title="Topic of Category"
101
119
  tooltip=""
102
120
  description={
103
- data?.classificationTopicCategory &&
104
- data?.classificationTopicCategory.map((topic) => {
105
- return <Label color="olive">{topic.title}</Label>;
106
- })
121
+ <Label.Group>
122
+ {data?.classificationTopicCategory &&
123
+ data?.classificationTopicCategory.map((topic, key) => {
124
+ return (
125
+ <Label key={key} color="olive">
126
+ {topic.title}
127
+ </Label>
128
+ );
129
+ })}
130
+ </Label.Group>
107
131
  }
108
132
  />
109
133
  )}
@@ -121,10 +145,16 @@ const MetadataContent = (data) => {
121
145
  title="Temporal Extent"
122
146
  tooltip=""
123
147
  description={
124
- data?.temporalCoverage &&
125
- data?.temporalCoverage.map((year) => {
126
- return <Label color="olive">{year}</Label>;
127
- })
148
+ <Label.Group>
149
+ {data?.temporalCoverage &&
150
+ data?.temporalCoverage.map((year, key) => {
151
+ return (
152
+ <Label key={key} color="olive">
153
+ {year}
154
+ </Label>
155
+ );
156
+ })}
157
+ </Label.Group>
128
158
  }
129
159
  />
130
160
  )}
@@ -162,10 +192,18 @@ const MetadataContent = (data) => {
162
192
  title="Coordinate Reference System"
163
193
  tooltip="CRS of the resource"
164
194
  description={
165
- data?.coordinateReferenceSystemList &&
166
- data?.coordinateReferenceSystemList.map((reference) => {
167
- return <Label color="olive">{reference}</Label>;
168
- })
195
+ <Label.Group>
196
+ {data?.coordinateReferenceSystemList &&
197
+ data?.coordinateReferenceSystemList.map(
198
+ (reference, key) => {
199
+ return (
200
+ <Label key={key} color="olive">
201
+ {reference}
202
+ </Label>
203
+ );
204
+ },
205
+ )}
206
+ </Label.Group>
169
207
  }
170
208
  />
171
209
  </CclInfoContainer>
@@ -179,11 +217,11 @@ const MetadataContent = (data) => {
179
217
  <StringToHTML string={data?.conformitySpecification?.data} />
180
218
  }
181
219
  />
182
- {data?.conformityPass && (
220
+ {data?.conformityPass?.title && (
183
221
  <CclInfoDescription
184
222
  title="Pass"
185
223
  tooltip=""
186
- description={data?.conformityPass}
224
+ description={data?.conformityPass?.title}
187
225
  />
188
226
  )}
189
227
  <CclInfoDescription
@@ -49,7 +49,7 @@ function CclCard(props) {
49
49
  <div className="card-block-image">
50
50
  <img
51
51
  src={
52
- card?.image?.scales?.preview ||
52
+ card?.image?.scales?.preview?.download ||
53
53
  card?.image?.download ||
54
54
  'https://eu-copernicus.github.io/copernicus-component-library/assets/images/image_placeholder.jpg'
55
55
  }