Skip to content

Commit 0a980a9

Browse files
authored
Merge pull request #777 from IQSS/release/0.1.0
Release dataverse-frontend v0.1.0
2 parents 3e4569e + 9c0011e commit 0a980a9

File tree

1,483 files changed

+177868
-1
lines changed

Some content is hidden

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

1,483 files changed

+177868
-1
lines changed

.babelrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"presets": [
3+
"@babel/preset-env",
4+
"@babel/preset-typescript"
5+
]
6+
}

.env.example

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
VITE_DATAVERSE_BACKEND_URL=http://localhost:8000
2+
STORYBOOK_CHROMATIC_BUILD=false
3+
VITE_OIDC_CLIENT_ID=test
4+
VITE_OIDC_AUTHORIZATION_ENDPOINT=http://localhost:8000/realms/test/protocol/openid-connect/auth
5+
VITE_OIDC_TOKEN_ENDPOINT=http://localhost:8000/realms/test/protocol/openid-connect/token
6+
VITE_OIDC_LOGOUT_ENDPOINT=http://localhost:8000/realms/test/protocol/openid-connect/logout
7+
VITE_OIDC_STORAGE_KEY_PREFIX=DV_

.env.example.shib

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
VITE_DATAVERSE_BACKEND_URL=https://localhost
2+
STORYBOOK_CHROMATIC_BUILD=false
3+
VITE_OIDC_CLIENT_ID=test
4+
VITE_OIDC_AUTHORIZATION_ENDPOINT=https://localhost/realms/test/protocol/openid-connect/auth
5+
VITE_OIDC_TOKEN_ENDPOINT=https://localhost/realms/test/protocol/openid-connect/token
6+
VITE_OIDC_LOGOUT_ENDPOINT=https://localhost/realms/test/protocol/openid-connect/logout
7+
VITE_OIDC_STORAGE_KEY_PREFIX=DV_

.eslintrc.json

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
{
2+
"settings": {
3+
"react": {
4+
"version": "detect"
5+
},
6+
"import/resolver": {
7+
"node": {
8+
"extensions": [".js", ".jsx", ".ts", ".tsx"]
9+
}
10+
}
11+
},
12+
"env": {
13+
"browser": true,
14+
"es2021": true,
15+
"jest": true,
16+
"node": true
17+
},
18+
"extends": [
19+
"eslint:recommended",
20+
"plugin:react/recommended",
21+
"plugin:react-hooks/recommended",
22+
"plugin:@typescript-eslint/eslint-recommended",
23+
"plugin:@typescript-eslint/recommended",
24+
"plugin:@typescript-eslint/recommended-requiring-type-checking",
25+
"plugin:prettier/recommended",
26+
"plugin:react/jsx-runtime",
27+
"prettier"
28+
],
29+
"parser": "@typescript-eslint/parser",
30+
"parserOptions": {
31+
"ecmaVersion": "latest",
32+
"sourceType": "module",
33+
"project": [
34+
"./tsconfig.json",
35+
"./tests/tsconfig.json",
36+
"./packages/design-system/tsconfig.json",
37+
"./packages/design-system/tests/tsconfig.json"
38+
]
39+
},
40+
"plugins": ["react", "simple-import-sort", "import", "unused-imports"],
41+
"rules": {
42+
"@typescript-eslint/no-unused-vars": "off",
43+
"unused-imports/no-unused-imports": "error",
44+
"unused-imports/no-unused-vars": [
45+
"warn",
46+
{
47+
"vars": "all",
48+
"varsIgnorePattern": "^_",
49+
"args": "after-used",
50+
"argsIgnorePattern": "^_"
51+
}
52+
],
53+
"@typescript-eslint/no-empty-function": [
54+
"error",
55+
{
56+
"allow": ["arrowFunctions"]
57+
}
58+
],
59+
"react/react-in-jsx-scope": "off",
60+
"prettier/prettier": [
61+
"error",
62+
{
63+
"semi": false,
64+
"tabWidth": 2,
65+
"printWidth": 100,
66+
"singleQuote": true,
67+
"trailingComma": "none",
68+
"bracketSameLine": true
69+
}
70+
],
71+
"@typescript-eslint/no-misused-promises": [
72+
"error",
73+
{
74+
"checksVoidReturn": {
75+
"attributes": false
76+
}
77+
}
78+
],
79+
"react-hooks/exhaustive-deps": [
80+
"warn",
81+
{
82+
"additionalHooks": "(useDeepCompareEffect|useDeepCompareCallback|useDeepCompareMemo)"
83+
}
84+
]
85+
},
86+
"overrides": [
87+
{
88+
"files": ["**/e2e/**/*.spec.ts", "**/component/**/*.spec.tsx"],
89+
"rules": {
90+
"testing-library/await-async-query": 0,
91+
"@typescript-eslint/no-unsafe-member-access": 0,
92+
"@typescript-eslint/no-unsafe-call": 0,
93+
"testing-library/prefer-screen-queries": 0
94+
}
95+
}
96+
],
97+
"ignorePatterns": ["packages/design-system/dist/**", "dev-env/**", "public/keycloakify-dev-resources"]
98+
}

