Page MenuHomePhabricator

[QA-task] Creating Types - check User groups workflow
Closed, ResolvedPublic

Description

General notes:

  • the main ticket defining which users can create/modify Types - T299601
  • this task is for evaluation workflow/UX experience

What was tested:

  • are users sufficiently informed when they don't have sufficient rights to create Type?
  • validating that all works according to Help:Wikifunctions/User rights
  • evaluating overall UX workflows
User group: Users

Why it's important:
Users will create new accounts, and therefore will be in Users group, to explore Wikifunctions. It'd be good to make their experience a learning experience, educating them what kind of actions they can and cannot perform.

(1) Wikifunctions:Main Page has a link Create a new Type displayed to any type of users.
Note: If users without sufficient rights could not see the link to create Types, it might eliminate the necessity of error handling on Create Type page.

Screen Shot 2023-06-25 at 9.04.02 AM.png (726×1 px, 135 KB)

(2) the page Special:CreateZObject?zid=Z4 displays Publish icon as a normal progressive button:
Screen Shot 2023-06-21 at 6.30.31 PM.png (1×2 px, 159 KB)

  • a user can click on it without making any changes on a page - the resulting "Publish your changes" dialog will have "Publish" as a primary progressive button:

Screen Shot 2023-06-21 at 8.26.34 PM.png (1×2 px, 250 KB)

  • a user clicks on the Publish button. Only now users get informed that they don't have permission:

Screen Shot 2023-06-21 at 6.31.08 PM.png (1×2 px, 272 KB)

(3) Users in Users group can also click on Create a new Object link on Wikifunctions:Main Page

  • a user then can select Type and do the steps in (2) , clicking the Publish button without making any changes on a page
  • the resulting error message is non-informative:

Screen Shot 2023-06-21 at 8.39.09 PM.png (1×1 px, 247 KB)

(4) A user attempts to type a label (clicking on the pencil button) :
Screen Shot 2023-06-21 at 8.40.42 PM.png (1×2 px, 317 KB)

(5) ET23 user in Users group created an edit on Type: Programming language (https://wikifunctions.beta.wmflabs.org/w/index.php?title=Z61&diff=5148&oldid=4544):

  • Users type should not be able to modify Type (except to for editing Labels)
  • any edit should be recoverable - if a user realizes after publishing that a mistake was made, it should be easy to correct/undo/rollback

Event Timeline

Thanks @Etonkovidova for all the details, this is super useful. Some responses and additional context below:


(1) If users without sufficient rights could not see the link to create Types, it might eliminate the necessity of error handling on Create Type page.

Yes, I believe we should do this, however this will not eliminate the necessity of error handling, because users can reach this page by just:

  • Going to Special:CreateZObject
  • Selecting “Type” in the “Type” field in the “Contents” section

(2) the page Special:CreateZObject?zid=Z4 displays Publish icon as a normal progressive button

We plan to implement a system that can track user’s rights and privileges in the front-end and conditionally allow or disable actions that are forbidden to them. Related tasks:

These are marked as after launch tasks, so for the time being we won’t be able to make the Publish action disabled for different users. We will have to rely on the permissions handling in the PHP layer and a proper reporting so that the user understands the error.


(3) and (4)

I believe we should be looking into these two issues before launch. The errors should be ready and sufficiently informative, so if this is not happening it should be filed as a bug (or multiple).

I think there are three different issues here:

  • 🐛 JSON syntax error: This means that the object that’s being sent to the backend is not well formed, which means there’s some problem on the data representation in the front-end. This is important to fix, as it could affect not only types but other objects
  • 🐛 An empty error: Clearly something should be shown here, but the error is coming without a message or we are handling the error wrong in the front-end
  • 🐛 Error showing in the About widget: The error is saved in the store and is shared among components. This is by design so that each component can reach out and show their error state if there is one. However, the About widget is grabbing the error that doesn’t correspond to it, which is a bug in the About widget itself.

(5) ET23 user in Users group created an edit on Type: Programming language

  • 🐛 Users should not create or edit an object of type Programming Language: this is a bug and should be fixed.
  • Related to this, we need to also restrict granular edition of programming language atribute Z61K1 (code) to only sysops.

I've added the following tasks related to this:

I believe they should all be done before launch.

Change 934643 had a related patch set uploaded (by Jforrester; author: Jforrester):

[mediawiki/extensions/WikiLambda@master] [WIP] Fetch user-rights from the server

https://gerrit.wikimedia.org/r/934643

Per discussion with Elena yesterday, we're marking this as Resolved and following up on the individual tasks.