Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

230 - Add dataset card info to Home page #248

Conversation

MellyGray
Copy link
Contributor

@MellyGray MellyGray commented Dec 4, 2023

What this PR does / why we need it:

This PR adds the dataset card information to the list of datasets in the Home Page.

Which issue(s) this PR closes:

Special notes for your reviewer:

Please, check that the Home Page PR is reviewed before this one:

Also note that the date format on the card will depend on your browser's language

Suggestions on how to test this:

  1. Install the necessary dependencies using npm install.
  2. Build the design system with cd packages/design-system && npm run build.
  3. Navigate back to the root directory with cd ../../.
  4. Start Storybook with npm run storybook.
  5. Visit the Home in the Storybook
  6. For detailed stories of the Home components you can go to the Home section of the storybook

Does this PR introduce a user interface change? If mockups are available, please link/include them here:

Mock of the dataset info

Captura de pantalla 2023-11-15 a las 10 59 47

Final result

Captura de pantalla 2023-11-14 a las 16 57 23

Is there a release notes update needed for this change?:

Additional documentation:

@coveralls
Copy link

coveralls commented Dec 4, 2023

Coverage Status

coverage: 98.105% (+0.03%) from 98.075%
when pulling 44ac492 on feature/230-add-dataset-info-to-home-page
into bf0760b on feature/229-basic-home-page-with-the-list-of-datasets.

@MellyGray MellyGray added the Size: 3 A percentage of a sprint. 2.1 hours. label Dec 4, 2023
@MellyGray MellyGray marked this pull request as ready for review December 4, 2023 10:39
@MellyGray MellyGray linked an issue Dec 4, 2023 that may be closed by this pull request
@MellyGray MellyGray added the UI Tasks related to the user interface (UI) or frontend development label Dec 4, 2023
@ekraffmiller ekraffmiller self-assigned this Dec 12, 2023
Copy link
Contributor

@ekraffmiller ekraffmiller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The cards look really nice! See below for some comments.

@@ -53,7 +53,13 @@ export function DatasetCitation({ thumbnail, title, citation, version }: Dataset
)
}

function CitationDescription({ citation, version }: { citation: string; version: DatasetVersion }) {
export function CitationDescription({
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is also being used in the DatasetCard, would it make sense to move it to a shared folder?

isDeaccessioned?: boolean
}

export function DatasetThumbnail({ thumbnail, title, isDeaccessioned }: DatasetThumbnailProps) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment as CitationDescription, should this be moved to a shared folder?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also had that debate with myself

The way I see it, the/sharedfolder is not intended for components shared between pages but rather for components that are general enough not to belong to a specific domain entity.

As a result, I refactored CitationDescription to remove the datasetVersion prop, making it more generic, and then moved the CitationDescription component to the /shared folder.

In the case of the DatasetThumbnail, it's tightly coupled to the Dataset domain, so I believe it belongs in the dataset section. I don't see any issues with sharing it with DatasetCard

Let me know what you think

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I can definitely see both sides of that too. The way I understand the src/sections/dataset folder, is that it contains all the components specific to the view dataset page, as opposed to the dataset domain, but they are similar concepts. I think it's ok to keep DatasetThumbnail where it is.

persistentId: faker.datatype.uuid(),
title: faker.lorem.sentence(),
labels: DatasetLabelsMother.create(),
isDeaccessioned: false,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be good to change isDeaccessioned from false to faker.datatype.boolean(), to get some deaccessioned datasets in the test data

Copy link
Contributor Author

@MellyGray MellyGray Dec 14, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right, it wasn't that straightforward but I did the changes to show some deaccessioned datasets in the storybook

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks great, thanks!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed that the JSF version of the card has a small upper right Dataset Icon (to distinguish it from Dataverse cards that also appear in the list.). Is that something we are skipping for now?

Screenshot 2023-12-13 at 12 29 28 PM
Screenshot 2023-12-13 at 12 29 06 PM

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added the icon, thanks!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good!

Copy link
Contributor

@ekraffmiller ekraffmiller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me :)

@ekraffmiller ekraffmiller removed their assignment Dec 18, 2023
@GPortas GPortas self-assigned this Dec 19, 2023
@GPortas
Copy link
Contributor

GPortas commented Dec 19, 2023

Looks good. Merging to test the complete feature on feature/229-basic-home-page-with-the-list-of-datasets

@GPortas GPortas merged commit ff238ce into feature/229-basic-home-page-with-the-list-of-datasets Dec 19, 2023
10 of 12 checks passed
@GPortas GPortas deleted the feature/230-add-dataset-info-to-home-page branch December 19, 2023 16:28
@cmbz cmbz added pm.GREI-d-2.7.1 NIH, yr2, aim7, task1: R&D UI modules for creating datasets and supporting publishing workflows pm.GREI-d-2.7.2 NIH, yr2, aim7, task2: Implement UI modules for creating datasets and publishing workflows labels Jan 29, 2024
jayanthkomarraju pushed a commit to jayanthkomarraju/dataverse-frontend that referenced this pull request May 31, 2024
…-home-page

230 - Add dataset card info to Home page
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pm.GREI-d-2.7.1 NIH, yr2, aim7, task1: R&D UI modules for creating datasets and supporting publishing workflows pm.GREI-d-2.7.2 NIH, yr2, aim7, task2: Implement UI modules for creating datasets and publishing workflows Size: 3 A percentage of a sprint. 2.1 hours. UI Tasks related to the user interface (UI) or frontend development
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add dataset info to the list of datasets in the Home Page
5 participants