Page MenuHomePhabricator

Better UI flow for PDFs
Open, Needs TriagePublic

Description

When people paste pdf links into the citoid field attempt to generate a citation for pdf links in Citoid [i], we generally say "we cannot make a citation for you." However we could probably improve this experience.

This task involves the work of identifying ways in which we could improve the experience for people attempting to use Citoid to generate citations.

The work to implement the specific interventions we identify through this task will happen in separate tickets.

  1. Converging on the intervention to improve this experience that we'

UX Improvement Ideas

IDDescriptionTicket (if any)Reference/mockup
1.Implement field validation so that people are made aware that Citoid does not currently support .pdfs@nayoub is imagining an experience similar to what we currently offer within the link inspector:
Screenshot 2024-07-09 at 10.53.26 AM.png (714×1 px, 411 KB)
2.After tapping the Create button, offer people a way to manually generate the citation themselves.T364595We're imagining something similar to what we're implementing in T364595:
CitoidError_ManualAdd.png (1×1 px, 362 KB)
3.When people attempt to use Citoid to generate a citation for a PDF, pass .pdf URL to a template for them to finish populating

i. Based on what I (@ppelberg) have observed, Citoid offers people feedback about not being able to generate citations for pdfs after they explicitly tap the Create button (en.wiki). Currently, this feedback is NOT offered immediately upon someone pasting a pdf link into Citoid's text field.

Event Timeline

What would be involved in implementing your suggestion of automatically rerouting people to citation template? How often does this happen @mvolvz, the copy tweak makes sense in the mean time.

What would be involved in implementing your suggestion of automatically rerouting people to citation template? How often does this happen @mvolvz, the copy tweak makes sense in the mean time.

On thinking on it some, the most difficult thing is deciding what citation template to use; on en wiki Template:Citation, which is a generalised one, would make sense, but on others you'd probably pick Cite web or something even though it's a document. Maybe not a can of worms we want to open.

Hey @Mvolz we probably won't work on this feature this year, but feel free to ping me if you think that is a mistake or you'd like to discuss that more.

Hey @Mvolz we probably won't work on this feature this year, but feel free to ping me if you think that is a mistake or you'd like to discuss that more.

Thanks! After implementing T243504 it became apparent from the logs that we have a lot of people trying to cite pdfs. So actually I think it needs addressing - there's also the back-end solution too, to actually get good metadata from them as opposed to just handling failure gracefully - T136722

This is stalled I think because it's not clear what we should do. At the very least there should be an error message because PDFs remain our greatest source of failures.

Options:

  • Error message that says "Unfortunately we are unable to automatically get metadata from PDFs. Please try the DOI, title, or a different URL. Alternatively create the citation using the "Manual" tab"
  • Create a link to the pdf inside a ref tag and open up the bare reference editor.
  • Put the url inside a pre-determined default Citation template, such as Citation or Cite web. This is made more complicated by the fact we still don't currently have the ability to switch between citation tabs so if we pick the wrong one, it's hard to change inside VE: T87271

I think we should bite the bullet and have an error message because this is at least trivial to accomplish, doesn't prevent us from doing the other solutions, and this has been open too long.

I find that a great first step is almost always to just improve the error message. This is extremely cheap to do and can greatly improve the user's confidence. The current message "we couldn't make a citation for you" especially doesn't say anything about a reason.

if ( str_ends_with( ".pdf" ) )
    show_error( "Unfortunately, extracting metadata from PDF files is currently not supported. Please try the document's DOI, title, or check if one of the citation templates on the \"Manual\" tab above supports PDFs." )

I believe it should not be too complicated to extract metadata from a PDF file. When viewing a PDF file, external from Wikipedia, and clicking on File properties, we generally see the title, the author, the creation date, etc. as standard properties. Mapping this data onto Citoid standard reference attributes should be obvious.

Because the error always occur with PDF files, it should get (higher) priority to implement this technique. PDF files are a standard document format for academic papers, and reference metadata is always properly filled in for this papers.