Skip to content

Commit 0849f95

Browse files
LukasWallrichclaude
andcommitted
Update all components with latest changes
Includes updates to annotator, explorer, preprocessing, and shared components. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 0db3d89 commit 0849f95

25 files changed

+3727
-622
lines changed

annotator/css/annotator.css

Lines changed: 357 additions & 15 deletions
Large diffs are not rendered by default.

annotator/index.html

Lines changed: 60 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44
<meta charset="UTF-8">
55
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6-
<title>FReD Annotator - Annotate Reading Lists</title>
6+
<title>FLoRA Annotator - Annotate Reading Lists</title>
77

88
<!-- Stylesheets -->
99
<link rel="stylesheet" href="../shared/css/theme.css">
@@ -24,7 +24,7 @@
2424
<div style="display: flex; align-items: center; gap: 1rem;">
2525
<img src="https://forrt.org/author/forrt/avatar_hu8bc9dda6369ea35e3d2850cf7115c3e5_11296_270x270_fill_q100_h2_lanczos_center_2.webp" alt="FORRT Logo" style="height: 50px; border-radius: 8px;">
2626
<div>
27-
<h1 style="margin: 0;">FReD Annotator</h1>
27+
<h1 style="margin: 0;">FLoRA Annotator</h1>
2828
<p style="margin: 0; opacity: 0.9; font-size: 0.9rem;">Annotate Reading Lists with Replication Information</p>
2929
</div>
3030
</div>
@@ -81,18 +81,59 @@ <h1 style="margin: 0;">FReD Annotator</h1>
8181
Smith, J. (2020). Study title. Journal Name. https://doi.org/10.1234/example
8282
10.5678/another-doi"
8383
></textarea>
84+
85+
<!-- DOI Lookup Section -->
86+
<div class="doi-lookup-section" style="margin-top: 0.75rem; padding: 0.75rem; background: var(--fred-bg-alt); border-radius: 6px;">
87+
<div style="display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap;">
88+
<span style="font-size: 0.875rem; color: var(--fred-text-muted);">Don't have DOIs?</span>
89+
<button class="btn btn-sm btn-secondary" id="btn-lookup-dois" title="Look up DOIs for references without them">
90+
Look up DOIs via CrossRef
91+
</button>
92+
<input type="email"
93+
id="crossref-email"
94+
class="form-control"
95+
placeholder="your@email.com (required by CrossRef)"
96+
style="flex: 1; min-width: 200px; max-width: 300px; font-size: 0.875rem; padding: 0.35rem 0.5rem;">
97+
</div>
98+
<small class="text-muted" style="display: block; margin-top: 0.5rem;">
99+
This will query CrossRef to find DOIs for references that don't already contain them.
100+
</small>
101+
</div>
102+
103+
<!-- Retraction Check Option -->
104+
<div class="retraction-check-section" style="margin-top: 0.75rem; padding: 0.75rem; background: var(--fred-bg-alt); border-radius: 6px; border: 1px solid var(--fred-border);">
105+
<label style="display: flex; align-items: flex-start; gap: 0.5rem; cursor: pointer;">
106+
<input type="checkbox" id="check-retractions" style="margin-top: 0.2rem;">
107+
<div>
108+
<span style="font-size: 0.875rem; font-weight: 500; color: var(--fred-text);">Check for retracted articles</span>
109+
<small class="text-muted" style="display: block; margin-top: 0.25rem;">
110+
Query the Retraction Watch database to identify retracted papers. This will slow down processing as it requires downloading the database (~15MB).
111+
</small>
112+
</div>
113+
</label>
114+
</div>
84115
</div>
85116

86117
<!-- File Upload -->
87118
<div class="form-group">
88119
<label class="form-label" for="file-upload">Or upload a file</label>
89-
<input type="file" id="file-upload" class="form-control" accept=".pdf,.bib,.ris,.txt">
90-
<small class="text-muted">Supported formats: PDF, BibTeX (.bib), RIS (.ris), plain text (.txt)</small>
120+
<div class="file-upload-wrapper">
121+
<label for="file-upload" class="custom-file-upload">
122+
Choose File
123+
</label>
124+
<input type="file" id="file-upload" accept=".pdf,.bib,.ris,.txt">
125+
<span class="file-chosen" id="file-chosen">No file chosen</span>
126+
</div>
127+
<small class="text-muted" style="display: block; margin-top: 0.5rem;">Supported formats: PDF, BibTeX (.bib), RIS (.ris), plain text (.txt)</small>
91128
</div>
92129

93130
<!-- Action Buttons -->
94-
<div class="btn-group mt-2">
131+
<div class="btn-group mt-2" id="process-buttons">
132+
<!-- Initial state: single Process button -->
95133
<button class="btn btn-primary" id="btn-process">Process References</button>
134+
<!-- After DOIs added: Add/Replace buttons (hidden initially) -->
135+
<button class="btn btn-primary" id="btn-add-refs" style="display: none;">Add to Selection</button>
136+
<button class="btn btn-secondary" id="btn-replace-refs" style="display: none;">Replace Selection</button>
96137
<button class="btn btn-secondary" id="btn-clear">Clear</button>
97138
</div>
98139
</div>
@@ -114,7 +155,7 @@ <h1 style="margin: 0;">FReD Annotator</h1>
114155
<!-- Tab: Study Selection -->
115156
<div class="tab-content" id="tab-selection">
116157
<div class="card">
117-
<div class="card-header">Studies Found in FReD</div>
158+
<div class="card-header">Studies Found in FLoRA</div>
118159
<div class="card-body">
119160
<!-- Coverage Summary -->
120161
<div id="coverage-chart" style="margin-bottom: 1rem;"></div>
@@ -138,14 +179,15 @@ <h1 style="margin: 0;">FReD Annotator</h1>
138179

