Diferencia entre revisiones de «Wikinoticias:Asistente»

De Wikinoticias, la fuente libre de noticias
Contenido eliminado Contenido añadido
Koavf (discusión | contribs.)
Sin resumen de edición
Línea 1: Línea 1:
The assistants under this parent page are sets of [[Help:dialog|interactive]] pages to aid human users in performing various tasks — from newcomers to experts, from everyday tasks to things that ''might'' come up every few years. We're only starting to learn how to build these, though, so it'll be a while before we have many assistants on-line. List them here as we write them.
The assistants under this parent page are sets of [[Help:dialog|interactive]] pages to aid human users in performing various tasks—from newcomers to experts, from everyday tasks to things that ''might'' come up every few years. We're only starting to learn how to build these, though, so it'll be a while before we have many assistants on-line. List them here as we write them.


There are some important conventions for writing assistants [[#Conventions|at the bottom of this page]].
There are some important conventions for writing assistants [[#Conventions|at the bottom of this page]].

Revisión del 01:58 16 ene 2015

The assistants under this parent page are sets of interactive pages to aid human users in performing various tasks—from newcomers to experts, from everyday tasks to things that might come up every few years. We're only starting to learn how to build these, though, so it'll be a while before we have many assistants on-line. List them here as we write them.

There are some important conventions for writing assistants at the bottom of this page.

List of assistants

Plantilla:Assistant/item

Conventions

  • All the pages of a given assistant are subpages of one parent, which is a child of this page: parent WN:Assistant/<name>, children WN:Assistant/<name>/.... The parent page is a redirect to one of the subpages, and the primary documentation page for the assistant is a subpage WN:Assistant/<name>/doc.
  • Some subpages of an assistant are meant to be accessed by naming them to the view verb; some subpages are are meant to be transcluding them onto another page; and some are made to be accessed either way. The entry point of the assistant should also behave gracefully when accessed directly as a wiki page, so it should use {{dialog/ifsupported}}. To keep these different access modes, with their different behaviors, manageable, follow these principles:
  • Use either {{assistant/viewable}} or {{assistant/transclude}} on each page, and note this in the documentation for the page.
  • Maintain a list, as part of the documentation for each page, of the input parameters it may use, not distinguishing between template parameters and dialog parameters.
  • When transcluding any page, always pass into it all of its input parameters that are available.
  • When using a parameter via markup {{{...}}}, don't nest another template parameter in its default value, such as {{{foo|{{{bar}}}}}}. Non-nesting preserves substitutability by dialog parameters, since dialog parameters are (as of this writing) only substituted for non-nested template parameters.
  • When specifying a data field corresponding to an input parameter, specify the template parameter as an initial value, such as {{dialog/text|id=foobar|{{{foobar|}}}}}. This works for any combination of page viewed or transcluded, parameter passed by template or not, and parameter passed by dialog or not.
  • When specifying a button on any page, always explicitly pass out of it all its input parameters (except things like SUBJECT-CONTENT that aren't passed through an action request). If any of these parameters isn't stored locally as a data field (e.g., via {{dialog/text}} on the current page), explicitly specify the template parameter as a value for the outgoing dialog parameter, such as {{dialog/button/view|...|foobar::{{{foobar|}}}|...}}. This works for, again, any combination of page viewed or transcluded, parameter passed by template or not, and parameter passed by dialog or not.

See also