Skip to content

Commit

Permalink
Merge branch 'feature/160-display-actual-file-thumbnails' of https://…
Browse files Browse the repository at this point in the history
…github.com/IQSS/dataverse-frontend into feature/130-dataset-citation-thumbnail
  • Loading branch information
MellyGray committed Oct 27, 2023
2 parents 65ccb16 + 975220d commit d7b844b
Show file tree
Hide file tree
Showing 120 changed files with 3,715 additions and 864 deletions.
20 changes: 17 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,22 +197,36 @@ The environment is accessible through the following URLs:
- SPA: https://beta.dataverse.org/spa
- JSF: https://beta.dataverse.org

## Changes from the Style Guide
## Changes from the original JSF application

### Changes from the Style Guide

The design system and frontend in this repo are inspired by the Dataverse Project [Style Guide](https://guides.dataverse.org/en/latest/style/index.html), but the following changes have been made, especially for accessibility.

### Links
#### Links

We added an underline to links to make them accessible.

### File label
#### File label

Now we are using Bootstrap with a theme, so there is only one definition for the secondary color. Since Bootstrap applies
the secondary color to the labels automatically, the color of the file label is now the global secondary color which is
a lighter shade of grey than what it used to be.

We changed the citation block to be white with a colored border, to make the text in the box more accessible.

### Changes in functionality behavior

Our main goal is to replicate the behavior of the original JSF application in all its functionalities, although during development we have found opportunities to review certain behaviors and apply changes where we find appropriate.

#### Dataset files tab search

The original Dataset JSF page uses Solr to search for files based on the available filters. Past dataset versions are not indexed in Solr, so the filter option is not available (hidden) for such versions. When a version is indexed, the search text is searched in Solr, and Solr grammar can be applied. When the version is not indexed, the search text is searched in the database.

The new SPA does not use Solr as the API endpoint it uses performs all queries on the database. Filters and search options are available for all versions in the same way, homogenizing behavior, although losing the possibility of using the Solr grammar.

The decision of this change is made on the assumption that Solr may not be required in the context of files tab search, whose search facets are reduced compared to other in-application searches. Therefore, if we find evidence that the assumption is incorrect, we will work on extending the search capabilities to support Solr.

## Thanks

<a href="https://www.chromatic.com/"><img src="https://user-images.githubusercontent.com/321738/84662277-e3db4f80-af1b-11ea-88f5-91d67a5e59f6.png" width="153" height="30" alt="Chromatic" /></a>
Expand Down
1 change: 1 addition & 0 deletions dev.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ RUN apk --no-cache add python3 make g++

WORKDIR /usr/src/app/packages/design-system
COPY ./packages/design-system ./
COPY package-lock.json ./
RUN npm install
RUN npm run build

Expand Down
16 changes: 9 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
},
"dependencies": {
"@faker-js/faker": "7.6.0",
"@iqss/dataverse-client-javascript": "2.0.0-pr88.9d7ced6",
"@iqss/dataverse-client-javascript": "2.0.0-pr92.3fbf381",
"@iqss/dataverse-design-system": "*",
"@istanbuljs/nyc-config-typescript": "1.0.2",
"@tanstack/react-table": "8.9.2",
Expand Down Expand Up @@ -164,5 +164,8 @@
"workerDirectory": "public"
},
"readme": "ERROR: No README data found!",
"_id": "[email protected]"
"_id": "[email protected]",
"overrides": {
"@parcel/watcher": "2.1.0"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,18 @@ $navbar-brand-font-size: $dv-brand-font-size;
justify-content: end;
}

.dropdown-menu > .dropdown > .dropdown-toggle {
width: 100%;
text-align: start;
background-color: transparent;
border-color: transparent;
}

.dropdown-menu > .dropdown > .dropdown-toggle:hover {
background-color: $dropdown-link-hover-bg;
border-color: transparent;
}

th {
vertical-align: middle;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@import "src/lib/assets/styles/design-tokens/colors.module";

.border > button {
.border > button, .border > [role="group"] > button {
border: 1px solid $dv-button-border-color;
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,17 @@ interface ButtonGroupProps extends React.HTMLAttributes<HTMLElement> {
vertical?: boolean
}

export function ButtonGroup({ vertical, children, ...props }: PropsWithChildren<ButtonGroupProps>) {
export function ButtonGroup({
vertical,
children,
className,
...props
}: PropsWithChildren<ButtonGroupProps>) {
return (
<ButtonGroupBS vertical={vertical} className={styles.border} {...props}>
<ButtonGroupBS
vertical={vertical}
className={`${styles.border} ${className ? className : ''}`}
{...props}>
{children}
</ButtonGroupBS>
)
Expand Down
44 changes: 42 additions & 2 deletions public/locales/en/dataset.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,48 @@
"learnAbout": "Learn About",
"standards": "Data Citation Standards"
},

"actions": {
"datasetActionButtons": {
"title": "Dataset Action Buttons",
"submitForReview": {
"enabled": "Submit for Review",
"disabled": "Submitted for Review"
},
"publish": {
"title": "Publish Dataset",
"publish": "Publish",
"returnToAuthor": "Return to Author",
"changeCurationStatus": "Change Curation Status",
"removeCurrentStatus": "Remove Current Status"
},
"linkDataset": {
"title": "Link Dataset"
},
"editDataset": {
"title": "Edit Dataset",
"filesUpload": "Files (Upload)",
"metadata": "Metadata",
"terms": "Terms",
"privateUrl": "Private URL",
"thumbnailsPlusWidgets": "Thumbnails + Widgets",
"delete": {
"draft": "Delete Draft Version",
"released": "Delete Dataset"
},
"deaccession": "Deaccession Dataset",
"permissions": {
"title": "Permissions",
"dataset": "Dataset",
"file": "File"
}
},
"accessDataset": {
"title": "Access Dataset"
},
"uploadFiles": "Upload Files"
},
"alerts": {
"draftVersion": "<b>This draft version needs to be published</b>. When ready for sharing, please <b>publish</b> it so that others can see these changes",
"requestedVersionNotFound": "Info – Version {0} was not found. This is version {1}",
"unpublishedDataset": "Privately share this dataset before it is published: {0}"
}
}
Loading

0 comments on commit d7b844b

Please sign in to comment.