https://bugzilla.wikimedia.org/show_bug.cgi?id=40124

Krinkle <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #18 from Krinkle <[email protected]> 2012-12-03 21:18:01 UTC ---
(In reply to comment #14)
> [I]'d use 'userjs-' as the prefix, as 'ujs-' isn't too obvious.

I'd recommend using a prefix like "gadget" instead since "user scripts" are
something else ("user scripts" are non-modularised subpages of a User page).

But not "gadget-" itself since that prefix is already reserved for actually
enabling the gadgets themselves.

As for whether we should support allowing arbitrary keys in user preferences
storage, I think not. For the following reasons:

* It can easily conflict with core or extension preferences.

* There is no central registry. No rules, no validation, no labels, no
documentation. It doesn't have a default-value system or any other system.

* It can easily conflict with other gadgets, site scripts and user scripts.

* This has been the case for years in the Special:Preferences backend, but
never on purpose. The recent security fix shows that this was indeed an
undocumented anomaly that that has been fixed accordingly. The point here being
that not keeping this shouldn't break much since it isn't a widespread yet.

So what about the use case mentioned in comment 0? That is valid indeed and has
been filed as bug 21897. In fact implementation has already began in Salvatore
Ingala's branch of the Gadgets extension. It implements a small dedicated
key/value storage for gadgets that want it. It has value type validation and
will provide them in-context. 

Suggesting to:
* Close bug 37187 (special preferences removes unknown keys) as "wont fix",
this is an intended lazy sanitation step.
* Close bug 40124 (this bug) as works for me.  The use case presented here is
bug 21897, which is pending a dedicated implementation that will offer exactly
what gadget authors are looking for and more.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to