Last modified: 2013-10-24 21:14:35 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T57714, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 55714 - "Allowed on wiki" input in OAuth MediaWiki extension needs further thought
"Allowed on wiki" input in OAuth MediaWiki extension needs further thought
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
OAuth (Other open bugs)
unspecified
All All
: Normal normal (vote)
: ---
Assigned To: Chris Steipp
: design
Depends on:
Blocks: 55710
  Show dependency treegraph
 
Reported: 2013-10-14 21:34 UTC by MZMcBride
Modified: 2013-10-24 21:14 UTC (History)
7 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
ManageMyGrants (User-facing) (117.49 KB, image/png)
2013-10-16 18:01 UTC, Chris Steipp
Details
ConsumerRegistration (developers) (109.88 KB, image/png)
2013-10-16 18:01 UTC, Chris Steipp
Details
Add dropdowns for wiki selction (65.06 KB, application/javascript)
2013-10-21 23:55 UTC, Chris Steipp
Details

Description MZMcBride 2013-10-14 21:34:33 UTC
In bug 55703, I suggested not using wiki project IDs in the user interface of the OAuth MediaWiki extension.

However, I'm wondering what the purpose of the "Allowed on wiki" input at [[testwiki:Special:MWOAuthManageMyGrants/manage/34]] is and whether it should be a text input at all. As I see it, there are two options:

1. Switch to a drop-down menu (though it'd be kind of long), but at least would make a lot more sense in the current all or one paradigm. It would eliminate the need to know a wiki project ID or know about the "*" trick.

2. Lose the all or one paradigm and add auto-suggest/auto-complete features to the text input _and_ allow multiple wikis to be entered (comma-separated list or whatever).

I'm not sure why the "allowed on wiki" all or one setup exists (i.e., I don't know the rationale for the original design decision), so opening a bug for further consideration.
Comment 1 Chris Steipp 2013-10-15 20:11:17 UTC
(In reply to comment #0)
> I'm not sure why the "allowed on wiki" all or one setup exists (i.e., I don't
> know the rationale for the original design decision), so opening a bug for
> further consideration.

