169 author name firstname lastname spacing on details page#170
Open
amadulhaxxani wants to merge 4 commits into
Open
169 author name firstname lastname spacing on details page#170amadulhaxxani wants to merge 4 commits into
amadulhaxxani wants to merge 4 commits into
Conversation
There was a problem hiding this comment.
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.authorvalues 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. |
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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-namesubmission 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