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

Collection page show lock/unlock icon for restricted files in the card #576

Conversation

ChengShi-1
Copy link
Contributor

@ChengShi-1 ChengShi-1 commented Jan 8, 2025

What this PR does / why we need it:

In collection page, lock/unlock icon is missing so this PR aims to adding the icon into every restricted file.

  • If the file can be downloaded, unlock icon should appear, otherwise, lock icon should be shown.

Which issue(s) this PR closes:

Special notes for your reviewer:

wait for the IQSS/dataverse-client-javascript#234 to be merged

In FilePreview model

  restricted: boolean
  canbeDownload: boolean
  categories?: string[]
  tabularTags?: string[]
  observations?: number
  variables?: number

Only these two is related to the lock/unlock icon, the other fields would be added from other issue. #564

  restricted: boolean
  canbeDownload: boolean

Suggestions on how to test this:

  1. create a dataset and publish it in JSF
  2. upload a file in a published dataset
  3. restrict the file in JSF ( this function didn't implement in SPA), and publish dataset again
  4. see if the lock icon is shown on collection page in SPA
  5. for admin, an unlock icon should be shown
  6. log out, a lock icon should be shown

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

image
image

@coveralls
Copy link

coveralls commented Jan 8, 2025

Coverage Status

coverage: 97.504% (+0.2%) from 97.315%
when pulling 715fff0 on 548-collection-page-show-lockunlock-icon-for-restricted-files-in-the-card
into 66fd102 on develop.

@ChengShi-1 ChengShi-1 added Size: 3 A percentage of a sprint. 2.1 hours. SPA: Collection Page GREI Re-arch GREI re-architecture-related Original size: 3 SPA.Q4.2 Collection Page: Extended item cards information FY25 Sprint 14 FY25 Sprint 14 (2025-01-02 - 2025-01-15) labels Jan 8, 2025
@ChengShi-1 ChengShi-1 assigned ChengShi-1 and unassigned ChengShi-1 Jan 8, 2025
@ChengShi-1 ChengShi-1 marked this pull request as ready for review January 8, 2025 19:35
@g-saracca g-saracca self-assigned this Jan 14, 2025
Copy link
Contributor

@g-saracca g-saracca 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, some questions.

@GPortas GPortas added the SPA.Q1 Not related to any specific Q1 feature label Jan 15, 2025
Copy link
Contributor

@g-saracca g-saracca 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!

@ofahimIQSS ofahimIQSS self-assigned this Jan 15, 2025
@ofahimIQSS
Copy link
Contributor

image
image

Testing Passed Merging PR

@ofahimIQSS ofahimIQSS merged commit 3e7508c into develop Jan 15, 2025
10 of 14 checks passed
@ofahimIQSS ofahimIQSS deleted the 548-collection-page-show-lockunlock-icon-for-restricted-files-in-the-card branch January 15, 2025 17:22
@ofahimIQSS ofahimIQSS removed their assignment Jan 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FY25 Sprint 14 FY25 Sprint 14 (2025-01-02 - 2025-01-15) GREI Re-arch GREI re-architecture-related Original size: 3 Size: 3 A percentage of a sprint. 2.1 hours. SPA: Collection Page SPA.Q1 Not related to any specific Q1 feature SPA.Q4.2 Collection Page: Extended item cards information
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Collection Page: show lock/unlock icon for restricted files in the card
5 participants