Skip to content

Collection Page - Cards tweaks#735

Merged
ofahimIQSS merged 14 commits intodevelopfrom
730-collection-page-items-tweaks
Jun 4, 2025
Merged

Collection Page - Cards tweaks#735
ofahimIQSS merged 14 commits intodevelopfrom
730-collection-page-items-tweaks

Conversation

@g-saracca
Copy link
Contributor

@g-saracca g-saracca commented Jun 3, 2025

What this PR does / why we need it:

We've identified some discrepancies and areas for improvement in the Collection page cards (collection,dataset and file cards). This effort will address visual fixes and adjust the underlying display logic for various elements.

Collection Card :

  • Affiliation inlined with the title as in JSF version.
  • Parent Collection link in same line as the released date.

Dataset Card :

  • Description now occupies 100% of the card width.
  • Dataset Labels are displayed based on the publicationStatuses property from the search api.
  • Show parent collection link.
  • We are not showing version number now as in the JSF version.
  • Citation DOI link was not rendered as link just text, this PR use the latest js-dataverse version that fix that.

File Card :

  • Description now occupies 100% of the card width.
  • Dataset parent link in same line as the released date.

Which issue(s) this PR closes:

Special notes for your reviewer:

For roles badges I changed it to use "info" variant because now we are using "success" variant for "In Review" status badges. JSF is using also info variant but it has a lighter blue.

I've also added a border to citation boxes in dataset cards to contrast it better with the background, same for deaccessioned citation boxes.

Suggestions on how to test this:

Step 1: Run the Development Environment

  1. Execute npm i.
  2. Navigate with cd packages/design-system && npm i && npm run build.
  3. Return with cd ../../.
  4. Ensure you have a .env file similar to .env.example
  5. Navigate with cd dev-env.
  6. Before running next step, be sure have a fresh unstable dataverse image.
  7. Start the environment using ./run-env.sh unstable.
  8. To verify the environment, visit http://localhost:8000/ and check your local Dataverse installation.

Step 2: Test the changes
Most of the changes here are about Collection, Dataset and File cards layout related. You can see if you are happy with the layout by looking at the stories, this for example is one of the CollectionCard stories, check also DatasetCard and FileCard stories.

  1. Validate that dataset cards show correct labels (Draft, Unpublished, Deaccessioned, In Review) according to their state.
  2. Validate that DOI links in Datase Cards citation box are being showed as links and not plain text.
  3. Validate that Dataset cards show the parent collection link only when they are not being render in that collection specifically.

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

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

Additional documentation:

@github-actions github-actions bot added GREI Re-arch GREI re-architecture-related SPA.Q2 Not related to any specific Q2 feature labels Jun 3, 2025
@g-saracca g-saracca moved this to Ready for Review ⏩ in IQSS Dataverse Project Jun 3, 2025
@g-saracca g-saracca added Size: 3 A percentage of a sprint. 2.1 hours. Original size: 3 labels Jun 3, 2025
@g-saracca g-saracca moved this from Ready for Review ⏩ to In Progress 💻 in IQSS Dataverse Project Jun 3, 2025
@g-saracca g-saracca moved this from In Progress 💻 to Ready for Review ⏩ in IQSS Dataverse Project Jun 3, 2025
@g-saracca g-saracca changed the title 730 collection page items tweaks Collection Page - Cards tweaks Jun 3, 2025
@ChengShi-1 ChengShi-1 self-assigned this Jun 3, 2025
Copy link
Contributor

@ChengShi-1 ChengShi-1 left a comment

Choose a reason for hiding this comment

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

Great job! It looks good, just small changes.

Also, I noticed something new that I hadn't seen before. I can create a separate issue for it, or you can address it in this PR—whichever works best for you.

  1. The url https://doi.org/10.5072/FK2/MJ7BPY in the card is clickable
    SPA VS JSF
    image
  2. The file card's description is placed differently from dataset description.
    SPA VS JSF
    image