139180
<!-- Database Browser -->
140181
<div class="card">
141-
<div class="card-header">Browse FReD Database</div>
182+
<div class="card-header">Browse FLoRA Database</div>
142183
<div class="card-body">
143184
<p class="text-muted">Select additional studies to include in your report.</p>
144185
<table id="database-table" class="display" style="width:100%">
145186
<thead>
146187
<tr>
147-
<th>DOI</th>
188+
<th></th>
148189
<th>Reference</th>
190+
<th>Title</th>
149191
</tr>
150192
</thead>
151193
<tbody></tbody>
@@ -161,7 +203,7 @@ <h1 style="margin: 0;">FReD Annotator</h1>
161203
Replication Report
162204
<div class="btn-group">
163205
<button class="btn btn-sm btn-secondary" id="btn-copy-report">Copy HTML</button>
164-
<button class="btn btn-sm btn-secondary" id="btn-toggle-markdown">Show Markdown</button>
206+
<button class="btn btn-sm btn-secondary" id="btn-copy-markdown">Copy Markdown</button>
165207
<button class="btn btn-sm btn-primary" id="btn-print">Print / Save PDF</button>
166208
</div>
167209
</div>
@@ -171,33 +213,26 @@ <h1 style="margin: 0;">FReD Annotator</h1>
171213
</div>
172214
</div>
173215

174-
<!-- Replicability Plot -->
175-
<div class="card">
176-
<div class="card-header">Effect Size Comparison</div>
177-
<div class="card-body">
178-
<div class="plot-container" id="replicability-plot"></div>
179-
</div>
180-
</div>
181216
</div>
182217
</main>
183218

184219
<!-- Footer -->
185220
<footer style="background: var(--fred-bg-alt); padding: 1rem 0; margin-top: 2rem; text-align: center; color: var(--fred-text-muted);">
186221
<div class="container">
187-
<p>FReD Annotator | <a href="https://forrt.org" target="_blank">FORRT</a> | Data last updated: <span id="data-updated">Loading...</span></p>
222+
<p>FLoRA Annotator | <a href="https://forrt.org" target="_blank">FORRT</a> | Data last updated: <span id="data-updated">Loading...</span></p>
188223
</div>
189224
</footer>
190225

191226
<!-- Welcome Modal -->
192227
<div class="modal-overlay" id="welcome-modal">
193228
<div class="modal">
194229
<div class="modal-header">
195-
<h3>Welcome to FReD Annotator</h3>
230+
<h3>Welcome to FLoRA Annotator</h3>
196231
<button class="modal-close" onclick="document.getElementById('welcome-modal').classList.remove('active')">&times;</button>
197232
</div>
198233
<div class="modal-body">
199234
<p>
200-
The <strong>FReD Annotator</strong> helps you identify which studies in your reading list
235+
The <strong>FLoRA Annotator</strong> helps you identify which studies in a reference list, journal article or reading list
201236
have been replicated and what the outcomes were.
202237
</p>
203238
<h4>How to use:</h4>
@@ -206,17 +241,13 @@ <h4>How to use:</h4>
206241
<li><strong>Study Selection:</strong> Review matched studies and select additional ones</li>
207242
<li><strong>Report:</strong> Generate an annotated report to share or save</li>
208243
</ol>
209-
<h4>Legend</h4>
210-
<ul style="list-style: none; padding-left: 0;">
211-
<li><span style="color: darkgreen;">&#x2714;</span> <strong>Success:</strong> All replications succeeded</li>
212-
<li><span style="color: darkred;">&#x2716;</span> <strong>Failure:</strong> All replications failed</li>
213-
<li>&#x2753; <strong>Mixed:</strong> Mixed results across replications</li>
214-
<li>&#x2754; <strong>N/A:</strong> Original study not significant</li>
215-
<li>&#x270F; <strong>Not Coded:</strong> Outcome not yet coded</li>
216-
</ul>
217244
</div>
218245
<div class="modal-footer">
219-
<button class="btn btn-primary" onclick="document.getElementById('welcome-modal').classList.remove('active')">Get Started</button>
246+
<label style="display: flex; align-items: center; gap: 0.5rem; font-size: 0.875rem; cursor: pointer;">
247+
<input type="checkbox" id="welcome-dont-show">
248+
Don't show this again
249+
</label>
250+
<button class="btn btn-primary" id="welcome-close-btn">Get Started</button>
220251
</div>
221252
</div>
222253
</div>
@@ -232,6 +263,7 @@ <h4>Legend</h4>
232263
<script src="../shared/js/success-criteria.js"></script>
233264
<script src="../shared/js/data-loader.js"></script>
234265
<script src="js/doi-parser.js"></script>
266+
<script src="js/retraction-checker.js"></script>
235267
<script src="js/report-generator.js"></script>
236268
<script src="js/app.js"></script>
237269
</body>

0 commit comments

Comments
 (0)