Skip to content

Commit 6d08b5e

Browse files
authored
Merge pull request #802 from IQSS/release/0.1.0
Merge Release/0.1.0 into develop
2 parents 45fcee4 + 57f17f9 commit 6d08b5e

File tree

73 files changed

+1967
-669
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+1967
-669
lines changed

.npmrc.example

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
legacy-peer-deps=true
22

3-
# design-system registry
3+
# NPM Registry
44
//registry.npmjs.org/:_authToken=<YOUR_NPM_AUTH_TOKEN>
55
@iqss:registry=https://registry.npmjs.org/
66

7-
# js-dataverse registry
7+
# GitHub Packages Registry
88
//npm.pkg.github.com/:_authToken=<YOUR_GITHUB_AUTH_TOKEN>
9-
# IMPORTANT: when publishing the Design System, comment out the following line to avoid publishing to GitHub Packages
109
@iqss:registry=https://npm.pkg.github.com/
10+
# IMPORTANT: Comment out the line above when:
11+
# 1. Publishing the Design System to npm, to avoid publishing to the GitHub Packages Registry.
12+
# 2. Making a release of the application and installing latest version of Dataverse Client Javascript, to avoid installing from the GitHub Packages Registry (otherwise will lead to a npm error code ETARGET).

docs/making-releases.md

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
# Making Releases
2+
3+
- [Introduction](#introduction)
4+
- [Regular or Hotfix?](#regular-or-hotfix)
5+
- [Create Github Issue and Release Branch](#create-github-issue-and-release-branch)
6+
- [Update the version](#update-the-version)
7+
- [Use the Latest Dataverse Client Javascript Version](#use-the-latest-dataverse-client-javascript-version)
8+
- [Merge "release branch" into "main"](#merge-release-branch-into-main)
9+
- [Create a Draft Release on GitHub and Tag the Version](#create-a-draft-release-on-github-and-tag-the-version)
10+
- [Merge "release branch" into "develop"](#merge-release-branch-into-develop)
11+
- [Delete "release branch"](#delete-release-branch)
12+
13+
## Introduction
14+
15+
This document is about releasing a new version of the dataverse-frontend repository.
16+
17+
## Regular or Hotfix?
18+
19+
Early on, make sure it’s clear what type of release this is. The steps below describe making both regular releases. Suppose the current version is 1.0.0.
20+
21+
- Regular
22+
- e.g. 1.1.0 (minor)
23+
- e.g. 2.0.0 (major)
24+
- Hotfix
25+
- e.g. 1.1.1 (patch)
26+
27+
## Create Github Issue and Release Branch
28+
29+
First of all create an issue on Github to prepare the release, name it "Release dataverse-frontend vX.X.X".
30+
31+
On your local, create the release branch from the latest from develop and name it release/X.X.X .
32+
33+
## Update the version
34+
35+
To update the version run the command `npm version <X.X.X> --no-git-tag-version`. So if we are releasing version `3.5.0` the command will be:
36+
37+
```shell
38+
npm version 3.5.0 --no-git-tag-version
39+
```
40+
41+
This command will update the version in the `package.json` and `package-lock.json`.
42+
43+
## Use the Latest Dataverse Client Javascript Version
44+
45+
During development, the `@iqss/dataverse-client-javascript` package is installed from the [GitHub Packages Registry](https://github.com/IQSS/dataverse-client-javascript/pkgs/npm/dataverse-client-javascript), where we publish versions from PRs and the develop branch. However, for production we are going to use the latest published version of `@iqss/dataverse-client-javascript` package [from npm](https://www.npmjs.com/package/@iqss/dataverse-client-javascript?activeTab=versions).
46+
47+
⚠️ Before next step please ensure that any lines registering the `@iqss` scope with the GitHub Packages registry are commented out in the `.npmrc` file. Otherwise, you will encounter an error when trying to install the package as it will attempt to fetch the package from the GitHub registry instead of npm.
48+
49+
You can do this by running the following command in the root of the repository:
50+
51+
```shell
52+
npm install @iqss/dataverse-client-javascript@latest --save --save-exact
53+
```
54+
55+
This command will update the `package.json` and `package-lock.json` files with the latest version of the `dataverse-client-javascript` package.
56+
57+
If a Dockerized image of the upcoming Dataverse release is available (see [gdcc dataverse tags](https://hub.docker.com/r/gdcc/dataverse/tags)), please update the `E2E_DATAVERSE_IMAGE_TAG` in `workflows/test.yml`. This will make e2e tests on github actions to run against the new dataverse version.
58+
59+
If everything looks good, you can push the changes to the repository.
60+
61+
## Merge "release branch" into "main"
62+
63+
Create a pull request to merge the `release` branch into the `main` branch.
64+
Once important tests have passed (component and e2e) and the code has been reviewed, merge the pull request.
65+
Optionally, still to be defined, the frontend should be deployed to a test environment to verify that everything works as expected against the latest Dataverse release.
66+
67+
## Create a Draft Release on GitHub and Tag the Version
68+
69+
After merging the `release` branch into the `main` branch, you should create a release on GitHub and tag the version.
70+
71+
Go to https://github.com/IQSS/dataverse-frontend/releases/new to start creating a draft release.
72+
73+
- Under "Choose a tag" you will be creating a new tag. Have it start with a "v" such as v3.5.0. Click "Create new tag on publish".
74+
75+
- Under "Target", choose "main".
76+
77+
- Under "Release title" use the same name as the tag such as v3.5.0.
78+
79+
- Add a description of the changes included in this release. Summarize the key updates, fixes, or features.
80+
81+
- Click "Save draft" because we do not want to publish the release yet.
82+
83+
At this point you can send around the draft release for any final feedback. Make corrections to the draft, if necessary. Publish once everything is ok.
84+
85+
## Merge "release branch" into "develop"
86+
87+
After merging the release branch into `main`, ensure the develop branch is updated with the latest changes.
88+
89+
```shell
90+
git checkout develop
91+
git merge release/X.X.X
92+
git push origin develop
93+
```
94+
95+
## Delete "release branch"
96+
97+
Once the release process is complete and the `release` branch has been merged into both `main` and `develop`, you can safely delete the `release` branch to keep the repository clean.
98+
99+
- Delete the branch locally from your repository.
100+
- Delete the branch remotely from the remote repository.
101+
102+
This ensures that the `release` branch is no longer present in either your local or remote repositories.

packages/design-system/cypress.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ export default defineConfig({
66
indexHtmlFile: 'tests/support/component-index.html',
77
specPattern: ['tests/component/**/*.spec.{js,jsx,ts,tsx}'],
88
supportFile: 'tests/support/component.ts',
9+
fixturesFolder: 'tests/component/fixtures',
910
devServer: {
1011
framework: 'react',
1112
bundler: 'vite'

packages/design-system/src/lib/stories/rich-text-editor/RichTextEditor.stories.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export const WithAllFormats: Story = {
5353
render: () => (
5454
<RichTextEditor
5555
initialValue={
56-
'<h1 class="rte-heading">Heading 1</h1><h2 class="rte-heading">Heading 2</h2><h3 class="rte-heading">Heading 3</h3><p class="rte-paragraph">Hello <strong class="rte-bold">Dataverse</strong> <em class="rte-italic">new </em><s class="rte-strike">rick</s> <strong class="rte-bold">rich</strong> <em class="rte-italic">text</em> <code class="rte-code">editor</code>! This is a <a target="_blank" rel="noopener noreferrer nofollow" class="rte-link" href="https://beta.dataverse.org/spa/">link</a>.</p><ul class="rte-bullet-list"><li><p class="rte-paragraph">Item</p></li><li><p class="rte-paragraph">Item</p></li></ul><ol class="rte-ordered-list"><li><p class="rte-paragraph">Item 1</p></li><li><p class="rte-paragraph">Item 2</p></li></ol><pre class="rte-code-block"><code class="language-typescriptreact">onUpdate: ({ editor }) =&gt; onChange &amp;&amp; onChange(editor.getHTML())</code></pre><blockquote class="rte-blockquote"><p class="rte-paragraph">This is a blockquoute</p></blockquote><img src="https://loremflickr.com/640/480" alt="A random image from loremflickr" class="rte-img rte-w-25">'
56+
'<h1 class="rte-heading">Heading 1</h1><h2 class="rte-heading">Heading 2</h2><h3 class="rte-heading">Heading 3</h3><p class="rte-paragraph">Hello <strong class="rte-bold">Dataverse</strong> <em class="rte-italic">new </em><s class="rte-strike">rick</s> <strong class="rte-bold">rich</strong> <em class="rte-italic">text</em> <code class="rte-code">editor</code>! This is a <a target="_blank" rel="noopener noreferrer nofollow" class="rte-link" href="https://beta.dataverse.org/spa/">link</a>.</p><ul class="rte-bullet-list"><li><p class="rte-paragraph">Item</p></li><li><p class="rte-paragraph">Item</p></li></ul><ol class="rte-ordered-list"><li><p class="rte-paragraph">Item 1</p></li><li><p class="rte-paragraph">Item 2</p></li></ol><pre class="rte-code-block"><code class="language-typescriptreact">onUpdate: ({ editor }) =&gt; onChange &amp;&amp; onChange(editor.getHTML())</code></pre><blockquote class="rte-blockquote"><p class="rte-paragraph">This is a blockquoute</p></blockquote><img src="https://picsum.photos/id/237/200/300" alt="A random image from picsum" class="rte-img rte-w-25">'
5757
}
5858
onChange={handleChange}
5959
/>
@@ -62,9 +62,9 @@ export const WithAllFormats: Story = {
6262

6363
export const WithImagesAlignedToTheLeftCenterAndRight: Story = {
6464
render: () => {
65-
const imageLeft = `<img src="https://loremflickr.com/640/480" alt="Foo" class="rte-img rte-w-15 ${RichTextEditorCustomClasses.IMAGE_ALIGN_LEFT}">`
66-
const imageCenter = `<img src="https://loremflickr.com/640/480" alt="Foo" class="rte-img rte-w-15 ${RichTextEditorCustomClasses.IMAGE_ALIGN_CENTER}">`
67-
const imageRight = `<img src="https://loremflickr.com/640/480" alt="Foo" class="rte-img rte-w-15 ${RichTextEditorCustomClasses.IMAGE_ALIGN_RIGHT}">`
65+
const imageLeft = `<img src="https://picsum.photos/id/237/200/300" alt="Foo" class="rte-img rte-w-15 ${RichTextEditorCustomClasses.IMAGE_ALIGN_LEFT}">`
66+
const imageCenter = `<img src="https://picsum.photos/id/237/200/300" alt="Foo" class="rte-img rte-w-15 ${RichTextEditorCustomClasses.IMAGE_ALIGN_CENTER}">`
67+
const imageRight = `<img src="https://picsum.photos/id/237/200/300" alt="Foo" class="rte-img rte-w-15 ${RichTextEditorCustomClasses.IMAGE_ALIGN_RIGHT}">`
6868

6969
return (
7070
<RichTextEditor initialValue={imageLeft + imageCenter + imageRight} onChange={handleChange} />
@@ -75,11 +75,11 @@ export const WithImagesAlignedToTheLeftCenterAndRight: Story = {
7575
export const WithImagesResizedDifferently: Story = {
7676
render: () => {
7777
const imageLeft =
78-
'<img src="https://loremflickr.com/640/480" alt="Foo" class="rte-img rte-w-15">'
78+
'<img src="https://picsum.photos/id/237/200/300" alt="Foo" class="rte-img rte-w-15">'
7979
const imageCenter =
80-
'<img src="https://loremflickr.com/640/480" alt="Foo" class="rte-img rte-w-30">'
80+
'<img src="https://picsum.photos/id/237/200/300" alt="Foo" class="rte-img rte-w-30">'
8181
const imageRight =
82-
'<img src="https://loremflickr.com/640/480" alt="Foo" class="rte-img rte-w-40">'
82+
'<img src="https://picsum.photos/id/237/200/300" alt="Foo" class="rte-img rte-w-40">'
8383

8484
return (
8585
<RichTextEditor initialValue={imageLeft + imageCenter + imageRight} onChange={handleChange} />
48.7 KB
Loading

0 commit comments

Comments
 (0)