wikidata.org should be considered as www.wikidata.org
Closed, ResolvedPublic1 Story Points

Description

Entering wikidata.org in https://xtools.wmflabs.org/ec pop a 500 error, but it should works.
Xtools version: 3-944927f

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJul 16 2017, 10:02 AM

An exception occurred while executing 'SELECT user_id FROM _p.user WHERE user_name = :username LIMIT 1' with params ["Matthewrbowker"]: SQLSTATE[42S02]: Base table or view not found: 1146 Table '_p.user' doesn't exist

@Samwilson I'm assigning this to you, as it lies in your ProjectRepository code.

Matthewrbowker moved this task from Inbox to Working on the XTools board.Jul 17 2017, 9:57 PM
Samwilson set the point value for this task to 1.
Samwilson triaged this task as Normal priority.
Samwilson moved this task from Ready to Needs Review/Feedback on the Community-Tech-Sprint board.
Samwilson moved this task from Working to Pending Review on the XTools board.Aug 22 2017, 3:34 AM

We just need to decide if there should be a spinner in the project field or not (while the project name is being verified).

MusikAnimal added a subscriber: MusikAnimal.EditedTue, Aug 29, 5:31 PM

We just need to decide if there should be a spinner in the project field or not (while the project name is being verified).

So I think these are all the scenarios when doing AJAX based on form changes:

  • Changing the project updates any of:
    • Page title
    • Username
    • Namespace
  • Changing the namespace:
    • Page title

I don't think we want spinners on every affected field, could be ugly :) So I propose we show the spinner on the field that triggers the AJAX (project or namespace, as applicable) and disable the affected fields until the AJAX is complete. How does that sound? @Matthewrbowker thoughts?

Drive-by suggestion: How about a slightly larger spinner in the screen center (on top of the form) if the loading isn't expected to take too long? Having some fields disabled might cause confusion and spinner on every field will definitely be ugly, like MusikAnimal noted.
If the loading will take long and people can fill up other form stuff meanwhile, then maybe not.

Drive-by suggestion: How about a slightly larger spinner in the screen center (on top of the form) if the loading isn't expected to take too long? Having some fields disabled might cause confusion and spinner on every field will definitely be ugly, like MusikAnimal noted.
If the loading will take long and people can fill up other form stuff meanwhile, then maybe not.

It won't be long, roughly one second if it's not cached. E.g. try changing the project at https://xtools.wmflabs.org/topedits. Right now only the namespace field is disabled, but the autocompletion JS is actually reinitialized on both the "Username" and "Page title" fields. We allow them to continue to typing but the results might all of a sudden change on keystroke.

Related, I think we should be caching the namespace API results for more than an hour. Probably more like a week? Changes to a projects' namespaces, API URL, etc., are very, very rare. Caching seems to make the loading time more or less instantaneous.

I think spinners are a good idea, direct feedback to the user quickly. I have no preference as to how it looks, although I would advise against making the form unusable if there's a failure in the processing.

I've updated the patch to show spinners within (at the right end of) the project, user, and page name fields, and removed the spinner from the namespace dropdown (because it's the change in the project input that makes that happen, so that's where the spinner is now).

See what you think.

MusikAnimal closed this task as Resolved.Wed, Aug 30, 3:37 PM
MusikAnimal moved this task from Needs Review/Feedback to Done on the Community-Tech-Sprint board.

Looks good to me! Merged

DannyH moved this task from Untriaged to Archive on the Community-Tech board.Thu, Aug 31, 12:34 AM