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

Made ConfirmationModalComponent more generic #2338

Conversation

alexandrevryghem
Copy link
Member

References

Description

Currently the ConfirmationModalComponent uses the name from the DSpaceObjects to render the labels. The problem with this approach is that this modal only works for DSpace object and if you would want to use it for MetadataField (or any other child of ListableObject which isn't a child of DSpaceObject) it wouldn't work. Therefore it's better to only give the name to the modal instead of the whole DSpaceObject object.

Instructions for Reviewers

To make this component more generic I replaced the @Input() dso: DSpaceObject; with @Input() name: string and replaced all the usages

Guidance for how to test this PR:

  • Open all the modals that have been changed and check that the names are still displayed correctly

Checklist

  • 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 yarn lint
  • My PR doesn't introduce circular dependencies (verified via yarn 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.
  • 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.

@alexandrevryghem alexandrevryghem self-assigned this Jun 23, 2023
@alexandrevryghem alexandrevryghem added this to the 8.0 milestone Jun 23, 2023
@alexandrevryghem alexandrevryghem changed the title Improve confirmation modal contribute main Made ConfirmationModalComponent more generic Jun 23, 2023
@tdonohue tdonohue self-requested a review November 30, 2023 15:58
@tdonohue tdonohue added the 1 APPROVAL pull request only requires a single approval to merge label Nov 30, 2023
Copy link
Member

@tdonohue tdonohue left a comment

Choose a reason for hiding this comment

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

👍 Thanks @alexandrevryghem ! Looks good and makes sense. I tested all the confirmation modals/popups that are modified and they all appear to work the same as before.

@tdonohue tdonohue merged commit eee7267 into DSpace:main Jan 19, 2024
Atmire-github pushed a commit to atmire/dspace-angular that referenced this pull request Apr 3, 2024
…criptionViewComponent didn't define name yet, but dso, both should be ok, depending on which is available

DSpace#2338
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1 APPROVAL pull request only requires a single approval to merge code task improvement
Projects
No open projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

Make ConfirmationModalComponent more generic
2 participants