Skip to content

Commit 50e71ba

Browse files
committed
removed citation warning
1 parent d300421 commit 50e71ba

4 files changed

Lines changed: 0 additions & 134 deletions

File tree

vis/js/default-config.js

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -274,9 +274,6 @@ var config = {
274274
cite_vis_km: "Please cite this knowledge map as follows",
275275
cite_vis_sg: "Please cite this streamgraph as follows",
276276
cite_paper: "Cite this document as",
277-
cite_metadata_warn_1: "Unfortunately important metadata is missing",
278-
cite_metadata_warn_2: "for this document (e.g. title, authors, year). Therefore we are unable to provide meaningful citations. If you'd like to find out more about this document, please visit the",
279-
cite_metadata_warn_3: "document's website",
280277
},
281278
ger: {
282279
loading: "Wird geladen...",
@@ -347,9 +344,6 @@ var config = {
347344
cite_vis_km: "Please cite this knowledge map as follows",
348345
cite_vis_sg: "Please cite this streamgraph as follows",
349346
cite_paper: "Cite this document as",
350-
cite_metadata_warn_1: "Unfortunately important metadata is missing",
351-
cite_metadata_warn_2: "for this document (e.g. title, authors, year). Therefore we are unable to provide meaningful citations. If you'd like to find out more about this document, please visit the",
352-
cite_metadata_warn_3: "document's website",
353347
},
354348
ger_linkedcat: {
355349
loading: "Wird geladen...",
@@ -423,9 +417,6 @@ var config = {
423417
cite_vis_km: "Please cite this knowledge map as follows",
424418
cite_vis_sg: "Please cite this streamgraph as follows",
425419
cite_paper: "Cite this document as",
426-
cite_metadata_warn_1: "Unfortunately important metadata is missing",
427-
cite_metadata_warn_2: "for this document (e.g. title, authors, year). Therefore we are unable to provide meaningful citations. If you'd like to find out more about this document, please visit the",
428-
cite_metadata_warn_3: "document's website",
429420
},
430421
eng_plos: {
431422
loading: "Loading...",
@@ -488,9 +479,6 @@ var config = {
488479
cite_vis_km: "Please cite this knowledge map as follows",
489480
cite_vis_sg: "Please cite this streamgraph as follows",
490481
cite_paper: "Cite this document as",
491-
cite_metadata_warn_1: "Unfortunately important metadata is missing",
492-
cite_metadata_warn_2: "for this document (e.g. title, authors, year). Therefore we are unable to provide meaningful citations. If you'd like to find out more about this document, please visit the",
493-
cite_metadata_warn_3: "document's website",
494482
},
495483
eng_pubmed: {
496484
loading: "Loading knowledge map.",
@@ -574,9 +562,6 @@ var config = {
574562
cite_vis_km: "Please cite this knowledge map as follows",
575563
cite_vis_sg: "Please cite this streamgraph as follows",
576564
cite_paper: "Cite this document as",
577-
cite_metadata_warn_1: "Unfortunately important metadata is missing",
578-
cite_metadata_warn_2: "for this document (e.g. title, authors, year). Therefore we are unable to provide meaningful citations. If you'd like to find out more about this document, please visit the",
579-
cite_metadata_warn_3: "document's website",
580565
},
581566
eng_openaire: {
582567
loading: "Loading...",
@@ -666,9 +651,6 @@ var config = {
666651
cite_vis_km: "Please cite this knowledge map as follows",
667652
cite_vis_sg: "Please cite this streamgraph as follows",
668653
cite_paper: "Cite this document as",
669-
cite_metadata_warn_1: "Unfortunately important metadata is missing",
670-
cite_metadata_warn_2: "for this document (e.g. title, authors, year). Therefore we are unable to provide meaningful citations. If you'd like to find out more about this document, please visit the",
671-
cite_metadata_warn_3: "document's website",
672654
},
673655
ger_cris: {
674656
loading: "Wird geladen...",
@@ -732,9 +714,6 @@ var config = {
732714
cite_vis_km: "Please cite this knowledge map as follows",
733715
cite_vis_sg: "Please cite this streamgraph as follows",
734716
cite_paper: "Cite this document as",
735-
cite_metadata_warn_1: "Unfortunately important metadata is missing",
736-
cite_metadata_warn_2: "for this document (e.g. title, authors, year). Therefore we are unable to provide meaningful citations. If you'd like to find out more about this document, please visit the",
737-
cite_metadata_warn_3: "document's website",
738717
},
739718
ger_cris_2: {
740719
loading: "Wird geladen...",
@@ -798,9 +777,6 @@ var config = {
798777
cite_vis_km: "Please cite this knowledge map as follows",
799778
cite_vis_sg: "Please cite this streamgraph as follows",
800779
cite_paper: "Cite this document as",
801-
cite_metadata_warn_1: "Unfortunately important metadata is missing",
802-
cite_metadata_warn_2: "for this document (e.g. title, authors, year). Therefore we are unable to provide meaningful citations. If you'd like to find out more about this document, please visit the",
803-
cite_metadata_warn_3: "document's website",
804780
},
805781
eng_cris_2: {
806782
loading: "Loading...",
@@ -868,9 +844,6 @@ var config = {
868844
cite_vis_km: "Please cite this knowledge map as follows",
869845
cite_vis_sg: "Please cite this streamgraph as follows",
870846
cite_paper: "Cite this document as",
871-
cite_metadata_warn_1: "Unfortunately important metadata is missing",
872-
cite_metadata_warn_2: "for this document (e.g. title, authors, year). Therefore we are unable to provide meaningful citations. If you'd like to find out more about this document, please visit the",
873-
cite_metadata_warn_3: "document's website",
874847
},
875848
eng_gsheets: {
876849
loading: "Updating and retrieving map. This may take a few seconds, please hold on.",
@@ -952,9 +925,6 @@ var config = {
952925
cite_vis_km: "Please cite this knowledge map as follows",
953926
cite_vis_sg: "Please cite this streamgraph as follows",
954927
cite_paper: "Cite this document as",
955-
cite_metadata_warn_1: "Unfortunately important metadata is missing",
956-
cite_metadata_warn_2: "for this document (e.g. title, authors, year). Therefore we are unable to provide meaningful citations. If you'd like to find out more about this document, please visit the",
957-
cite_metadata_warn_3: "document's website",
958928
},
959929
},
960930

vis/js/templates/modals/CitePaperModal.jsx

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,6 @@ const CitePaperModal = ({ open, onClose, paper }) => {
1616

1717
const citationText = paper ? getCitation(paper) : "";
1818

19-
const metadataMissing =
20-
!paper ||
21-
!paper.title ||
22-
!paper.authors_objects ||
23-
paper.authors_objects.length === 0 ||
24-
!paper.year;
25-
2619
return (
2720
// html template starts here
2821
<Modal id="cite_paper_modal" show={open} onHide={onClose}>
@@ -55,24 +48,6 @@ const CitePaperModal = ({ open, onClose, paper }) => {
5548
</div>
5649
<p className="cit-style-desc">{currentStyle.description}</p>
5750
<CopyButton textId={"copy-paper-citation"} textContent={citationText} />
58-
{metadataMissing && paper && (
59-
<p className="cite-paper-warning">
60-
<strong>{loc.cite_metadata_warn_1}</strong>{" "}
61-
{loc.cite_metadata_warn_2}{" "}
62-
<a
63-
href={
64-
paper.list_link.isDoi
65-
? `https://dx.doi.org/${paper.list_link.address}`
66-
: paper.list_link.address
67-
}
68-
target="_blank"
69-
rel="noreferrer"
70-
>
71-
{loc.cite_metadata_warn_3}
72-
</a>
73-
.
74-
</p>
75-
)}
7651
</Modal.Body>
7752
</Modal>
7853
// html template ends here

vis/stylesheets/modules/_modal.scss

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -386,15 +386,3 @@ h5 {
386386
margin-top: 5px;
387387
font-style: italic;
388388
}
389-
390-
.cite-paper-warning {
391-
margin-top: 20px;
392-
393-
a {
394-
border-bottom: 1px solid $link-gray;
395-
396-
&:hover {
397-
border-bottom-width: 2px;
398-
}
399-
}
400-
}

vis/test/component/modals.test.js

Lines changed: 0 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,6 @@ const setup = (overrideModalsObject = {}, overrideStoreObject = {}) => {
7575
cite_vis_sg: "Please cite this streamgraph as follows",
7676
copied_button_text: "Copied",
7777
cite_paper: "Cite this paper",
78-
cite_metadata_warn_1: "Some warning in bold font",
79-
cite_metadata_warn_2: "and the warning continues",
80-
cite_metadata_warn_3: "with a link",
8178
},
8279
},
8380
overrideStoreObject
@@ -316,70 +313,6 @@ describe("Modals component", () => {
316313
).toEqual("Doe, J. (2021). Test paper.");
317314
});
318315

319-
it("renders citation modal with missing metadata (no DOI)", () => {
320-
const paper = { ...EXAMPLE_PAPER, title: undefined };
321-
322-
const storeObject = setup(
323-
{ citedPaper: paper },
324-
{ service: "base", query: { text: "digital education" } }
325-
);
326-
const store = mockStore(storeObject);
327-
328-
act(() => {
329-
render(
330-
<Provider store={store}>
331-
<LocalizationProvider localization={storeObject.localization}>
332-
<Modals />
333-
</LocalizationProvider>
334-
</Provider>,
335-
container
336-
);
337-
});
338-
339-
expect(document.querySelector(".cite-paper-warning").textContent).toEqual(
340-
storeObject.localization.cite_metadata_warn_1 +
341-
" " +
342-
storeObject.localization.cite_metadata_warn_2 +
343-
" " +
344-
storeObject.localization.cite_metadata_warn_3 +
345-
"."
346-
);
347-
});
348-
349-
it("renders citation modal with missing metadata (DOI available)", () => {
350-
const paper = {
351-
...EXAMPLE_PAPER,
352-
title: undefined,
353-
list_link: { ...EXAMPLE_PAPER.list_link, isDoi: true },
354-
};
355-
356-
const storeObject = setup(
357-
{ citedPaper: paper },
358-
{ service: "base", query: { text: "digital education" } }
359-
);
360-
const store = mockStore(storeObject);
361-
362-
act(() => {
363-
render(
364-
<Provider store={store}>
365-
<LocalizationProvider localization={storeObject.localization}>
366-
<Modals />
367-
</LocalizationProvider>
368-
</Provider>,
369-
container
370-
);
371-
});
372-
373-
expect(document.querySelector(".cite-paper-warning").textContent).toEqual(
374-
storeObject.localization.cite_metadata_warn_1 +
375-
" " +
376-
storeObject.localization.cite_metadata_warn_2 +
377-
" " +
378-
storeObject.localization.cite_metadata_warn_3 +
379-
"."
380-
);
381-
});
382-
383316
it("triggers a correct redux action when citation modal is closed", () => {
384317
const storeObject = setup(
385318
{ citedPaper: Object.assign({}, EXAMPLE_PAPER) },

0 commit comments

Comments
 (0)