Skip to content

Commit afdf51c

Browse files
committed
resolve merge conflicts
2 parents 3f63ae4 + 212fa23 commit afdf51c

File tree

56 files changed

+1679
-371
lines changed

Some content is hidden

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

56 files changed

+1679
-371
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,18 @@ This changelog follows the principles of [Keep a Changelog](https://keepachangel
88

99
### Added
1010

11+
- Added the value entered by the user in the error messages for metadata field validation errors in EMAIL and URL type fields. For example, instead of showing “Point of Contact E-mail is not a valid email address.“, we now show “Point of Contact E-mail foo is not a valid email address.”
12+
- Contact Owner button in File Page.
13+
- Share button in File Page.
14+
1115
### Changed
1216

1317
- Use of the new `sourceLastUpdateTime` query parameter from update dataset and file metadata endpoints to support optimistic concurrency control during editing operations. See [Edit Dataset Metadata](https://guides.dataverse.org/en/6.8/api/native-api.html#edit-dataset-metadata) and [Updating File Metadata](https://guides.dataverse.org/en/6.8/api/native-api.html#updating-file-metadata) guides for more details.
18+
- Changed the way we were handling DATE type metadata field validation to better match the backend validation and give users better error messages. For example, for an input like “foo AD”, we now show “Production Date is not a valid date. The AD year must be numeric.“. For an input like “99999 AD”, we now show “Production Date is not a valid date. The AD year cant be higher than 9999.“. For an input like “[-9999?], we now show “Production Date is not a valid date. The year in brackets cannot be negative.“, etc.
1419

1520
### Fixed
1621

22+
- Add word-break to items text to prevent layout issues when long descriptions without spaces are entered. (#839)
1723
- Show toast notification when API token is copied to clipboard.
1824

1925
### Removed

DEVELOPER_GUIDE.md

Lines changed: 7 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -944,15 +944,14 @@ However, we prioritize user-centric testing over coverage numbers.
944944
- **Coverage Threshold:** We aim for a test coverage of 95% for the unit tests. This threshold is set in the `.nycrc.json` file.
945945
- **Coverage Reports:** We use [nyc](https://www.npmjs.com/package/nyc) to generate coverage reports, which are available
946946
in the `coverage` folder after running the tests. These reports are also published to [Coveralls](https://coveralls.io/github/IQSS/dataverse-frontend?branch=develop)
947-
with every pull request and merge. The coverage badge is displayed at the top of the README.
947+
with every pull request and merge. The coverage badge is displayed at the top of the README. See "include" and "exclude" in `.nycrc.json` to learn about which source files are included in coverage reports.
948948
- **Tests included in the coverage:** We include all unit tests in the coverage report.
949949
950950
#### How to run the code coverage
951951
952-
To generate the code coverage, you first need to run the tests with the `test:unit` script. After running the tests, you
953-
can check the coverage with the `test:coverage` script.
952+
To generate the code coverage, you first need to run the tests with the `test:unit` script. This can take a while! After running the tests, you can check the coverage with the `test:coverage` script. This will simply report the total coverage.
954953
955-
If you want to see the coverage report in the browser, you can open the `coverage/lcov-report/index.html` file in the browser.
954+
To see which lines are not covered, you can open the coverage report in the browser: `coverage/lcov-report/index.html`.
956955
957956
```bash
958957
# root project directory
@@ -964,8 +963,12 @@ npm run test:unit
964963
# Check the coverage
965964
966965
npm run test:coverage
966+
967+
# See detailed report at coverage/lcov-report/index.html
967968
```
968969
970+
Note that it's easy for the `lcov-report` report to get overwritten. For example, running any test with `npm run cy:open-unit` will overwrite it. For this reason you might want to copy the `lcov-report` directory elsewhere for safe keeping. That’s mainly useful for debugging previous coverage results and improving them.
971+
969972
<p align="right">(<a href="#readme-top">back to top</a>)</p>
970973
<br>
971974
@@ -1048,84 +1051,6 @@ path included will redirect to the frontend application.
10481051
<p align="right">(<a href="#readme-top">back to top</a>)</p>
10491052
<br>
10501053
1051-
## Publishing the Design System
1052-
1053-
The Design System is published to the npm Package Registry. To publish a new version, follow these steps:
1054-
1055-
1. **Update the version**
1056-
1057-
Update the version running the lerna command:
1058-
1059-
```shell
1060-
lerna version --no-push
1061-
```
1062-
1063-
This command will ask you for the new version and will update the `package.json` files and create a new commit with the changes.
1064-
1065-
2. **Review the auto generated CHANGELOG.md**
1066-
1067-
The lerna command will generate a new `CHANGELOG.md` file with the changes for the new version. Review the changes and make sure that the file is correct.
1068-
1069-
If it looks good, you can push the changes to the repository.
1070-
1071-
```shell
1072-
git push && git push --tags
1073-
```
1074-
1075-
Optional:
1076-
1077-
If you need to make any changes to the `CHANGELOG.md` file, you can do it manually.
1078-
1079-
After manually updating the `CHANGELOG.md` file, you can commit the changes.
1080-
1081-
```shell
1082-
git add .
1083-
git commit --amend --no-edit
1084-
git push --force && git push --tags --force
1085-
```
1086-
1087-
This command will amend the lerna commit and push the changes to the repository.
1088-
1089-
3. **Review the new tag in GitHub**
1090-
1091-
After pushing the changes, you can review the new tag in the [GitHub repository](https://github.com/IQSS/dataverse-frontend/tags).
1092-
1093-
The tag should be created with the new version.
1094-
1095-
4. **Publish the package**
1096-
1097-
After the version is updated, you can publish the package running the lerna command:
1098-
1099-
```shell
1100-
lerna publish from-package
1101-
```
1102-
1103-
This command will publish the package to the npm registry.
1104-
1105-
Remember that you need a valid npm token to publish the packages.
1106-
1107-
Get a new token from the npm website and update the `.npmrc` file with the new token.
1108-
1109-
Open the `.npmrc` file and replace `YOUR_NPM_TOKEN ` with your actual npm token.
1110-
1111-
⚠️ Please ensure that any lines registering the `@iqss` scope with the GitHub Packages registry are commented out. This is important because otherwise, the package would be published there instead of npm.
1112-
1113-
```plaintext
1114-
legacy-peer-deps=true
1115-
1116-
//npm.pkg.github.com/:_authToken=YOUR_NPM_TOKEN
1117-
@iqss:registry=https://npm.pkg.github.com/
1118-
```
1119-
1120-
5. **Review the new version in the npm registry**
1121-
1122-
After publishing the packages, you can review the new version in the [npm registry](https://www.npmjs.com/package/@iqss/dataverse-design-system?activeTab=versions).
1123-
1124-
The new version should be available in the npm registry.
1125-
1126-
<p align="right">(<a href="#readme-top">back to top</a>)</p>
1127-
<br>
1128-
11291054
<!-- MARKDOWN LINKS & IMAGES -->
11301055
<!-- https://www.markdownguide.org/basic-syntax/#reference-style-links -->
11311056
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
## Publishing the Design System
2+
3+
The Design System is published to the npm Package Registry. To publish a new version, follow these steps:
4+
5+
1. **Update the Changelog**
6+
7+
Move entries from Non Published Changes to the new version section and clear the Non Published Changes section.
8+
9+
2. **Update Readme with the latest Storybook build**
10+
11+
Update the `README.md` file in the `packages/design-system` folder with the latest Storybook build.
12+
13+
You can search this link in the Chromatic Deployment Github Action -> Publish To Chromatic step -> "View your Storybook at"
14+
15+
3. **Update the version**
16+
17+
Commit all your changes so far.
18+
19+
Update the version running the lerna command:
20+
21+
```shell
22+
lerna version --no-push
23+
```
24+
25+
This command will ask you for the new version and will update the `package.json` files and create a new commit with the changes.
26+
27+
If it looks good, you can push the changes to the repository.
28+
29+
```shell
30+
git push && git push --tags
31+
```
32+
33+
4. **Review the new tag in GitHub**
34+
35+
After pushing the changes, you can review the new tag in the [GitHub repository](https://github.com/IQSS/dataverse-frontend/tags).
36+
37+
The tag should be created with the new version.
38+
39+
5. **Build the package**
40+
41+
Ensure the design system is built so the dist artifacts are available:
42+
43+
```bash
44+
# from the repo root
45+
npm run --workspace @iqss/dataverse-design-system build
46+
# or, from the package folder
47+
# cd packages/design-system && npm run build
48+
```
49+
50+
Note: publishing will also trigger a build automatically via the package's prepublishOnly script, but running it explicitly helps catch issues earlier.
51+
52+
6. **Publish the package**
53+
54+
After the version is updated and the package is built, you can publish the package running the lerna command:
55+
56+
```shell
57+
lerna publish from-package
58+
```
59+
60+
This command will publish the package to the npm registry.
61+
62+
Remember that you need a valid npm token to publish the packages.
63+
64+
Get a new token from the npm website and update the `.npmrc` file with the new token.
65+
66+
Open the `.npmrc` file and replace `YOUR_NPM_TOKEN ` with your actual npm token.
67+
68+
⚠️ Please ensure that any lines registering the `@iqss` scope with the GitHub Packages registry are commented out. This is important because otherwise, the package would be published there instead of npm.
69+
70+
```plaintext
71+
legacy-peer-deps=true
72+
73+
//npm.pkg.github.com/:_authToken=YOUR_NPM_TOKEN
74+
@iqss:registry=https://npm.pkg.github.com/
75+
```
76+
77+
7. **Review the new version in the npm registry**
78+
79+
After publishing the packages, you can review the new version in the [npm registry](https://www.npmjs.com/package/@iqss/dataverse-design-system?activeTab=versions).
80+
81+
The new version should be available in the npm registry.

lerna.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
{
22
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
33
"version": "independent",
4+
"npmClient": "npm",
5+
"packages": ["packages/*"],
46
"command": {
57
"version": {
6-
"conventionalCommits": true,
7-
"changelogPreset": "angular"
8+
"npmClientArgs": [
9+
"--legacy-peer-deps"
10+
]
811
}
9-
},
10-
"npmClient": "npm",
11-
"packages": ["packages/*"]
12+
}
1213
}

package-lock.json

Lines changed: 20 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"@testing-library/jest-dom": "5.16.5",
2626
"@testing-library/react": "13.4.0",
2727
"@testing-library/user-event": "13.5.0",
28-
"@types/node": "16.18.12",
28+
"@types/node": "22.18.10",
2929
"@types/react": "18.0.27",
3030
"@types/react-dom": "18.0.10",
3131
"ajv": "8.17.1",
@@ -146,7 +146,7 @@
146146
"chromatic": "13.3.0",
147147
"concurrently": "8.0.1",
148148
"cypress": "15.2.0",
149-
"cypress-vite": "1.4.0",
149+
"cypress-vite": "1.8.0",
150150
"eslint": "8.33.0",
151151
"eslint-config-prettier": "8.6.0",
152152
"eslint-plugin-import": "2.27.5",

packages/design-system/CHANGELOG.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,27 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
55

66
# Non Published Changes
77

8+
# [2.1.0](https://github.com/IQSS/dataverse-frontend/compare/@iqss/[email protected]...@iqss/[email protected]) (2025-10-09)
9+
10+
### Added
11+
812
- **DropdownButton:**
913
- Add `customToggle` prop to allow custom toggle components.
1014
- Add `customToggleClassname` and `customToggleMenuClassname` props to allow custom styling of the custom toggle dropdown wrapper and menu.
1115
- Add `align` prop to control the alignment of the dropdown menu.
1216
- Add `size` prop to control the size of the button (e.g., 'sm', 'lg').
1317
- **DropdownButtonItem:**
1418
- Add `type` prop to allow specifying the type of the element.
19+
20+
### Changed
21+
1522
- **SelectAdvanced:**
16-
- Fix word wrapping in options list to prevent overflow and ensure long text is displayed correctly.
1723
- Support for options with a shape of `{ label: string; value: string; }[]` instead of just `string[]`.
24+
25+
### Fixed
26+
27+
- **SelectAdvanced:**
28+
- Fix word wrapping in options list to prevent overflow and ensure long text is displayed correctly.
1829
- **ButtonGroup:**
1930
- Fix styles for vertical button groups when using tooltips.
2031
- **Badge:**:

packages/design-system/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ function App() {
5656
export default App
5757
```
5858

59-
For detailed usage instructions and available customization options, refer to the [Storybook](https://646fbe232a8d3b501a1943f3-euwxbewiys.chromatic.com) provided with the package.
59+
For detailed usage instructions and available customization options, refer to the [Storybook](https://646fbe232a8d3b501a1943f3-mdvdyoulio.chromatic.com) provided with the package.
6060

6161
[//]: # 'COMMING SOON'
6262
[//]: # '## Contributions'

packages/design-system/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@iqss/dataverse-design-system",
3-
"version": "2.0.2",
3+
"version": "2.1.0",
44
"description": "Dataverse Design System Component Library",
55
"type": "module",
66
"license": "MIT",
@@ -22,6 +22,7 @@
2222
"scripts": {
2323
"dev": "vite",
2424
"build": "tsc && vite build",
25+
"prepublishOnly": "npm run build",
2526
"lint": "eslint src --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
2627
"preview": "vite preview",
2728
"storybook": "storybook dev -p 6007",

public/locales/en/dataset.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@
249249
"access": "Access",
250250
"needTwoVersions": "Please select two versions to view the differences.",
251251
"viewDetails": "View Details",
252-
"replace": "File Replace",
252+
"fileReplaced": "File Replaced",
253253
"termsOfUseandAccess": "Terms of Use/Access",
254254
"deaccessionedReason": "Deaccessioned Reason",
255255
"error": "Error on loading dataset versions"

0 commit comments

Comments
 (0)