.github/CODE_OF_CONDUCT.md

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as
6+
contributors and maintainers pledge to making participation in our project and
7+
our community a harassment-free experience for everyone, regardless of age, body
8+
size, disability, ethnicity, sex characteristics, gender identity and expression,
9+
level of experience, education, socio-economic status, nationality, personal
10+
appearance, race, religion, or sexual identity and orientation.
11+
12+
## Our Standards
13+
14+
Examples of behavior that contributes to creating a positive environment
15+
include:
16+
17+
- Using welcoming and inclusive language
18+
- Being respectful of differing viewpoints and experiences
19+
- Gracefully accepting constructive criticism
20+
- Focusing on what is best for the community
21+
- Showing empathy towards other community members
22+
23+
Examples of unacceptable behavior by participants include:
24+
25+
- The use of sexualized language or imagery and unwelcome sexual attention or
26+
advances
27+
- Trolling, insulting/derogatory comments, and personal or political attacks
28+
- Public or private harassment
29+
- Publishing others' private information, such as a physical or electronic
30+
address, without explicit permission
31+
- Other conduct which could reasonably be considered inappropriate in a
32+
professional setting
33+
34+
## Our Responsibilities
35+
36+
Project maintainers are responsible for clarifying the standards of acceptable
37+
behavior and are expected to take appropriate and fair corrective action in
38+
response to any instances of unacceptable behavior.
39+
40+
Project maintainers have the right and responsibility to remove, edit, or
41+
reject comments, commits, code, wiki edits, issues, and other contributions
42+
that are not aligned to this Code of Conduct, or to ban temporarily or
43+
permanently any contributor for other behaviors that they deem inappropriate,
44+
threatening, offensive, or harmful.
45+
46+
## Scope
47+
48+
This Code of Conduct applies both within project spaces and in public spaces
49+
when an individual is representing the project or its community. Examples of
50+
representing a project or community include using an official project e-mail
51+
address, posting via an official social media account, or acting as an appointed
52+
representative at an online or offline event. Representation of a project may be
53+
further defined and clarified by project maintainers.
54+
55+
## Enforcement
56+
57+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58+
reported by contacting the project team at support at dataverse dot org. All
59+
complaints will be reviewed and investigated and will result in a response that
60+
is deemed necessary and appropriate to the circumstances. The project team is
61+
obligated to maintain confidentiality with regard to the reporter of an incident.
62+
Further details of specific enforcement policies may be posted separately.
63+
64+
Project maintainers who do not follow or enforce the Code of Conduct in good
65+
faith may face temporary or permanent repercussions as determined by other
66+
members of the project's leadership.
67+
68+
## Attribution
69+
70+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71+
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
72+
73+
[homepage]: https://www.contributor-covenant.org
74+
75+
For answers to common questions about this code of conduct, see
76+
https://www.contributor-covenant.org/faq

