Skip to content

display funder's name on landing page - #2016

Open
xkyue wants to merge 2 commits into
developfrom
enhancement/display-fundingreference-infomation#2012
Open

xkyue wants to merge 2 commits into
developfrom
enhancement/display-fundingreference-infomation#2012

Conversation

@xkyue

@xkyue xkyue commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Description
Display FundingReference information on DLS DOI landing pages

Testing instructions

  • Review code
  • Check Actions build
  • Review changes to test coverage

Agile board tracking
closes #2012

@codecov

codecov Bot commented Sep 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.71%. Comparing base (610299d) to head (aab20c5).

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #2016   +/-   ##
========================================
  Coverage    96.71%   96.71%           
========================================
  Files          221      221           
  Lines        31672    31689   +17     
  Branches      4785     4789    +4     
========================================
+ Hits         30631    30648   +17     
- Misses        1036     1037    +1     
+ Partials         5        4    -1     
Flag Coverage Δ
common 95.51% <ø> (ø)
dataview 98.42% <100.00%> (+<0.01%) ⬆️
download 96.87% <ø> (ø)
search 95.64% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@xkyue
xkyue requested a review from louise-davies September 18, 2026 15:11

@louise-davies louise-davies left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Works well, just a comment on simplifying the code using map instead of reduce

Comment on lines +181 to +188
const funders =
dataciteData?.attributes.fundingReferences.reduce(
(result: string[], element) => {
result.push(element.funderName);
return result;
},
[]
) ?? [];

@louise-davies louise-davies Sep 21, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is not necessary, the techniques, samples and subjects need to use .reduce() as it's splitting the items up into three different arrays in one pass. Here we're just extracting out the funderNames from an array, so .map() is more appropriate, e.g. dataciteData?.attributes.fundingReferences.map((fr) => fr.funderName).

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.

Display FundingReference information on DLS DOI landing pages

2 participants