RESQUE-Framework / website

The Research Quality Evaluation Scheme
https://resque-framework.github.io/website/
MIT License
2 stars 3 forks source link

Add flag for "Top paper" #15

Closed nicebread closed 11 months ago

nicebread commented 11 months ago

Applicants should select their 3 best papers (out of the, say, 10 provided papers). Please implement a checkbox labelled "This is one of my three best papers", with a logic that maximally 3 can be selected. (Maybe an alert if a 4th paper is selected: "You already selected three best papers. Please deselect one of them to select a new one.")

alpkaanaksu commented 11 months ago

Implemented in 83ab761acbfdb313fa9593fea299c2aa768ae6e8

Screenshot 2023-08-31 at 17 48 18

Selected top papers are also shown in the metadata tab, you can click on the 'papers' to switch to the corresponding tab: Screenshot 2023-08-31 at 17 49 42

You get a warning if you try to select more than 3 papers: Screenshot 2023-08-31 at 17 53 48

alpkaanaksu commented 11 months ago

~This introduces some breaking changes, so I updated the pubs version to 0.2.1~ Those changes were not needed.

nicebread commented 11 months ago

Nice!

nicebread commented 11 months ago

But seems to have a bug: I only selected 1 top paper, but the Meta-Tab shows both existing papers and the meta-tab itself:

image
alpkaanaksu commented 11 months ago

That happens, when a paper which is marked as a top paper has no DOI. (everything without a DOI is shown) We don't have another unique identifier for papers. Yesterday I thought that it is safe to assume that all papers have a DOI and there is no way to fix the bug. But thinking about it now, it could actually be fixed by using the position in the result list as the unique identifier. I will try that.

alpkaanaksu commented 11 months ago

Fixed fb7f59e4c1337f39c6dcfd9dc545e365f148d570

I tested it by importing your No Score Paper and creating 3 other no name papers, seems to be working correctly now:

Screenshot 2023-09-01 at 10 05 55
nicebread commented 11 months ago

Thanks! What happens when somebody deletes a publication (which is AFAIK not possible yet - but should be possible - and then the relative position changes? (in nearly all cases a doi should be present, but I can imagine edge cases where no doi is present. So it should work without doi)

alpkaanaksu commented 11 months ago

We don't have hardcoded positions anywhere, so top papers display would still work because they are rendered dynamically after each change. I tested these assumptions by manually removing a paper in the console:

results.splice(index, 1);
save();
location.reload();
nicebread commented 11 months ago

OK, I think we can close it then.