
Sandboxes are test pages where users can test code without the fear of messing something up.
General info
- There are three main types of sandboxes:
- Sandboxes provided by the wiki
- Personal sandboxes
- Template sandboxes
For All Mankind Wiki sandboxes
- The For All Mankind Wiki provides the following sandboxes which can be used by anyone:
- Sandbox
A generic sandbox where everyone can test teir code.
Located in the "Project" namespace.
- {{Test}}
A sandbox in the Template namespace that can be used to test templates, template-code, parser functions, etc.
- sandbox.css
A sandbox to test CSS code to be used for TemplateStyles.
Uses the sanitized CSS content model that is needed by TemplateStyles.
Located on a subpage of {{Test}}
- Sandbox
- Note that all these sandboxes may be occasionally blanked by an admin after a while.
Personal sandboxes
- Users can have their own personal sandbox(es) on a subpage of their user page.
- They can be located anywhere under their user, for example at
User:<username>/sandboxUser:<username>/sandboxes(../sandbox-2. etc.).
- Personal sandboxes can be created manually by just creating that page.
- Or it can be created using a preload template by clicking here. This will create a sandbox at
User:<username>/Sandbox.
- Note
- Personal sandboxes are personal. Do not edit other user's sandbox without permission.
CSS sandbox
- Users can test CSS code in their personal CSS file, or they can create a new CSS file on their user space and import it into their common.css.
- Note that any CSS page created on a subpage of the User namespace will have the content model "CSS" by default, which allows all CSS rules.
- Users may also want to test CSS to be used for TemplateStyles. This requires the CSS file to have the so-called sanitized CSS content model, which has some restrictions.
- There are two ways to get a personal CSS test page in that model:
- Ask an admin.
Admins can create pages with the sanitized CSS content model and then move it to your user space.
Contact an admin and tell them where you want that page and with what name, and they will do it for you.
- Create a subpage in the template namespace, then move it.
Subpages created in the template namespace with the ending.csshave the sanitized CSS content model by default. After the file is created, it can be move to your user space and it will keep that model.
Such a file could be created on a subpage of {{Test}} without the fear of messing something up.
- Ask an admin.
Template sandboxes
- Template sandboxes can be used to test that specific template.
- All templates that are using the {{Documentation}} template have a link to create a sandbox in the documentation's header box.
- For templates that are not using that doc-template, a sandbox can be created manually, or {{Test}} can be used.
Categorization
- Sandboxes should be categorized so they can be found easily.
- If the template {{Sandbox}} is used, which puts a notice-box on top of the sandbox, this happens automatically, otherwise the category Sandboxes can be added manually.
- CSS sandboxes can be categorized by applying the template {{csscat}} with parameter
sbinside a css comment, like this:/* {{csscat|sb}} */
See also