Skip to content

SCIX-813 feat(nav): add count badge to graphics menu item#817

Draft
thostetler wants to merge 3 commits intoadsabs:masterfrom
thostetler:feat/SCIX-813-graphics-menu-count
Draft

SCIX-813 feat(nav): add count badge to graphics menu item#817
thostetler wants to merge 3 commits intoadsabs:masterfrom
thostetler:feat/SCIX-813-graphics-menu-count

Conversation

@thostetler
Copy link
Member

Summary

  • Display figure count badge on the Graphics menu item in abstract side nav, matching the pattern used by Citations, References, Credits, and Mentions
  • Add staleTime: 5min to useGetGraphicsCount to reduce redundant refetches when navigating between abstract subpages
  • Fix latent MSW mock handler routing bug (':id''/:id')

Test plan

  • Navigate to an abstract page with graphics — verify badge shows figure count
  • Navigate to an abstract page without graphics — verify menu item is disabled, no badge
  • Navigate between abstract subpages — verify graphics API is not re-called within 5 minutes
  • pnpm test passes (890 tests, 0 failures)

@codecov
Copy link

codecov bot commented Mar 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 62.0%. Comparing base (a7a0d97) to head (7220a63).

Additional details and impacted files
@@           Coverage Diff            @@
##           master    #817     +/-   ##
========================================
+ Coverage    62.0%   62.0%   +0.1%     
========================================
  Files         317     317             
  Lines       36521   36522      +1     
  Branches     1642    1638      -4     
========================================
+ Hits        22608   22619     +11     
+ Misses      13876   13866     -10     
  Partials       37      37             
Files with missing lines Coverage Δ
src/api/graphics/graphics.ts 76.7% <100.0%> (+8.3%) ⬆️
src/components/AbstractSideNav/AbstractSideNav.tsx 95.9% <100.0%> (ø)

... and 3 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 force-pushed the feat/SCIX-813-graphics-menu-count branch from 796687e to 7220a63 Compare March 2, 2026 21:28
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.

1 participant