The architecture decision was made to allow the grants to apply to a single wiki, or all wikis in the cluster, since we anticipate that some applications will want to interact with all wikis, while some users will want to limit the scope of the authorization to a single wiki (I wouldn't want a random website that purports to upload images to commons to also have upload rights to enwiki).

So we want both the OAuth developer (on Special:MWOAuthConsumerRegistration/propose) and the end user (on Special:MWOAuthManageMyGrants/manage/) to specify a single wiki or all wikis. The "*" is just the database representation, so we carried it over.
Comment 2 MZMcBride 2013-10-15 23:34:52 UTC
(In reply to comment #1)
> The architecture decision was made to allow the grants to apply to a single
> wiki, or all wikis in the cluster, since we anticipate that some applications
> will want to interact with all wikis, while some users will want to limit the
> scope of the authorization to a single wiki (I wouldn't want a random website
> that purports to upload images to commons to also have upload rights to
> enwiki).

Okay, if we're moving forward with an all or one model, perhaps a drop-down menu would be best here. The issue is that there are a lot of Wikimedia wikis (over 700, I believe), so a drop-down menu quickly becomes painful to scroll through. If we already know who the user is, though, I wonder if we can't sort a menu by number of edits that the user has. For example, for my account, this would be:

Allowed on wiki:
 * [all]
 * en.wikipedia.org
 * meta.wikimedia.org
 * commons.wikimedia.org
 * [other]

And selecting [other] might then present a text input as a last resort.

I'm still of the belief that using a text input here is a bad idea and should be avoided. There are other (JavaScript-based) solutions we can explore as well.
Comment 3 Chris Steipp 2013-10-16 18:01:09 UTC
Created attachment 13513 [details]
ManageMyGrants (User-facing)
Comment 4 Chris Steipp 2013-10-16 18:01:44 UTC
Created attachment 13514 [details]
ConsumerRegistration (developers)
Comment 5 May 2013-10-16 22:27:26 UTC
Here's what I think could work, we could surface the most selected Wiki when user tries to search for "Wiki" and then mention "There are 790 others results of "Wiki", add more search term to filter the results." And we keep doing that if there are more than 10 search suggestions. If they insist to look at the list of 790 Ids, we'll think of listing them alphabetically or by subject content, etc.

What I'm unsure is how experienced this type of user can be. Do they need help in searching Wikis? If that's the case we will have a different execution for that type of user. But if user is experienced enough to navigate to that page and want to add Wiki project IDs and have a rough idea what to search for, my suggestion could be sufficient. 

What do you guys think?
Comment 6 MZMcBride 2013-10-17 02:22:35 UTC
(In reply to comment #5)
> Here's what I think could work, we could surface the most selected Wiki when
> user tries to search for "Wiki" and then mention "There are 790 others
> results of "Wiki", add more search term to filter the results." And we keep
> doing that if there are more than 10 search suggestions. If they insist to
> look at the list of 790 Ids, we'll think of listing them alphabetically or by
> subject content, etc.

I think adding search functionality is a lot to do for this.

What about a drop-down menu that's similar to:

---
Allow on:

* Current wiki (<name of wiki>)
* All Wikimedia wikis
* Specific Wikimedia wiki...
---

Where selecting the third option ("Specific Wikimedia wiki...") exposes either a full drop-down menu listing every wiki or the text input.

If we go with the text input, we can add some helper auto-complete JavaScript to make it easier to find the specific wiki. Thought at a minimum we need to either eliminate the use of database names or add domain names as secondary lookup keys.

Thoughts?
Comment 7 May 2013-10-17 03:28:26 UTC
That sounds like a great idea. Like I said, I'm unfamiliar with the types of users who make these changes or the kind of different use cases for it. We can even add 

* All Wikimedia wikis except for ..."

if that's helpful. I'd agree we pull out the large list only when we must.
Comment 8 Aaron Schulz 2013-10-17 03:45:04 UTC
I'd strongly like to use domains as an alternate form of input. I originally planned to do that but was derailed by some of the complexity annoyances (wgConf,wmf specific stuff). It can do some host->dbname conversions like getDBName() in MassMessage does under the hood.
Comment 9 p858snake 2013-10-17 03:53:51 UTC
(In reply to comment #6)
> Where selecting the third option ("Specific Wikimedia wiki...") exposes
> either
> a full drop-down menu listing every wiki or the text input.

Displaying a list with checkboxes would probably be better than a drop-down box, although some might say its uglier.
Comment 10 MZMcBride 2013-10-17 03:59:54 UTC
(In reply to comment #8)
> I'd strongly like to use domains as an alternate form of input.

This is bug 55703. :-)
Comment 11 Chris Steipp 2013-10-17 17:02:00 UTC
Re comments 7 & 9, we only allow one value (a single wiki, or "*" representing all wikis).

I agree with Aaron, domain names are probably best.

Doing the dropdown with a second list (dropdown or text) in javascript would be an easy start to mock up. I'll try and get that done this week, unless someone else beats me to it.
Comment 12 Chris Steipp 2013-10-21 23:55:30 UTC
Created attachment 13537 [details]
Add dropdowns for wiki selction

If you run the javascript from this file on the preferences page, it will update the wiki select to a drop down with "All wikis", "Current Wiki", and "Another wiki". The last option will add a text box that lets you type in the dbname or domain name of the wiki you want to grant access to.

Code is ugly and would be integrated into the extension in a nice way. So,

** This is just a mock-up to make sure the UX is ok **
Comment 13 MZMcBride 2013-10-22 01:56:37 UTC
[[testwiki:Special:MWOAuthManageMyGrants/manage/72]] smartly disables per-user JavaScript, but I put the code at [[testwiki:User:MZMcBride/bug55714.js]] so that I could run "importScript('User:MZMcBride/bug55714.js');" from the Chrome developer console and not get "mixing insecure content" warnings.

I think the drop-down menu is a substantial improvement. The drop-down menu, combined with some kind of auto-complete for the database or domain name text input, should make wiki selection vastly easier. :-)
Comment 14 Aaron Schulz 2013-10-24 00:29:31 UTC
Actually this input won't even exist with https://gerrit.wikimedia.org/r/#/c/91488/
Comment 15 Chris Steipp 2013-10-24 15:49:16 UTC
Aaron, it will on the consumer proposal screen still. But since only developers are looking at that, it's definitely lower priority.

I've got a javascript and minimal backend support patch almost done, so I should be able to get that in today.
Comment 16 Aaron Schulz 2013-10-24 17:22:57 UTC
(In reply to comment #15)
> Aaron, it will on the consumer proposal screen still. 

Right, but that is not "allowed on wiki" it's "applicable wiki". With that patch merged I don't see a reason to keep this bug open, since bug 55703 already exists.
Comment 17 Chris Steipp 2013-10-24 21:14:35 UTC
(In reply to comment #16)
> (In reply to comment #15)
> > Aaron, it will on the consumer proposal screen still. 
> 
> Right, but that is not "allowed on wiki" it's "applicable wiki". With that
> patch merged I don't see a reason to keep this bug open, since bug 55703
> already exists.

Ah, good point. Yeah, we'll track the /propose issue there.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links