.github/CONTRIBUTING.md

Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
# Guidance on how to contribute
2+
3+
> All contributions to this project will be released under the Apache License, Version 2.0.
4+
> By submitting a pull request or filing a bug, issue, or
5+
> feature request, you are agreeing to comply with this waiver of copyright interest.
6+
> Details can be found in our [LICENSE](/LICENSE).
7+
8+
Thank you for your interest in contributing to Dataverse Frontend! We are open to contributions from everyone. You don't
9+
need permission to participate. Just jump in. If you have questions, please reach out using one or more of the channels
10+
described below.
11+
12+
We aren't just looking for developers. There are many ways to contribute to Dataverse. We welcome contributions
13+
of ideas, bug reports, usability research/feedback, documentation, code, and more! Please, check the [Dataverse main repo]
14+
for more information on how to contribute to the Dataverse project.
15+
16+
Here are ways to get involved:
17+
18+
1. [Star] the project!
19+
2. Answer questions and join in on [issue tracker].
20+
3. [Report a bug] that you find.
21+
4. Browse ["help wanted"] and ["good first issue"] labels for areas of Dataverse/JavaScript/code you know well to consider, build or document.
22+
23+
## Bug Reports/Issues
24+
25+
An issue is a bug (a feature is no longer behaving the way it should) or a feature (something new to Dataverse that helps
26+
users complete tasks). You can browse the Dataverse Frontend [issue tracker] on GitHub by open or closed issues.
27+
28+
Before submitting an issue, please search the existing issues by using the search bar at the top of the page. If there
29+
is an existing open issue that matches the issue you want to report, please add a comment to it.
30+
31+
If there is no pre-existing issue or it has been closed, please click on the "New Issue" button, log in, and write in
32+
what the issue is (unless it is a security issue which should be reported privately to [email protected]).
33+
34+
If you do not receive a reply to your new issue or comment in a timely manner, please email [email protected] with a link to the issue.
35+
36+
### Writing an Issue
37+
38+
For the subject of an issue, please start it by writing the feature or functionality it relates to, i.e. "Create Account:..."
39+
or "Dataset Page:...". In the body of the issue, please outline the issue you are reporting with as much detail as possible.
40+
In order for the Dataverse development team to best respond to the issue, we need as much information about the issue as
41+
you can provide. Include steps to reproduce bugs. Indicate which version you're using, which is shown at the bottom of the page. We love screenshots!
42+
43+
### Issue Attachments
44+
45+
You can attach certain files (images, screenshots, logs, etc.) by dragging and dropping, selecting them, or pasting from
46+
the clipboard. Files must be one of GitHub's [supported attachment formats] such as png, gif, jpg, txt, pdf, zip, etc.
47+
(Pro tip: A file ending in .log can be renamed to .txt, so you can upload it.) If there's no easy way to attach your file,
48+
please include a URL that points to the file in question.
49+
50+
[supported attachment formats]: https://help.github.com/articles/file-attachments-on-issues-and-pull-requests/
51+
52+
## Documenting
53+
54+
This is probably one of the most important things you can do as a contributor and probably one of the easiest things you can do.
55+
For the moment we only use the [README], which you can edit right here on GitHub!
56+
57+
if there is a mistake you can just press the edit button on the file and make the change directly even without an IDE.
58+
These pull requests are highly appreciated and will help future generations of developers!
59+
60+
[README]: https://github.com/IQSS/dataverse-frontend/edit/develop/README.md
61+
62+
## Changing the code-base
63+
64+
If you are interested in working on the Dataverse Frontend code, great! Before you start working on something we would
65+
suggest talking to us in the [Zulip UI Dev Stream]
66+
67+
Generally speaking, you should fork this repository, make changes in your own fork, and then submit a pull request. All
68+
new code should have associated unit tests that validate implemented features and the presence or lack of defects.
69+
Additionally, the code should follow any stylistic and architectural guidelines prescribed by the project. In the absence
70+
of such guidelines, mimic the styles and patterns in the existing code-base.
71+
72+
Pull requests are highly appreciated. More than [5 people] have written parts of Dataverse Frontend (so far). Here are some
73+
guidelines to help:
74+
75+
1. **Solve a problem** – Features are great, but even better is cleaning-up and fixing issues in the code that you discover.
76+
2. **Write tests** – This helps preserve functionality as the codebase grows and demonstrates how your change affects the code.
77+
3. **Write documentation** – We have a [README] that always needs updating.
78+
4. **Small > big** – Better to have a few small pull requests that address specific parts of the code, than one big pull request that jumps all over.
79+
5. **Comply with Coding Standards** – See next section.
80+
81+
### How to start
82+
83+
After you’ve forked the Dataverse Frontend repository, you should follow the Getting Started instructions in the
84+
[Developer Guide](/DEVELOPER_GUIDE.md) to get your local environment up and running.
85+
86+
### GitHub reviews & assignments
87+
88+
All PRs receive a review from at least one maintainer. We’ll do our best to do that review as soon as possible, but we’d
89+
rather go slow and get it right than merge in code with issues that just lead to trouble.
90+
91+
You might see us assign multiple reviewers, in this case these are OR checks (i.e. either Person1 or Person2) unless we
92+
explicitly say it’s an AND type thing (i.e. can both Person3 and Person4 check this out?).
93+
94+
We use the assignee to show who’s responsible at that moment. We’ll assign back to the submitter if we need additional
95+
info/code/response, or it might be assigned to a branch maintainer if it needs more thought/revision (perhaps it’s directly
96+
related to an issue that's actively being worked on).
97+
98+
After making your pull request, your goal should be to help it advance through our kanban board at [IQSS Dataverse Project].
99+
If no one has moved your pull request to the code review column in a timely manner, please reach out. Note that once a pull request
100+
is created for an issue, we'll remove the issue from the board so that we only track one card (the pull request).
101+
102+
Thanks for your contribution!
103+
104+
## Other ways to contribute to the code
105+
106+
We love code contributions. Developers are not limited to the Frontend Dataverse code in this git repo. You can help with
107+
API client libraries in your favorite language that are mentioned in the [API Guide][] or create a new library. In this
108+
repo we are using the [JavaScript Dataverse API client library] in which you can contribute to as well.
109+
110+
[API Guide]: http://guides.dataverse.org/en/latest/api
111+
[issue tracker]: https://github.com/IQSS/dataverse-frontend/issues
112+
[Dataverse main repo]: https://github.com/IQSS/dataverse/blob/develop/CONTRIBUTING.md
113+
[Star]: https://github.com/iqss/dataverse-frontend/stargazers
114+
[Report a bug]: https://github.com/iqss/dataverse-frontend/issues/new?assignees=&labels=&projects=&title=%5BBUG%5D+Your+title
115+
["help wanted"]: https://github.com/iqss/dataverse-frontend/labels/help%20wanted
116+
["good first issue"]: https://github.com/iqss/dataverse-frontend/labels/good%20first%20issue
117+
[Zulip UI Dev Stream]: https://dataverse.zulipchat.com/#narrow/stream/410361-ui-dev
118+
[5 people]: https://github.com/iqss/dataverse-frontend/graphs/contributors
119+
[Getting Started Section]: https://github.com/IQSS/dataverse-frontend?tab=readme-ov-file#getting-started
120+
[TypeScript Deep Dive Style Guide]: https://basarat.gitbook.io/typescript/styleguide
121+
[pre-commit]: https://www.npmjs.com/package/pre-commit
122+
[IQSS Dataverse Project]: https://github.com/orgs/IQSS/projects/34
123+
[JavaScript Dataverse API client library]: https://github.com/IQSS/dataverse-client-javascript
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
name: Bug report
3+
about: Did you encounter something unexpected or incorrect in the Dataverse Frontend?
4+
We'd like to hear about it!
5+
title: ''
6+
labels: 'Type: Bug'
7+
assignees: ''
8+
---
9+
10+
<!--
11+
Thank you for contributing to the Dataverse Frontend through the creation of a bug report!
12+
13+
WARNING: If this is a security issue it should be reported privately to [email protected]
14+
15+
More information on bug issues and contributions can be found in the "Contributing to Dataverse Frontend" page:
16+
https://github.com/IQSS/dataverse-frontend/blob/develop/CONTRIBUTING.md#bug-reportsissues
17+
18+
Please fill out as much of the template as you can.
19+
Start below this comment section.
20+
-->
21+
22+
**What steps does it take to reproduce the issue?**
23+
24+
- When does this issue occur?
25+
26+
- Which page(s) does it occur on?
27+
28+
- What happens?
29+
30+
- To whom does it occur (all users, curators, superusers)?
31+
32+
- What did you expect to happen?
33+
34+
**Which version of Dataverse Frontend are you using?**
35+
36+
**Any related open or closed issues to this bug report?**
37+
38+
**Screenshots:**
39+
40+
No matter the issue, screenshots are always welcome.
41+
42+
To add a screenshot, please use one of the following formats and/or methods described here:
43+
44+
- https://help.github.com/en/articles/file-attachments-on-issues-and-pull-requests
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea or new feature for the Dataverse software!
4+
title: 'Feature Request/Idea:'
5+
labels: 'Type: Feature'
6+
assignees: ''
7+
---
8+
9+
<!--
10+
Thank you for contributing to the Dataverse Project through the creation of a feature request!
11+
12+
More information on ideas/feature requests and contributions can be found in the "Contributing to Dataverse" page:
13+
https://github.com/IQSS/dataverse/blob/develop/CONTRIBUTING.md#ideasfeature-requests
14+
15+
Please fill out as much of the template as you can.
16+
Start below this comment section.
17+
-->
18+
19+
**Overview of the Feature Request**
20+
21+
**What kind of user is the feature intended for?**
22+
(Example users roles: API User, Curator, Depositor, Guest, Superuser, Sysadmin)
23+
24+
**What inspired the request?**
25+
26+
**What existing behavior do you want changed?**
27+
28+
**Any brand-new behavior do you want to add to Dataverse?**
29+
30+
**Any open or closed issues related to this feature request?**

0 commit comments

Comments
 (0)