Page MenuHomePhabricator

Better UI flow for PDFs
Open, Needs TriagePublic

Description

When people paste pdf links into the citoid field, we generally say "we cannot make a citation for you." However we could probably improve this experience. We could either say "we cannot make citations from pdf, please use the manual tab" or we could open up a predetermined template (i.e. Citation on en wiki) and put the pdf link into the template, and allow them to fill in the other fields.

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." )