-
Notifications
You must be signed in to change notification settings - Fork 11
feat(website): improve SeqSet citation metadata #6920
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
Merged
theosanderson
merged 5 commits into
main
from
agent/seqset-citation-authors-and-journals
Jul 21, 2026
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
52c0ba2
feat(website): improve SeqSet citation metadata
theosanderson d31c191
Update schema documentation based on migration changes
actions-user 0f56d4c
fix(website): order citation formatter import
theosanderson 459e33f
style(website): format citation imports
theosanderson d1be6b1
style(website): tighten citation detail spacing
theosanderson File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
1 change: 1 addition & 0 deletions
1
backend/src/main/resources/db/migration/V1.34__add_journal_to_seqset_citation_source.sql
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| alter table seqset_citation_source add column journal text; |
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
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
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
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
35 changes: 35 additions & 0 deletions
35
website/src/components/SeqSetCitations/formatCitationContributors.spec.ts
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| import { describe, expect, test } from 'vitest'; | ||
|
|
||
| import { formatCitationContributors } from './formatCitationContributors'; | ||
|
|
||
| describe('formatCitationContributors', () => { | ||
| test('shows all contributors when there are ten or fewer', () => { | ||
| expect( | ||
| formatCitationContributors([ | ||
| { givenName: 'Jane', surname: 'Doe' }, | ||
| { givenName: 'John', surname: 'Smith' }, | ||
| { givenName: 'Alex', surname: 'Jones' }, | ||
| ]), | ||
| ).toBe('Jane Doe, John Smith, Alex Jones'); | ||
| }); | ||
|
|
||
| test('truncates contributor lists longer than ten with an ellipsis', () => { | ||
| expect( | ||
| formatCitationContributors([ | ||
| { givenName: 'Jane', surname: 'Doe' }, | ||
| { givenName: 'John', surname: 'Smith' }, | ||
| { givenName: 'Alex', surname: 'Jones' }, | ||
| { givenName: 'Sam', surname: 'Taylor' }, | ||
| { givenName: 'Morgan', surname: 'Lee' }, | ||
| { givenName: 'Jordan', surname: 'Patel' }, | ||
| { givenName: 'Casey', surname: 'Brown' }, | ||
| { givenName: 'Taylor', surname: 'Wilson' }, | ||
| { givenName: 'Jamie', surname: 'Davis' }, | ||
| { givenName: 'Robin', surname: 'Garcia' }, | ||
| { givenName: 'Avery', surname: 'Martinez' }, | ||
| ]), | ||
| ).toBe( | ||
| 'Jane Doe, John Smith, Alex Jones, Sam Taylor, Morgan Lee, Jordan Patel, Casey Brown, Taylor Wilson, Jamie Davis, Robin Garcia, ...', | ||
| ); | ||
| }); | ||
| }); |
16 changes: 16 additions & 0 deletions
16
website/src/components/SeqSetCitations/formatCitationContributors.ts
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| import type { CitationContributor } from '../../types/seqSetCitation'; | ||
|
|
||
| const MAX_DISPLAYED_CONTRIBUTORS = 10; | ||
|
|
||
| const formatContributor = ({ givenName, surname }: CitationContributor) => | ||
| [givenName, surname].filter((name) => name).join(' '); | ||
|
|
||
| export const formatCitationContributors = (contributors: CitationContributor[]) => { | ||
| const formattedContributors = contributors.map(formatContributor).filter((name) => name); | ||
|
|
||
| if (formattedContributors.length <= MAX_DISPLAYED_CONTRIBUTORS) { | ||
| return formattedContributors.join(', '); | ||
| } | ||
|
|
||
| return `${formattedContributors.slice(0, MAX_DISPLAYED_CONTRIBUTORS).join(', ')}, ...`; | ||
| }; | ||
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.