Skip to content

169 author name firstname lastname spacing on details page#170

Open
amadulhaxxani wants to merge 4 commits into
clarin-v7from
169-author-name-firstname-lastname-spacing-on-details-page
Open

169 author name firstname lastname spacing on details page#170
amadulhaxxani wants to merge 4 commits into
clarin-v7from
169-author-name-firstname-lastname-spacing-on-details-page

Conversation

@amadulhaxxani

Copy link
Copy Markdown

Problem description

Author names were displayed as "LastName,FirstName" (no space after the comma) on the full item page. This looked cramped and was harder to read than the more natural "LastName, FirstName".

Analysis

The clarin-name submission input stores last name and first name separated by a comma without a space. The CMDI export relies on this exact format to split the value correctly, so adding a space at storage time would break the export. The fix is purely in the display layer – a new pipe that adds a single space after the comma for display only.

Problems

None.

Copilot review

  • Requested review from Copilot

Copilot AI review requested due to automatic review settings July 15, 2026 09:44
@amadulhaxxani amadulhaxxani linked an issue Jul 15, 2026 that may be closed by this pull request

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR improves readability of author names on the full item page by formatting displayed author strings as LastName, FirstName without changing how values are stored (preserving downstream CMDI export expectations).

Changes:

  • Added a new Angular pipe (dsFormatAuthor) to normalize comma spacing in author names for display.
  • Registered the new pipe in SharedModule.
  • Updated the full item page template to apply the new formatting for dc.contributor.author values and added unit tests for the pipe.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
src/app/shared/utils/format-author.pipe.ts Adds a display-only pipe to normalize comma spacing in author strings.
src/app/shared/utils/format-author.pipe.spec.ts Adds unit tests validating the pipe’s formatting behavior.
src/app/shared/shared.module.ts Registers the new pipe so it can be used across templates.
src/app/item-page/full/full-item-page.component.html Applies the new pipe when rendering dc.contributor.author metadata values.

Comment thread src/app/item-page/full/full-item-page.component.html
Comment thread src/app/shared/utils/format-author.pipe.spec.ts Outdated
Comment thread src/app/shared/utils/format-author.pipe.ts
…cases

- Change clarin-name separator to ', ' for human-readable DB storage.
- Apply FormatAuthorPipe before makeLinks to avoid breaking URLs.
- Use positive lookahead in regex to prevent trailing space after comma.
- Fix import quote style in pipe spec.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Author name (firstname, lastname) spacing on details page

2 participants