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

Add a generic ItemPageLicenseFieldComponent #3338

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

abelgomez
Copy link
Contributor

@abelgomez abelgomez commented Sep 20, 2024

References

Description

This PR adds a new ItemPageLicenseFieldComponent, which allows showing generic rights information. If the component detects that the rights information points to a Creative Commons license, it delegates the rendering to the existing ItemPageCcLicenseFieldComponent.

If non-default properties are used to indicate CC licenses, they must be exposed in the backend (see DSpace/DSpace#9882).

If the item contains the same numbers of URIs than license names/descriptions, the links will be associated to the names/descriptions in the order they appear. If not, all fields will be explicitly listed (see example below).

Instructions for Reviewers

Create an item with the following properties:

License should be rendered as a license text with a link:

imagen

Create an item with the following properties:

Licenses should be rendered as list of licenses with links:

imagen

Create an item with the following properties:

Licenses should render all fields explicitly (and URIs will be rendered as links), since no matching can be established between the license names and the links:

imagen

Create an item with the following properties:

License will be rendered as in DSpace 8 using ItemPageCcLicenseFieldComponent:

imagen

NOTE: instructions to test this PR when custom fields are used for the CC license are not given since that requires #3165 to be merged in the main branch. If #3165 is merged, this PR will be updated accordingly with new instructions.

Checklist

This checklist provides a reminder of what we are going to look for when reviewing your PR. You do not need to complete this checklist prior creating your PR (draft PRs are always welcome).
However, reviewers may request that you complete any actions in this list if you have not done so. If you are unsure about an item in the checklist, don't hesitate to ask. We're here to help!

  • My PR is created against the main branch of code (unless it is a backport or is fixing an issue specific to an older branch).
  • My PR is small in size (e.g. less than 1,000 lines of code, not including comments & specs/tests), or I have provided reasons as to why that's not possible.
  • My PR passes ESLint validation using npm run lint
  • My PR doesn't introduce circular dependencies (verified via npm run check-circ-deps)
  • My PR includes TypeDoc comments for all new (or modified) public methods and classes. It also includes TypeDoc for large or complex private methods.
  • My PR passes all specs/tests and includes new/updated specs or tests based on the Code Testing Guide.
  • My PR aligns with Accessibility guidelines if it makes changes to the user interface.
  • My PR uses i18n (internationalization) keys instead of hardcoded English text, to allow for translations.
  • My PR includes details on how to test it. I've provided clear instructions to reviewers on how to successfully test this fix or feature.
  • If my PR includes new libraries/dependencies (in package.json), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.
  • If my PR includes new features or configurations, I've provided basic technical documentation in the PR itself.
  • If my PR fixes an issue ticket, I've linked them together.

Copy link

Hi @abelgomez,
Conflicts have been detected against the base branch.
Please resolve these conflicts as soon as you can. Thanks!

@abelgomez abelgomez changed the base branch from dspace-8_x to main September 20, 2024 15:22
@abelgomez abelgomez marked this pull request as ready for review October 21, 2024 20:16
@abelgomez
Copy link
Contributor Author

This PR should be ready for review.

Sorry for the long list of commits: when changing from the dspace-8_x branch to main I rebased rather than merging, and GitHub shows the commits inbetween.

Since this PR delegates the rendering of CC licenses to the ItemPageCcLicenseFieldComponent, this PR is affected by DSpace/DSpace#9882 and #3165.

I opted to keep ItemPageCcLicenseFieldComponent almost as is to avoid breaking any existing installation that relies on it.

@tdonohue
Copy link
Member

@abelgomez : Could you rebase your changes directly on main? This long list of commits is problematic, as GitHub seems to think they are all part of this PR. It's likely a problem on the branch that you created this PR from. You may need to rebase that branch on latest main to solve the issue.

@abelgomez
Copy link
Contributor Author

As far as I remember, that was exactly the problem that caused the long list of commits: I rebased main onto my branch but GitHub does not detect that those commits were already on "main". I'll try to fix it, and if I fail, I'll close the PR and open a clean one.

@abelgomez
Copy link
Contributor Author

I started from scratch, and cherry-picked the interesting commits. Let me know if you want me to also combine several commits into one for a cleaner history.

Copy link

github-actions bot commented Feb 6, 2025

Hi @abelgomez,
Conflicts have been detected against the base branch.
Please resolve these conflicts as soon as you can. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 🙋 Needs Reviewers Assigned
2 participants