[go: up one dir, main page]

Page MenuHomePhabricator

Introduce a generic unsupported format error message within Citoid UI
Open, Needs TriagePublic

Description

This task involves the work of introducing a generic error message within Citoid that informs people that Citoid is NOT able to generate a citation for the content-type (e.g. PDF) they have entered.

For context, this task is meant to serve as an intermediate step between now and when:

  1. We have the ability to detect and log the specific content type someone is attempting to cite, and subsequently, show them a tailored error message in response. See T365583 for more context about the "now" state.
  2. We offer people a simpler/easier way for them to cite PDFS in way(s) that align with Wikipedia project policies/conventions. See T214038 and T368980.

Story

As someone who is attempting to use Citoid to generate a citation for the PDF I'm wanting to cite in the Wikipedia article I'm editing...

I need to...So that...
Know what content-types the tool I'm using (Citoid) does supportSo that I do not waste my time continuing to try to use the tool for a purpose it does not support
Know this tool (Citoid) does NOT support the content-type I'm trying to cite" "
How else I can generate a citation for the source I'm trying to citeSo that I can complete the edit I'm attempting to make
NOTE: the error message/user experience this ticket is describing needs to cohere with/compliment the experience T364595 implements.

Requirements

MockupCopy
image.png (197×220 px, 33 KB)
We couldn't create a citation for you.<br> The resource is in a [[TBD | format we don't support]]. Create a citation manually below.

QA

Try using Citoid to cite https://upload.wikimedia.org/wikipedia/commons/9/98/Coloring_page_for_Wikipedia_Day_2019_in_NYC.pdf on en.wiki

Event Timeline

We can do this now but not with the specified content-type, as we are returning 415 but not with a specific rejected content type.

So for now I would return something like "Unable to cite unsupported media types such as pdfs, image and movie files."

dchan renamed this task from Introduce a generic unsupported format error within Citoid to Introduce a generic unsupported format error within Citoid UI.Jul 22 2024, 5:22 PM
dchan renamed this task from Introduce a generic unsupported format error within Citoid UI to Introduce a generic unsupported format error message within Citoid UI.

Proposal:
We would have the following message with the first sentence in bold red-error color token with the appropriate error icon, followed by the description in base-black color and a link to documentation on Citoid's supported formats.

We couldn’t create a citation for you.
Learn more about the formats we support
or create one manually below.

Mockup:

citoid-formats.png (1×1 px, 770 KB)

nayoub subscribed.
ppelberg updated the task description. (Show Details)
ppelberg updated the task description. (Show Details)

I find this message kind of confusing because the statements aren't explicitly connected.

"We couldn't make a citation for you because the resource is in a format we don't support" sounds clearer to me.

I find this message kind of confusing because the statements aren't explicitly connected.

"We couldn't make a citation for you because the resource is in a format we don't support" sounds clearer to me.

Great spot, @Mvolz . What do you think about the proposed version below?

Separately: what page do you think should be linked from the format we don't support portion of the message?

We couldn't create a citation for you.<br>
The resource is in a [[TBD | format we don't support]]. Create a citation manually below.
ppelberg moved this task from Ready to Be Worked On to Doing on the Editing-team (Kanban Board) board.
ppelberg added a subscriber: dchan.

Next step(s)

  1. @dchan to verify state of backend updates to ensure necessary information is being passed to front-end to display error message.

Update

  1. Revised desired feedback copy, prompted by idea @Mvolz shared in T369547#10063836.

I find this message kind of confusing because the statements aren't explicitly connected.

"We couldn't make a citation for you because the resource is in a format we don't support" sounds clearer to me.

Great spot, @Mvolz . What do you think about the proposed version below?

Separately: what page do you think should be linked from the format we don't support portion of the message?

We couldn't create a citation for you.<br>
The resource is in a [[TBD | format we don't support]]. Create a citation manually below.

Fine but somewhere along the way the examples of what we mean by "format" have been lost. We need to give an example like "pdf" or else I don't think people will understand.

Resolving as deployed (Went out to group 1 and 2 Tuesday.)

ppelberg added a project: Editing QA.
ppelberg moved this task from Inbox to High Priority on the Editing QA board.

image.png (820×950 px, 90 KB)

⚠️ "Create" button does not have a visible focus state
⚠️ "Create" button is not disabled when there is an error, per expected behaviour from mockup. As a result, users are able to continue retrying

Thanks @EAkinloose, that's really helpful. It looks like the Citoid service might be returning 404 on beta cluster. I'm seeing a 404 error from the REST API:

https://en.wikipedia.beta.wmflabs.org/api/rest_v1/data/citation/mediawiki/https%3A%2F%2Fupload.wikimedia.org%2Fwikipedia%2Fcommons%2F9%2F98%2FColoring_page_for_Wikipedia_Day_2019_in_NYC.pdf?action=query&format=json

That means we never see a 415 error, and therefore never see the more specific error text. @Mvolz is this an expected issue on beta cluster?

Thanks @EAkinloose, that's really helpful. It looks like the Citoid service might be returning 404 on beta cluster. I'm seeing a 404 error from the REST API:

https://en.wikipedia.beta.wmflabs.org/api/rest_v1/data/citation/mediawiki/https%3A%2F%2Fupload.wikimedia.org%2Fwikipedia%2Fcommons%2F9%2F98%2FColoring_page_for_Wikipedia_Day_2019_in_NYC.pdf?action=query&format=json

That means we never see a 415 error, and therefore never see the more specific error text. @Mvolz is this an expected issue on beta cluster?

I don't know how citoid is updated on beta. I know it was never set up with Zotero running behind citoid, so it's not identical to production. It's only recently been adopted by a team (https://phabricator.wikimedia.org/T215217) after being basically stale for years.... I assume that it's just running an old version of citoid from before we implemented 415 (which was months ago). The citoid in prod is updated manually by me. I did find this ticket. T346624

But a youtube video would work anyway, because a youtube link is html, NOT a video link... maybe we need to clarify language more as it's too technical? Instead of "movies", maybe .pdf, .mov, .mp3?