@eeacms/volto-editing-progress 0.2.2 → 0.3.0
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/.husky/pre-commit +2 -0
- package/CHANGELOG.md +52 -2
- package/DEVELOP.md +60 -5
- package/README.md +14 -93
- package/RELEASE.md +74 -0
- package/cypress.config.js +1 -1
- package/docker-compose.yml +32 -0
- package/locales/de/LC_MESSAGES/volto.po +27 -0
- package/locales/en/LC_MESSAGES/volto.po +27 -0
- package/locales/it/LC_MESSAGES/volto.po +27 -0
- package/locales/ro/LC_MESSAGES/volto.po +27 -0
- package/locales/volto.pot +29 -0
- package/package.json +38 -10
- package/src/EditingProgress.jsx +0 -1
- package/src/TextareaJSONWidget.jsx +25 -19
- package/src/VisualJSONWidget.jsx +246 -0
- package/src/VisualWidget.test.js +51 -0
- package/src/WidgetDataComponent.jsx +187 -0
- package/src/WidgetSidebar.jsx +88 -0
- package/src/actionTypes/index.js +1 -0
- package/src/actions/index.js +12 -2
- package/src/index.js +5 -4
- package/src/less/editor.less +12 -0
- package/src/reducers/index.js +44 -1
- package/src/schema.js +27 -0
- package/.i18n.babel.config.js +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,58 @@ 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
|
+
### [0.3.0](https://github.com/eea/volto-editing-progress/compare/0.2.3...0.3.0) - 18 October 2023
|
|
8
|
+
|
|
9
|
+
#### :rocket: New Features
|
|
10
|
+
|
|
11
|
+
- feat: dynamically fetching states [Narcis2005 - [`57f2ef1`](https://github.com/eea/volto-editing-progress/commit/57f2ef1224609d374b0dd009d3d7956ddc106a10)]
|
|
12
|
+
- feat: changed dropdown labels [Narcis2005 - [`b62fd58`](https://github.com/eea/volto-editing-progress/commit/b62fd58133357f6849d5b7805b01d6316a4a605b)]
|
|
13
|
+
- feat: added sidebar search and fixed deleting bug [Narcis2005 - [`cc325e0`](https://github.com/eea/volto-editing-progress/commit/cc325e06d59f455a13b44199c5edd03b2ea51ce2)]
|
|
14
|
+
- feat: implement visual widget solved bug in auto-populating inputs [Narcis2005 - [`ed14af8`](https://github.com/eea/volto-editing-progress/commit/ed14af83d8ed042fcc2df7e8eeb40d4758c95999)]
|
|
15
|
+
- feat: implement visual widget checkpoint 2 [Narcis2005 - [`3e89f57`](https://github.com/eea/volto-editing-progress/commit/3e89f57c4c10e75b252c30038a9d81bc78d9f5f4)]
|
|
16
|
+
- feat: implement visual widget checkpoint 1 [Narcis2005 - [`682b3c0`](https://github.com/eea/volto-editing-progress/commit/682b3c0a8ff46edf6611edb0e1547a0758eb0dcb)]
|
|
17
|
+
|
|
18
|
+
#### :house: Internal changes
|
|
19
|
+
|
|
20
|
+
- chore: husky, lint-staged use fixed versions [valentinab25 - [`683ee28`](https://github.com/eea/volto-editing-progress/commit/683ee28cef19a185ba6ab681d184cf6386513d3d)]
|
|
21
|
+
- chore:volto 16 in tests, update docs, fix stylelint overrides [valentinab25 - [`a7d9ffe`](https://github.com/eea/volto-editing-progress/commit/a7d9ffe0e43b7e2ad6108abd46b613f6760775c0)]
|
|
22
|
+
- chore: change volto version in Jenkinsfile [ana-oprea - [`4f33151`](https://github.com/eea/volto-editing-progress/commit/4f3315126d0d646555eff0f4224221080fbebab9)]
|
|
23
|
+
- chore: i18n update [Alin Voinea - [`37aca8c`](https://github.com/eea/volto-editing-progress/commit/37aca8c427e76082a3afe596ef27220e7adfe978)]
|
|
24
|
+
- style: Fix eslint, prettier [Alin Voinea - [`0f9fb23`](https://github.com/eea/volto-editing-progress/commit/0f9fb232de26e5e14e1e5c023b5f23185ccc7815)]
|
|
25
|
+
- style: lint-staged reorder in package.json [Alin Voinea - [`fa8b355`](https://github.com/eea/volto-editing-progress/commit/fa8b355ab801d0f5ef031766e3771484251d3d42)]
|
|
26
|
+
- style: Fix eslint, prettier [Alin Voinea - [`438aeed`](https://github.com/eea/volto-editing-progress/commit/438aeedb3053d3f4acc40eea2c24d77246bba704)]
|
|
27
|
+
|
|
28
|
+
#### :house: Documentation changes
|
|
29
|
+
|
|
30
|
+
- docs: Update README and DEVELOP [Alin Voinea - [`5ca39d5`](https://github.com/eea/volto-editing-progress/commit/5ca39d5c8245872287916717e788d5f1fa229d27)]
|
|
31
|
+
- docs: Update README and DEVELOP [Alin Voinea - [`a4a82eb`](https://github.com/eea/volto-editing-progress/commit/a4a82eb797d82dee5e80faff86db6c32dbc2ef52)]
|
|
32
|
+
|
|
33
|
+
#### :hammer_and_wrench: Others
|
|
34
|
+
|
|
35
|
+
- test: change e2e test [ana-oprea - [`dfccc68`](https://github.com/eea/volto-editing-progress/commit/dfccc68e17abe6c9dd15bbc70d31ce0273df2398)]
|
|
36
|
+
- test: change e2e test [ana-oprea - [`00066d5`](https://github.com/eea/volto-editing-progress/commit/00066d50dc3a2e42c31f50bde3c4ebbf285bf466)]
|
|
37
|
+
- test: change e2e test [ana-oprea - [`2a842ec`](https://github.com/eea/volto-editing-progress/commit/2a842ecadaa9d1b9d8bdbb3e9f11ff0d40187a6d)]
|
|
38
|
+
- test: change e2e test [ana-oprea - [`6d3fe3d`](https://github.com/eea/volto-editing-progress/commit/6d3fe3d3618b4863958144370642f9330e681da6)]
|
|
39
|
+
- test: increase cypress timeout [ana-oprea - [`6cee41d`](https://github.com/eea/volto-editing-progress/commit/6cee41d76648101ac7701f647911c3a717f42275)]
|
|
40
|
+
- test: Update failing snapshots [Alin Voinea - [`c1b022f`](https://github.com/eea/volto-editing-progress/commit/c1b022f39c9ff8ee1f6a9732eb2ba7f58b7e8492)]
|
|
41
|
+
- test: remade interface in accordion style and accommodated tests [Chirilov Narcis - [`2cc87f5`](https://github.com/eea/volto-editing-progress/commit/2cc87f5456cf9610be6c883877b4ec87e5613ede)]
|
|
42
|
+
- test: EN locales, pre-commit fix, feature PRs checks Refs #257193 [valentinab25 - [`59236c9`](https://github.com/eea/volto-editing-progress/commit/59236c9381b5d1f2059086d1f61823a1ec2309b0)]
|
|
43
|
+
- Release 0.3.0 [Alin Voinea - [`21d325a`](https://github.com/eea/volto-editing-progress/commit/21d325a8f265c21fb3bf78a5ad2fe037aa86040e)]
|
|
44
|
+
- new feature [Narcis2005 - [`d981603`](https://github.com/eea/volto-editing-progress/commit/d981603df4204eab8a650df92521201a299ea75e)]
|
|
45
|
+
- more refactoring [Narcis2005 - [`28cfc60`](https://github.com/eea/volto-editing-progress/commit/28cfc6021b4ee328cecbef285b9ed2296891c7e9)]
|
|
46
|
+
- refactoring [Narcis2005 - [`8dc569c`](https://github.com/eea/volto-editing-progress/commit/8dc569cf2b21a7528a77ee55881b56c11a4ad3c6)]
|
|
47
|
+
### [0.2.3](https://github.com/eea/volto-editing-progress/compare/0.2.2...0.2.3) - 30 August 2023
|
|
48
|
+
|
|
49
|
+
#### :house: Documentation changes
|
|
50
|
+
|
|
51
|
+
- docs: add demo gif - refs #253277 [ana-oprea - [`a42702f`](https://github.com/eea/volto-editing-progress/commit/a42702f0a101694e699f79bf864fd264e6d753a0)]
|
|
52
|
+
- docs: Cleanup Makefile, update DEVELOP documentation, i18n - refs #254894 [valentinab25 - [`1371828`](https://github.com/eea/volto-editing-progress/commit/1371828670a3ccf59a79e19673282d3e17bd1ae1)]
|
|
53
|
+
|
|
54
|
+
#### :hammer_and_wrench: Others
|
|
55
|
+
|
|
56
|
+
- test: Fix package.json scripts to use makefile [Alin Voinea - [`0bd609b`](https://github.com/eea/volto-editing-progress/commit/0bd609b8007a86bd5908a2742048eb7a1580eb5e)]
|
|
57
|
+
- i18n: Add en [Alin Voinea - [`401d698`](https://github.com/eea/volto-editing-progress/commit/401d69829f547362209afbecacb3842788e123f7)]
|
|
58
|
+
- test: Update Makefile and docker-compose to align it with Jenkinsfile [valentinab25 - [`5bef992`](https://github.com/eea/volto-editing-progress/commit/5bef9923d23f7131f49ec393ce1581dfb3a24d2a)]
|
|
7
59
|
### [0.2.2](https://github.com/eea/volto-editing-progress/compare/0.2.1...0.2.2) - 24 July 2023
|
|
8
60
|
|
|
9
61
|
#### :hammer_and_wrench: Others
|
|
@@ -26,7 +78,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
26
78
|
|
|
27
79
|
#### :house: Internal changes
|
|
28
80
|
|
|
29
|
-
- chore: [JENKINS] Remove alpha testing version [valentinab25 - [`e1331b0`](https://github.com/eea/volto-editing-progress/commit/e1331b0128e01b2dce90ca2ba74a168d23063896)]
|
|
30
81
|
|
|
31
82
|
#### :hammer_and_wrench: Others
|
|
32
83
|
|
|
@@ -41,7 +92,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
41
92
|
#### :hammer_and_wrench: Others
|
|
42
93
|
|
|
43
94
|
- Refs #142010 - Optimize Volto-addons gitflow pipelines [valentinab25 - [`ecaea55`](https://github.com/eea/volto-editing-progress/commit/ecaea55e1987fdcf4228075fa05414f71922ba0c)]
|
|
44
|
-
- Add Sonarqube tag using ims-frontend addons list [EEA Jenkins - [`3d7f5f4`](https://github.com/eea/volto-editing-progress/commit/3d7f5f42e4c2046a5cf25ffcfb6a7d846063eedf)]
|
|
45
95
|
### [0.1.5](https://github.com/eea/volto-editing-progress/compare/0.1.4...0.1.5) - 24 June 2021
|
|
46
96
|
|
|
47
97
|
#### :hammer_and_wrench: Others
|
package/DEVELOP.md
CHANGED
|
@@ -2,6 +2,30 @@
|
|
|
2
2
|
|
|
3
3
|
## Develop
|
|
4
4
|
|
|
5
|
+
1. Make sure you have `docker` and `docker compose` installed and running on your machine:
|
|
6
|
+
|
|
7
|
+
```Bash
|
|
8
|
+
git clone https://github.com/eea/volto-editing-progress.git
|
|
9
|
+
cd volto-editing-progress
|
|
10
|
+
git checkout -b bugfix-123456 develop
|
|
11
|
+
make
|
|
12
|
+
make start
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
1. Wait for `Volto started at 0.0.0.0:3000` meesage
|
|
16
|
+
|
|
17
|
+
1. Go to http://localhost:3000
|
|
18
|
+
|
|
19
|
+
1. Initialize git hooks
|
|
20
|
+
|
|
21
|
+
```Bash
|
|
22
|
+
yarn prepare
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
1. Happy hacking!
|
|
26
|
+
|
|
27
|
+
### Or add @eeacms/volto-editing-progress to your Volto project
|
|
28
|
+
|
|
5
29
|
Before starting make sure your development environment is properly set. See [Volto Developer Documentation](https://docs.voltocms.com/getting-started/install/)
|
|
6
30
|
|
|
7
31
|
1. Make sure you have installed `yo`, `@plone/generator-volto` and `mrs-developer`
|
|
@@ -26,18 +50,15 @@ Before starting make sure your development environment is properly set. See [Vol
|
|
|
26
50
|
|
|
27
51
|
1. Install
|
|
28
52
|
|
|
29
|
-
|
|
53
|
+
make develop
|
|
30
54
|
yarn
|
|
31
55
|
|
|
32
56
|
1. Start backend
|
|
33
57
|
|
|
34
|
-
docker pull plone
|
|
35
|
-
docker run -d --name plone -p 8080:8080 -e SITE=Plone -e PROFILES="profile-plone.restapi:blocks" plone
|
|
58
|
+
docker run --pull always -it --rm --name plone -p 8080:8080 -e SITE=Plone plone/plone-backend
|
|
36
59
|
|
|
37
60
|
...wait for backend to setup and start - `Ready to handle requests`:
|
|
38
61
|
|
|
39
|
-
docker logs -f plone
|
|
40
|
-
|
|
41
62
|
...you can also check http://localhost:8080/Plone
|
|
42
63
|
|
|
43
64
|
1. Start frontend
|
|
@@ -49,3 +70,37 @@ Before starting make sure your development environment is properly set. See [Vol
|
|
|
49
70
|
1. Happy hacking!
|
|
50
71
|
|
|
51
72
|
cd src/addons/volto-editing-progress/
|
|
73
|
+
|
|
74
|
+
## Cypress
|
|
75
|
+
|
|
76
|
+
To run cypress locally, first make sure you don't have any Volto/Plone running on ports `8080` and `3000`.
|
|
77
|
+
|
|
78
|
+
You don't have to be in a `clean-volto-project`, you can be in any Volto Frontend
|
|
79
|
+
project where you added `volto-editing-progress` to `mrs.developer.json`
|
|
80
|
+
|
|
81
|
+
Go to:
|
|
82
|
+
|
|
83
|
+
```BASH
|
|
84
|
+
cd src/addons/volto-editing-progress/
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
Start:
|
|
88
|
+
|
|
89
|
+
```Bash
|
|
90
|
+
make
|
|
91
|
+
make start
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
This will build and start with Docker a clean `Plone backend` and `Volto Frontend` with `volto-editing-progress` block installed.
|
|
95
|
+
|
|
96
|
+
Open Cypress Interface:
|
|
97
|
+
|
|
98
|
+
```Bash
|
|
99
|
+
make cypress-open
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Or run it:
|
|
103
|
+
|
|
104
|
+
```Bash
|
|
105
|
+
make cypress-run
|
|
106
|
+
```
|
package/README.md
CHANGED
|
@@ -14,41 +14,33 @@
|
|
|
14
14
|
[](https://sonarqube.eea.europa.eu/dashboard?id=volto-editing-progress-develop)
|
|
15
15
|
[](https://sonarqube.eea.europa.eu/dashboard?id=volto-editing-progress-develop)
|
|
16
16
|
|
|
17
|
-
|
|
18
17
|
[Volto](https://github.com/plone/volto) add-on: Editing progress
|
|
19
18
|
|
|
20
19
|
## Features
|
|
21
20
|
|
|
22
21
|
Document Editing progress bar in Volto
|
|
23
22
|
|
|
23
|
+

|
|
24
|
+
|
|
24
25
|
## Getting started
|
|
25
26
|
|
|
26
27
|
### Try volto-editing-progress with Docker
|
|
27
28
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
docker pull plone/volto
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
1. Start Plone backend
|
|
36
|
-
```
|
|
37
|
-
docker run -d --name plone -p 8080:8080 -e SITE=Plone -e PROFILES="profile-plone.restapi:blocks" plone
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
1. Start Volto frontend
|
|
41
|
-
|
|
42
|
-
```
|
|
43
|
-
docker run -it --rm -p 3000:3000 --link plone -e ADDONS="@eeacms/volto-editing-progress" plone/volto
|
|
44
|
-
```
|
|
29
|
+
git clone https://github.com/eea/volto-editing-progress.git
|
|
30
|
+
cd volto-editing-progress
|
|
31
|
+
make
|
|
32
|
+
make start
|
|
45
33
|
|
|
46
|
-
|
|
34
|
+
Go to http://localhost:3000
|
|
47
35
|
|
|
48
36
|
### Add volto-editing-progress to your Volto project
|
|
49
37
|
|
|
50
38
|
1. Make sure you have a [Plone backend](https://plone.org/download) up-and-running at http://localhost:8080/Plone
|
|
51
39
|
|
|
40
|
+
```Bash
|
|
41
|
+
docker compose up backend
|
|
42
|
+
```
|
|
43
|
+
|
|
52
44
|
1. Start Volto frontend
|
|
53
45
|
|
|
54
46
|
* If you already have a volto project, just update `package.json`:
|
|
@@ -59,7 +51,7 @@ Document Editing progress bar in Volto
|
|
|
59
51
|
],
|
|
60
52
|
|
|
61
53
|
"dependencies": {
|
|
62
|
-
"@eeacms/volto-editing-progress": "
|
|
54
|
+
"@eeacms/volto-editing-progress": "*"
|
|
63
55
|
}
|
|
64
56
|
```
|
|
65
57
|
|
|
@@ -67,7 +59,7 @@ Document Editing progress bar in Volto
|
|
|
67
59
|
|
|
68
60
|
```
|
|
69
61
|
npm install -g yo @plone/generator-volto
|
|
70
|
-
yo @plone/volto my-volto-project --addon @eeacms/volto-editing-progress
|
|
62
|
+
yo @plone/volto my-volto-project --canary --addon @eeacms/volto-editing-progress
|
|
71
63
|
cd my-volto-project
|
|
72
64
|
```
|
|
73
65
|
|
|
@@ -84,78 +76,7 @@ Document Editing progress bar in Volto
|
|
|
84
76
|
|
|
85
77
|
## Release
|
|
86
78
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
* 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.
|
|
90
|
-
* It runs on every commit on `master` branch, which is protected from direct commits, only allowing pull request merge commits.
|
|
91
|
-
* 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.
|
|
92
|
-
* 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.
|
|
93
|
-
* 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.
|
|
94
|
-
* The version format must be MAJOR.MINOR.PATCH. By default, next release is set to next minor version (with patch 0).
|
|
95
|
-
* 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.
|
|
96
|
-
* Automated commits and commits with [JENKINS] or [YARN] in the commit log are excluded from `CHANGELOG.md` file.
|
|
97
|
-
|
|
98
|
-
### Manual release from the develop branch ( beta release )
|
|
99
|
-
|
|
100
|
-
#### Installation and configuration of release-it
|
|
101
|
-
|
|
102
|
-
You need to first install the [release-it](https://github.com/release-it/release-it) client.
|
|
103
|
-
|
|
104
|
-
```
|
|
105
|
-
npm install -g release-it
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
Release-it uses the configuration written in the [`.release-it.json`](./.release-it.json) file located in the root of the repository.
|
|
109
|
-
|
|
110
|
-
Release-it is a tool that automates 4 important steps in the release process:
|
|
111
|
-
|
|
112
|
-
1. Version increase in `package.json` ( increased from the current version in `package.json`)
|
|
113
|
-
2. `CHANGELOG.md` automatic generation from commit messages ( grouped by releases )
|
|
114
|
-
3. GitHub release on the commit with the changelog and package.json modification on the develop branch
|
|
115
|
-
4. NPM release ( by default it's disabled, but can be enabled in the configuration file )
|
|
116
|
-
|
|
117
|
-
To configure the authentification, you need to export GITHUB_TOKEN for [GitHub](https://github.com/settings/tokens)
|
|
118
|
-
|
|
119
|
-
```
|
|
120
|
-
export GITHUB_TOKEN=XXX-XXXXXXXXXXXXXXXXXXXXXX
|
|
121
|
-
```
|
|
122
|
-
|
|
123
|
-
To configure npm, you can use the `npm login` command or use a configuration file with a TOKEN :
|
|
124
|
-
|
|
125
|
-
```
|
|
126
|
-
echo "//registry.npmjs.org/:_authToken=YYYYYYYYYYYYYYYYYYYYYYYYYYYYYY" > .npmrc
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
#### Using release-it tool
|
|
130
|
-
|
|
131
|
-
There are 3 yarn scripts that can be run to do the release
|
|
132
|
-
|
|
133
|
-
##### yarn release-beta
|
|
134
|
-
|
|
135
|
-
Automatically calculates and presents 3 beta versions - patch, minor and major for you to choose ( or Other for manual input).
|
|
136
|
-
|
|
137
|
-
```
|
|
138
|
-
? Select increment (next version):
|
|
139
|
-
❯ prepatch (0.1.1-beta.0)
|
|
140
|
-
preminor (0.2.0-beta.0)
|
|
141
|
-
premajor (1.0.0-beta.0)
|
|
142
|
-
Other, please specify...
|
|
143
|
-
```
|
|
144
|
-
|
|
145
|
-
##### yarn release-major-beta
|
|
146
|
-
|
|
147
|
-
Same as `yarn release-beta`, but with premajor version pre-selected.
|
|
148
|
-
|
|
149
|
-
##### yarn release
|
|
150
|
-
|
|
151
|
-
Generic command, does not automatically add the `beta` to version, but you can still manually write it if you choose Other.
|
|
152
|
-
|
|
153
|
-
#### Important notes
|
|
154
|
-
|
|
155
|
-
> 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.
|
|
156
|
-
|
|
157
|
-
> 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).
|
|
158
|
-
|
|
79
|
+
See [RELEASE.md](https://github.com/eea/volto-editing-progress/blob/master/RELEASE.md).
|
|
159
80
|
|
|
160
81
|
## How to contribute
|
|
161
82
|
|
package/RELEASE.md
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
## Release
|
|
2
|
+
|
|
3
|
+
### Automatic release using Jenkins
|
|
4
|
+
|
|
5
|
+
* 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.
|
|
6
|
+
* It runs on every commit on `master` branch, which is protected from direct commits, only allowing pull request merge commits.
|
|
7
|
+
* 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.
|
|
8
|
+
* 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.
|
|
9
|
+
* 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.
|
|
10
|
+
* The version format must be MAJOR.MINOR.PATCH. By default, next release is set to next minor version (with patch 0).
|
|
11
|
+
* 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.
|
|
12
|
+
* Automated commits and commits with [JENKINS] or [YARN] in the commit log are excluded from `CHANGELOG.md` file.
|
|
13
|
+
|
|
14
|
+
### Manual release from the develop branch ( beta release )
|
|
15
|
+
|
|
16
|
+
#### Installation and configuration of release-it
|
|
17
|
+
|
|
18
|
+
You need to first install the [release-it](https://github.com/release-it/release-it) client.
|
|
19
|
+
|
|
20
|
+
```
|
|
21
|
+
npm install -g release-it
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Release-it uses the configuration written in the [`.release-it.json`](./.release-it.json) file located in the root of the repository.
|
|
25
|
+
|
|
26
|
+
Release-it is a tool that automates 4 important steps in the release process:
|
|
27
|
+
|
|
28
|
+
1. Version increase in `package.json` ( increased from the current version in `package.json`)
|
|
29
|
+
2. `CHANGELOG.md` automatic generation from commit messages ( grouped by releases )
|
|
30
|
+
3. GitHub release on the commit with the changelog and package.json modification on the develop branch
|
|
31
|
+
4. NPM release ( by default it's disabled, but can be enabled in the configuration file )
|
|
32
|
+
|
|
33
|
+
To configure the authentification, you need to export GITHUB_TOKEN for [GitHub](https://github.com/settings/tokens)
|
|
34
|
+
|
|
35
|
+
```
|
|
36
|
+
export GITHUB_TOKEN=XXX-XXXXXXXXXXXXXXXXXXXXXX
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
To configure npm, you can use the `npm login` command or use a configuration file with a TOKEN :
|
|
40
|
+
|
|
41
|
+
```
|
|
42
|
+
echo "//registry.npmjs.org/:_authToken=YYYYYYYYYYYYYYYYYYYYYYYYYYYYYY" > .npmrc
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
#### Using release-it tool
|
|
46
|
+
|
|
47
|
+
There are 3 yarn scripts that can be run to do the release
|
|
48
|
+
|
|
49
|
+
##### yarn release-beta
|
|
50
|
+
|
|
51
|
+
Automatically calculates and presents 3 beta versions - patch, minor and major for you to choose ( or Other for manual input).
|
|
52
|
+
|
|
53
|
+
```
|
|
54
|
+
? Select increment (next version):
|
|
55
|
+
❯ prepatch (0.1.1-beta.0)
|
|
56
|
+
preminor (0.2.0-beta.0)
|
|
57
|
+
premajor (1.0.0-beta.0)
|
|
58
|
+
Other, please specify...
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
##### yarn release-major-beta
|
|
62
|
+
|
|
63
|
+
Same as `yarn release-beta`, but with premajor version pre-selected.
|
|
64
|
+
|
|
65
|
+
##### yarn release
|
|
66
|
+
|
|
67
|
+
Generic command, does not automatically add the `beta` to version, but you can still manually write it if you choose Other.
|
|
68
|
+
|
|
69
|
+
#### Important notes
|
|
70
|
+
|
|
71
|
+
> 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.
|
|
72
|
+
|
|
73
|
+
> 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).
|
|
74
|
+
|
package/cypress.config.js
CHANGED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
version: "3"
|
|
2
|
+
services:
|
|
3
|
+
backend:
|
|
4
|
+
image: eeacms/plone-backend
|
|
5
|
+
ports:
|
|
6
|
+
- "8080:8080"
|
|
7
|
+
environment:
|
|
8
|
+
SITE: "Plone"
|
|
9
|
+
PROFILES: "eea.kitkat:testing"
|
|
10
|
+
|
|
11
|
+
frontend:
|
|
12
|
+
build:
|
|
13
|
+
context: ./
|
|
14
|
+
dockerfile: ./Dockerfile
|
|
15
|
+
args:
|
|
16
|
+
ADDON_NAME: "${ADDON_NAME}"
|
|
17
|
+
ADDON_PATH: "${ADDON_PATH}"
|
|
18
|
+
VOLTO_VERSION: ${VOLTO_VERSION:-16}
|
|
19
|
+
ports:
|
|
20
|
+
- "3000:3000"
|
|
21
|
+
- "3001:3001"
|
|
22
|
+
depends_on:
|
|
23
|
+
- backend
|
|
24
|
+
volumes:
|
|
25
|
+
- ./:/app/src/addons/${ADDON_PATH}
|
|
26
|
+
environment:
|
|
27
|
+
CI: "true"
|
|
28
|
+
NODE_ENV: "development"
|
|
29
|
+
RAZZLE_JEST_CONFIG: "src/addons/${ADDON_PATH}/jest-addon.config.js"
|
|
30
|
+
RAZZLE_INTERNAL_API_PATH: "http://backend:8080/Plone"
|
|
31
|
+
RAZZLE_DEV_PROXY_API_PATH: "http://backend:8080/Plone"
|
|
32
|
+
HOST: "0.0.0.0"
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
msgid ""
|
|
2
|
+
msgstr ""
|
|
3
|
+
"Project-Id-Version: \n"
|
|
4
|
+
"Report-Msgid-Bugs-To: \n"
|
|
5
|
+
"POT-Creation-Date: \n"
|
|
6
|
+
"PO-Revision-Date: \n"
|
|
7
|
+
"Last-Translator: \n"
|
|
8
|
+
"Language: \n"
|
|
9
|
+
"Language-Team: \n"
|
|
10
|
+
"Content-Type: \n"
|
|
11
|
+
"Content-Transfer-Encoding: \n"
|
|
12
|
+
"Plural-Forms: \n"
|
|
13
|
+
|
|
14
|
+
#: VisualJSONWidget
|
|
15
|
+
# defaultMessage: Edit JSON
|
|
16
|
+
msgid "Edit JSON"
|
|
17
|
+
msgstr ""
|
|
18
|
+
|
|
19
|
+
#: schema
|
|
20
|
+
# defaultMessage: JSON code
|
|
21
|
+
msgid "JSON code"
|
|
22
|
+
msgstr ""
|
|
23
|
+
|
|
24
|
+
#: TextareaJSONWidget
|
|
25
|
+
# defaultMessage: Please enter valid JSON!
|
|
26
|
+
msgid "Please enter valid JSON!"
|
|
27
|
+
msgstr ""
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
msgid ""
|
|
2
|
+
msgstr ""
|
|
3
|
+
"Project-Id-Version: \n"
|
|
4
|
+
"Report-Msgid-Bugs-To: \n"
|
|
5
|
+
"POT-Creation-Date: \n"
|
|
6
|
+
"PO-Revision-Date: \n"
|
|
7
|
+
"Last-Translator: \n"
|
|
8
|
+
"Language: \n"
|
|
9
|
+
"Language-Team: \n"
|
|
10
|
+
"Content-Type: \n"
|
|
11
|
+
"Content-Transfer-Encoding: \n"
|
|
12
|
+
"Plural-Forms: \n"
|
|
13
|
+
|
|
14
|
+
#: VisualJSONWidget
|
|
15
|
+
# defaultMessage: Edit JSON
|
|
16
|
+
msgid "Edit JSON"
|
|
17
|
+
msgstr ""
|
|
18
|
+
|
|
19
|
+
#: schema
|
|
20
|
+
# defaultMessage: JSON code
|
|
21
|
+
msgid "JSON code"
|
|
22
|
+
msgstr ""
|
|
23
|
+
|
|
24
|
+
#: TextareaJSONWidget
|
|
25
|
+
# defaultMessage: Please enter valid JSON!
|
|
26
|
+
msgid "Please enter valid JSON!"
|
|
27
|
+
msgstr ""
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
msgid ""
|
|
2
|
+
msgstr ""
|
|
3
|
+
"Project-Id-Version: \n"
|
|
4
|
+
"Report-Msgid-Bugs-To: \n"
|
|
5
|
+
"POT-Creation-Date: \n"
|
|
6
|
+
"PO-Revision-Date: \n"
|
|
7
|
+
"Last-Translator: \n"
|
|
8
|
+
"Language: \n"
|
|
9
|
+
"Language-Team: \n"
|
|
10
|
+
"Content-Type: \n"
|
|
11
|
+
"Content-Transfer-Encoding: \n"
|
|
12
|
+
"Plural-Forms: \n"
|
|
13
|
+
|
|
14
|
+
#: VisualJSONWidget
|
|
15
|
+
# defaultMessage: Edit JSON
|
|
16
|
+
msgid "Edit JSON"
|
|
17
|
+
msgstr ""
|
|
18
|
+
|
|
19
|
+
#: schema
|
|
20
|
+
# defaultMessage: JSON code
|
|
21
|
+
msgid "JSON code"
|
|
22
|
+
msgstr ""
|
|
23
|
+
|
|
24
|
+
#: TextareaJSONWidget
|
|
25
|
+
# defaultMessage: Please enter valid JSON!
|
|
26
|
+
msgid "Please enter valid JSON!"
|
|
27
|
+
msgstr ""
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
msgid ""
|
|
2
|
+
msgstr ""
|
|
3
|
+
"Project-Id-Version: \n"
|
|
4
|
+
"Report-Msgid-Bugs-To: \n"
|
|
5
|
+
"POT-Creation-Date: \n"
|
|
6
|
+
"PO-Revision-Date: \n"
|
|
7
|
+
"Last-Translator: \n"
|
|
8
|
+
"Language: \n"
|
|
9
|
+
"Language-Team: \n"
|
|
10
|
+
"Content-Type: \n"
|
|
11
|
+
"Content-Transfer-Encoding: \n"
|
|
12
|
+
"Plural-Forms: \n"
|
|
13
|
+
|
|
14
|
+
#: VisualJSONWidget
|
|
15
|
+
# defaultMessage: Edit JSON
|
|
16
|
+
msgid "Edit JSON"
|
|
17
|
+
msgstr ""
|
|
18
|
+
|
|
19
|
+
#: schema
|
|
20
|
+
# defaultMessage: JSON code
|
|
21
|
+
msgid "JSON code"
|
|
22
|
+
msgstr ""
|
|
23
|
+
|
|
24
|
+
#: TextareaJSONWidget
|
|
25
|
+
# defaultMessage: Please enter valid JSON!
|
|
26
|
+
msgid "Please enter valid JSON!"
|
|
27
|
+
msgstr ""
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
msgid ""
|
|
2
|
+
msgstr ""
|
|
3
|
+
"Project-Id-Version: Plone\n"
|
|
4
|
+
"POT-Creation-Date: 2023-09-14T13:45:52.728Z\n"
|
|
5
|
+
"Last-Translator: Plone i18n <plone-i18n@lists.sourceforge.net>\n"
|
|
6
|
+
"Language-Team: Plone i18n <plone-i18n@lists.sourceforge.net>\n"
|
|
7
|
+
"MIME-Version: 1.0\n"
|
|
8
|
+
"Content-Type: text/plain; charset=utf-8\n"
|
|
9
|
+
"Content-Transfer-Encoding: 8bit\n"
|
|
10
|
+
"Plural-Forms: nplurals=1; plural=0;\n"
|
|
11
|
+
"Language-Code: en\n"
|
|
12
|
+
"Language-Name: English\n"
|
|
13
|
+
"Preferred-Encodings: utf-8\n"
|
|
14
|
+
"Domain: volto\n"
|
|
15
|
+
|
|
16
|
+
#: VisualJSONWidget
|
|
17
|
+
# defaultMessage: Edit JSON
|
|
18
|
+
msgid "Edit JSON"
|
|
19
|
+
msgstr ""
|
|
20
|
+
|
|
21
|
+
#: schema
|
|
22
|
+
# defaultMessage: JSON code
|
|
23
|
+
msgid "JSON code"
|
|
24
|
+
msgstr ""
|
|
25
|
+
|
|
26
|
+
#: TextareaJSONWidget
|
|
27
|
+
# defaultMessage: Please enter valid JSON!
|
|
28
|
+
msgid "Please enter valid JSON!"
|
|
29
|
+
msgstr ""
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eeacms/volto-editing-progress",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "@eeacms/volto-editing-progress: Volto add-on",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"author": "European Environment Agency: IDM2 A-Team",
|
|
@@ -25,21 +25,49 @@
|
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@cypress/code-coverage": "^3.9.5",
|
|
27
27
|
"babel-plugin-transform-class-properties": "^6.24.1",
|
|
28
|
+
"husky": "^8.0.3",
|
|
29
|
+
"lint-staged": "^14.0.1",
|
|
28
30
|
"md5": "^2.3.0"
|
|
29
31
|
},
|
|
32
|
+
"lint-staged": {
|
|
33
|
+
"src/**/*.{js,jsx,ts,tsx,json}": [
|
|
34
|
+
"make lint-fix",
|
|
35
|
+
"make prettier-fix"
|
|
36
|
+
],
|
|
37
|
+
"src/**/*.{jsx}": [
|
|
38
|
+
"make i18n"
|
|
39
|
+
],
|
|
40
|
+
"theme/**/*.{css,less}": [
|
|
41
|
+
"make stylelint-fix"
|
|
42
|
+
],
|
|
43
|
+
"src/**/*.{css,less}": [
|
|
44
|
+
"make stylelint-fix"
|
|
45
|
+
],
|
|
46
|
+
"theme/**/*.overrides": [
|
|
47
|
+
"make stylelint-fix"
|
|
48
|
+
],
|
|
49
|
+
"src/**/*.overrides": [
|
|
50
|
+
"make stylelint-fix"
|
|
51
|
+
]
|
|
52
|
+
},
|
|
30
53
|
"scripts": {
|
|
31
54
|
"release": "release-it",
|
|
32
55
|
"release-major-beta": "release-it major --preRelease=beta",
|
|
33
56
|
"release-beta": "release-it --preRelease=beta",
|
|
34
57
|
"bootstrap": "npm install -g ejs; npm link ejs; node bootstrap",
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"
|
|
58
|
+
"test": "make test",
|
|
59
|
+
"test:fix": "make test-update",
|
|
60
|
+
"pre-commit": "yarn stylelint:fix && yarn prettier:fix && yarn lint:fix",
|
|
61
|
+
"stylelint": "make stylelint",
|
|
62
|
+
"stylelint:overrides": "make stylelint-overrides",
|
|
63
|
+
"stylelint:fix": "make stylelint-fix",
|
|
64
|
+
"prettier": "make prettier",
|
|
65
|
+
"prettier:fix": "make prettier-fix",
|
|
66
|
+
"lint": "make lint",
|
|
67
|
+
"lint:fix": "make lint-fix",
|
|
68
|
+
"i18n": "make i18n",
|
|
69
|
+
"cypress:run": "make cypress-run",
|
|
70
|
+
"cypress:open": "make cypress-open",
|
|
71
|
+
"prepare": "husky install"
|
|
44
72
|
}
|
|
45
73
|
}
|
package/src/EditingProgress.jsx
CHANGED