Skip to content

Export references#392

Merged
cguedes merged 2 commits into
mainfrom
345-export-references
Aug 22, 2023
Merged

Export references#392
cguedes merged 2 commits into
mainfrom
345-export-references

Conversation

@sehyod

@sehyod sehyod commented Aug 22, 2023

Copy link
Copy Markdown
Collaborator

This adds the function to exports the entire list of references as a .bib file. Clicking on the button opens a dialog to choose where the file should be saved (defaulting to the exports folder of the project)
When no reference has been ingested, the button is disabled

Closes #345

@sehyod sehyod requested a review from cguedes August 22, 2023 14:20
@codecov

codecov Bot commented Aug 22, 2023

Copy link
Copy Markdown

Codecov Report

Merging #392 (235e8ad) into main (a1c7f9e) will decrease coverage by 0.45%.
Report is 1 commits behind head on main.
The diff coverage is 57.89%.

@@            Coverage Diff             @@
##             main     #392      +/-   ##
==========================================
- Coverage   84.16%   83.72%   -0.45%     
==========================================
  Files         175      159      -16     
  Lines       10016     9149     -867     
  Branches     1101     1103       +2     
==========================================
- Hits         8430     7660     -770     
+ Misses       1575     1478      -97     
  Partials       11       11              
Files Changed Coverage Δ
src/io/filesystem.ts 75.17% <11.11%> (-4.37%) ⬇️
src/components/PanelSection.tsx 100.00% <100.00%> (ø)
...rc/features/references/sidebar/ReferencesPanel.tsx 98.36% <100.00%> (ø)
src/wrappers/EventsListener.tsx 100.00% <100.00%> (ø)

... and 16 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Comment thread src/io/filesystem.ts
}
type RenameFileResult = Promise<{ success: false } | { success: true; newPath: string }>;

export async function exportReferences(references: ReferenceItem[]) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

nit: you need to add this to the __mocks__/filesystem.ts

@cguedes cguedes merged commit 9056422 into main Aug 22, 2023
@cguedes cguedes deleted the 345-export-references branch August 22, 2023 15:29
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.

Export references as .bib

2 participants