SCIX-850 feat(citation): redesign citation modal, gate settings link by auth - #904
Open
thostetler wants to merge 3 commits into
Open
SCIX-850 feat(citation): redesign citation modal, gate settings link by auth#904thostetler wants to merge 3 commits into
thostetler wants to merge 3 commits into
Conversation
thostetler
force-pushed
the
fix/scix-850-copy-citation-keyformat
branch
from
July 24, 2026 16:38
3101b07 to
a31002c
Compare
thostetler
marked this pull request as ready for review
July 24, 2026 16:44
Contributor
There was a problem hiding this comment.
Pull request overview
Risk summary: Low. Changes are localized to citation export parameter derivation and the Copy Citation modal UI, with added unit tests covering the new behavior.
Changes:
- Added
getBibtexExportParamshelper to consistently derive BibTeX export params (incl. keyformat sanitization) from user settings. - Wired BibTeX-specific params into Copy Citation flows (abstract citation modal + result-list share menu) so they respect account settings.
- Redesigned
AbstractCitationModalfooter actions and gated the settings link behind authentication (tooltip + disabled control for anonymous users).
Findings (priority order):
- low (naming): One new test description mentions “logged-in user” but does not set auth state and does not assert auth-dependent behavior. (See stored PR comment.)
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/components/ResultList/Item/ItemResourceDropdowns.tsx | Passes BibTeX-only export params into the share-menu export citation query. |
| src/components/ResultList/Item/ItemResourceDropdowns.test.tsx | Adds coverage ensuring BibTeX params are included only for BibTeX formats. |
| src/components/AbstractDetails/AbstractCitationModal.tsx | Redesigns the citation modal UI and applies BibTeX params + auth-gated settings link. |
| src/components/AbstractDetails/AbstractCitationModal.test.tsx | Adds coverage for BibTeX param inclusion and authenticated vs anonymous footer behavior. |
| src/api/export/getBibtexExportParams.ts | Introduces helper to derive/export BibTeX-only query params from settings with keyformat sanitization. |
| src/api/export/getBibtexExportParams.test.ts | Adds unit tests for helper behavior across BibTeX / BibTeX ABS / non-BibTeX formats and sanitization. |
| }); | ||
| }); | ||
|
|
||
| test('includes custom bibtex params for a logged-in user when the default format is bibtex', async () => { |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #904 +/- ##
========================================
+ Coverage 67.8% 67.8% +0.1%
========================================
Files 354 358 +4
Lines 41672 41975 +303
Branches 2187 2204 +17
========================================
+ Hits 28223 28437 +214
- Misses 13400 13489 +89
Partials 49 49
🚀 New features to boost your workflow:
|
Copy Citation (abstract-page share options and result-list share menu) ignored the user's custom BibTeX export key format from account settings, unlike the full export page. - Add getBibtexExportParams helper deriving keyformat/journalformat/ authorcutoff/maxauthor from settings, bibtex vs bibtexabs aware - Wire it into AbstractCitationModal and ItemResourceDropdowns - Sanitize keyformat via purifyString to match the export page - Add coverage for custom keyformat, unset settings, and non-bibtex formats
…by auth Redesigns the Copy Citation modal to match the new mockup and makes the "Copy citation settings" shortcut unusable for logged-out users instead of silently sending them to a page middleware would block anyway. - Bigger modal, visible Format label, prominent blue Copy button - Footer links to advanced export options and citation format settings - Anonymous users see a disabled settings button with a tooltip explaining why, instead of a live link - Disabled state uses a real disabled Button behind Tooltip shouldWrapChildren so it's keyboard-focusable and screen-reader visible, not just a styled div - Tests cover hover and keyboard-focus tooltip triggers, plus the enabled state for logged-in users
Copilot review flagged a test title mentioning a logged-in user without asserting auth-dependent behavior.
thostetler
force-pushed
the
fix/scix-850-copy-citation-keyformat
branch
from
July 30, 2026 17:49
a31002c to
959530b
Compare
shinyichen
approved these changes
Jul 31, 2026
shinyichen
left a comment
Member
There was a problem hiding this comment.
Looks good. Just one small question.
| </SimpleLink> | ||
| {isAuthenticated ? ( | ||
| <SimpleLink | ||
| href="/user/settings/export?tab=3" |
Member
There was a problem hiding this comment.
Does tab=3 do anything? I was taken to the first tab.
Member
Author
There was a problem hiding this comment.
Hmm I added it... let me see what's broken now 😅
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.
Copy Citation (abstract-page share options and result-list share menu)
ignored the user's custom BibTeX export key format from account
settings, unlike the full export page. The modal itself was also due
for a visual refresh and a way to reach the citation format setting.