daniel added a subscriber: Anomie.
daniel added a comment.

Copied from https://gerrit.wikimedia.org/r/c/mediawiki/core/+/434544/32/includes/Revision/SlotRoleRegistry.php#183, for further discussion here:

@Anomie:

I'm not so sure of this. A TemplateStyles stylesheet slot on a template should be allowed, but probably shouldn't be "desired" (most templates don't need one), but we certainly don't want to force TemplateStyles to make its own special page for adding and editing it and we do want to allow edits to templates that have a stylesheet to change both slots at once.

@daniel:

The intended use of "desired" is "automatically offered when creating and editing". If you want this to "just work" for TemplateStyles without any special cases or hooks, "then TemplateStyles would indeed be "desired".

Maybe "desired" sounds too strong, but I can't think of anything better. "Offered" would be then question when and where.

@Anomie:

I may have been misinterpreting the meaning of "desired". It sounds like you're saying that the difference between "desired" and "allowed" is just whether you can manipulate it via EditPage?

You have four levels defined here: "required", "desired", "allowed", and a default fourth level that I guess would be "disallowed". It seems like you may be conflating two different things in these levels that perhaps should be separate: whether the slot is required/optional/disallowed, and whether the slot can be manipulated by EditPage.

 "required": Slot is required. Whether it can be manipulated by EditPage is not clear.
"desired": Slot is optional, and can be manipulated by EditPage.
 "allowed": Slot is optional, and cannot be manipulated by EditPage.
 default: Slot is not allowed, and presumably cannot be manipulated by EditPage (other than deleting it, I guess). >

Perhaps what we should have here would be more like:

"required": Slot is required.
"recommended": Slot is optional. It should be added to new pages unless the user says not to.
"allowed": Slot is optional. It shouldn't be added to new pages unless the user says to.
Default is "disallowed": Slot isn't allowed.

plus

"editable": Slot may be editable via EditPage and ApiEditPage.
Default is "ignored": Slot is ignored by EditPage and ApiEditPage.

What "editable" actually means is intentionally non-specific at this level. When we get to the point of making EditPage's UI able to handle MCR, we'll probably wind up with a per-slot replacement for the 'AlternateEdit' hook that somehow defines an "editor" (which might not actually allow editing) for each editable slot on the page.


TASK DETAIL
https://phabricator.wikimedia.org/T209927

EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: daniel
Cc: Anomie, Aklapper, gerritbot, daniel, Nandana, Lahi, Gq86, GoranSMilovanovic, QZanden, LawExplorer, JJMC89, Agabi10, D3r1ck01, Wikidata-bugs, aude, Jdforrester-WMF, Mbch331, Ltrlg
_______________________________________________
Wikidata-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to