Skip to content

Conversation

@thostetler
Copy link
Member

Removes eager batch citation fetch from SimpleResultList that fired
export/agu API calls on every page load. Citations are now fetched
lazily in ItemResourceDropdowns when the share dropdown opens.

Also fixes SimpleLink event handler placement for Next.js legacyBehavior.

  • Lazy citation fetch gated on share menu open state
  • Remove batch fetch and prop threading from SimpleResultList/Item
  • Move onMouseEnter/onTouchStart to child element in SimpleLink
  • Add tests for lazy fetch behavior

@codecov
Copy link

codecov bot commented Feb 4, 2026

Codecov Report

❌ Patch coverage is 95.45455% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 61.4%. Comparing base (16137e0) to head (b6cb21d).

Files with missing lines Patch % Lines
...mponents/ResultList/Item/ItemResourceDropdowns.tsx 95.0% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##           master    #790     +/-   ##
========================================
+ Coverage    61.3%   61.4%   +0.2%     
========================================
  Files         307     308      +1     
  Lines       35535   35740    +205     
  Branches     1553    1577     +24     
========================================
+ Hits        21761   21943    +182     
- Misses      13738   13761     +23     
  Partials       36      36             
Files with missing lines Coverage Δ
src/components/SimpleLink/SimpleLink.tsx 95.9% <100.0%> (ø)
...mponents/ResultList/Item/ItemResourceDropdowns.tsx 62.4% <95.0%> (ø)

... and 6 files with indirect coverage changes

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@thostetler thostetler requested a review from shinyichen February 5, 2026 02:45
@thostetler thostetler marked this pull request as ready for review February 5, 2026 02:45
Removes eager batch citation fetch from SimpleResultList that fired
export/agu API calls on every page load. Citations are now fetched
lazily in ItemResourceDropdowns when the user opens the share dropdown.

- Add useGetExportCitation to ItemResourceDropdowns gated on menu open
- Remove batch fetch, bibcodes, defaultCitations from SimpleResultList
- Remove defaultCitation prop threading through Item
- Add tests for lazy fetch behavior
When legacyBehavior is true (default), Next.js Link expects onMouseEnter
and onTouchStart to be on the child element, not the Link itself.
@thostetler thostetler force-pushed the fix/lazy-citation-fetch branch from 93fd890 to b6cb21d Compare February 9, 2026 18:16
@thostetler thostetler merged commit 0dbf76c into adsabs:master Feb 10, 2026
5 checks passed
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.

2 participants