overflow: hidden;
font-size: $dv-font-size-sm;
background-color: color.adjust($dv-primary-color, $lightness: 51%);
border: solid 1px color.adjust($dv-primary-color, $lightness: 20%);
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we want the solid border here for dataset card?
SPA ->
image
JSF ->
image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep, I've mentioned this in the PR description, what do you think about it? cc: @ekraffmiller

I've also added a border to citation boxes in dataset cards to contrast it better with the background, same for deaccessioned citation boxes.

@ChengShi-1 ChengShi-1 moved this from Ready for Review ⏩ to In Review 🔎 in IQSS Dataverse Project Jun 3, 2025
@g-saracca
Copy link
Contributor Author

Thanks @ChengShi-1!
About the above two comments.

Also, I noticed something new that I hadn't seen before. I can create a separate issue for it, or you can address it in this PR—whichever works best for you.

  1. The url https://doi.org/10.5072/FK2/MJ7BPY in the card is clickable

That should be fixed in this PR, because it was fixed in this js-dataverse PR that is merged already and this PR is using that version, could you try to install packages again? I can see dataset citations links on my end.

  1. The file card's description is placed differently from dataset description.
    SPA VS JSF

Dataset and File descriptions occupy 100% of the card width, for that they are place below as usually this cards have more information next to the icon/thumbnail.
Collection card description it's placed next to the collection icon as collection card don't have that much information.
I was not able to wrap the text as in JSF without using the float property but I think it looks fine as it is, but I can change anything if you think so 💯
See the stories:

Copy link
Contributor

@ChengShi-1 ChengShi-1 left a comment

Choose a reason for hiding this comment

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

Good!

@github-project-automation github-project-automation bot moved this from In Review 🔎 to Ready for QA ⏩ in IQSS Dataverse Project Jun 3, 2025
@coveralls
Copy link

coveralls commented Jun 3, 2025

Coverage Status

coverage: 97.452% (+0.07%) from 97.386%
when pulling bd7f4e7 on 730-collection-page-items-tweaks
into 16fd1ef on develop.

@cmbz cmbz added the FY25 Sprint 24 FY25 Sprint 24 (2025-05-21 - 2025-06-04) label Jun 4, 2025
@ofahimIQSS ofahimIQSS self-assigned this Jun 4, 2025
@ofahimIQSS ofahimIQSS moved this from Ready for QA ⏩ to QA ✅ in IQSS Dataverse Project Jun 4, 2025
@ofahimIQSS
Copy link
Contributor

ofahimIQSS commented Jun 4, 2025

one quick observation on the root page that displays all the data - when I do a search in JSF: ie. glomerular, the results that have that word "glomerular" appear in bold for that dataset. On the SPA, the word does not appear to be bold after searching for the word.

JSF
image

SPA
image

@g-saracca
Copy link
Contributor Author

one quick observation on the root page that displays all the data - when I do a search in JSF: ie. glomerular, the results that have that word "glomerular" appear in bold for that dataset. On the SPA, the word does not appear to be bold after searching for the word.

Hi @ofahimIQSS , yes, that's not implemented yet and there is already an open issue for that but it's not a priority right now.

@ofahimIQSS
Copy link
Contributor

testing passed- merging PR

@ofahimIQSS ofahimIQSS merged commit 8638764 into develop Jun 4, 2025
14 checks passed
@ofahimIQSS ofahimIQSS deleted the 730-collection-page-items-tweaks branch June 4, 2025 14:29
@github-project-automation github-project-automation bot moved this from QA ✅ to Merged 🚀 in IQSS Dataverse Project Jun 4, 2025
@ofahimIQSS ofahimIQSS removed their assignment Jun 4, 2025
@pdurbin pdurbin moved this from Merged 🚀 to Done 🧹 in IQSS Dataverse Project Jun 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

FY25 Sprint 24 FY25 Sprint 24 (2025-05-21 - 2025-06-04) GREI Re-arch GREI re-architecture-related Original size: 3 Size: 3 A percentage of a sprint. 2.1 hours. SPA.Q2 Not related to any specific Q2 feature

Projects

Status: Done 🧹

Development

Successfully merging this pull request may close these issues.

Collection Page Items Cards tweaks

5 participants