Skip to content

Full item page of entities missing title/name#1839

Merged
tdonohue merged 6 commits intoDSpace:mainfrom
atmire:issue-1833_entity-title-refactor-main
Sep 23, 2022
Merged

Full item page of entities missing title/name#1839
tdonohue merged 6 commits intoDSpace:mainfrom
atmire:issue-1833_entity-title-refactor-main

Conversation

@alexandrevryghem
Copy link
Copy Markdown
Member

References

Description

Use the DSONameService for displaying all the title and name fields for items.

Instructions for Reviewers

Verify for each entity and item with dspace.entity.type that it renders a valid title or a fallback if none can be found in following locations:

  • Full item page
  • Simple item page
  • Search list view
  • Search grid view
  • MyDSpace search list view
  • MyDSpace search grid view
  • Trail/Breadcrumb

List of entity types with corresponding expected title fields:

  • Person: {person.familyName}, {person.givenName} (comma and space only rendering if both present)
  • OrgUnit: organization.legalName
  • (Default) Publication, Project, JournalIssue, Journal, JournalVolume, untyped items and other DSO: dc.title

List of changes in this PR:

  • DSONameService: For the items of type Person the comma in the title ${familyName}, ${givenName} is now only showed when both fields exist
  • DSONameService: When the factories returned null or undefined the getName would still be empty now it will call the Default factory when defined factory returns an empty value
  • The single item pages use the ItemPageTitleFieldComponent instead of their old h2 titles
  • The children of SearchResultListElementComponent now all his use the dsoTitle field instead of retrieving it from the metadata directly
  • The children of ItemSearchResultGridElementComponent now all his use the new dsoTitle field instead of retrieving it from the metadata directly

Include guidance for how to test or review your PR.

  • Go over all the remaining usage of dc.title, person.familyName, person.givenName and organization.legalName and check if they can also use the DSONameService (normally they have all already been changed)

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 TSLint validation using yarn run lint
  • My PR doesn't introduce circular dependencies
  • 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, third-party dependencies (in package.json), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.

@alexandrevryghem alexandrevryghem self-assigned this Sep 20, 2022
@alexandrevryghem alexandrevryghem added bug component: configurable entities related to configurable entities high priority e/6 Estimate in hours component: Item (Archived) Item display or editing labels Sep 20, 2022
@alexandrevryghem alexandrevryghem added this to the 7.4 milestone Sep 20, 2022
@tdonohue tdonohue added the 1 APPROVAL pull request only requires a single approval to merge label Sep 20, 2022
@tdonohue tdonohue self-requested a review September 22, 2022 14:29
@alexandrevryghem alexandrevryghem changed the title Issue 1833 entity title refactor main Full item page of entities missing title/name Sep 22, 2022
@tdonohue
Copy link
Copy Markdown
Member

@alexandrevryghem : This now has minor merge conflicts. I suspect caused by our recent merger of #1780. Could you give it a rebase on the latest main when you get the chance?

Copy link
Copy Markdown
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 ! I tested this today and it fixes the reported bug. I also tested each out-of-the-box entity type, and didn't find any issues with their title/name in search, browse, simple item page or full item page. So, this looks great to me!

@tdonohue tdonohue merged commit a6ee2b8 into DSpace:main Sep 23, 2022
@alexandrevryghem alexandrevryghem deleted the issue-1833_entity-title-refactor-main branch June 10, 2024 14:28
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 bug component: configurable entities related to configurable entities component: Item (Archived) Item display or editing e/6 Estimate in hours high priority

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Full item page of entities missing title/name

2 participants