Dashboard pages
The admin section of manifest.json puts a module into the Dashboard: pages for its
catalogs in the menu, its view of a player on the player card, live pages of its shared
data and a settings form. It is checked by rudder module build and never changes what a call
does.
"admin": { "pages": [{ "slug": "quests", "title": "Quests", "item": "Quest", "section": "engagement", "icon": "scroll-text", "catalog": "quests", "layout": "cards", "card": {"image": "image", "title": "name", "subtitle": "key", "badges": ["group"]}, "columns": ["image", "name", "key", "group", "window", "period"], "detail": {"sections": [ {"title": "Quest", "fields": ["key", "name", "description", "image", "group"]}, {"title": "Reward", "fields": ["currencies", "items", "autoClaim"]} ]} }], "fields": { "Quest": { "description": {"widget": "markdown"}, "image": {"widget": "image"}, "after": {"widget": "ref", "catalog": "quests"} } }, "labels": { "Period": {"never": "Never", "day": "Every day", "week": "Every week", "month": "Every month"} }, "player": [{ "type": "view", "title": "Quests", "function": "quests", "columns": ["image", "name", "status", "resetsAt", "objectives"], "fields": {"status": {"widget": "badge"}, "objectives": {"widget": "progress"}}, "actions": [{"title": "Reset", "function": "reset", "with": {"quest": "key"}}] }], "settings": {"catalog": "settings", "sections": [{"title": "Rewards", "fields": ["xpPerWin"]}]}}A page of pages is a page in the menu.
| Field | Meaning |
|---|---|
slug, title | The address and the title. The title is the plural noun the designer edits (“Offers”), never prefixed with the module name. |
item | The singular noun of one row (“Offer”): the page says “New offer”. |
section | economy, engagement, players or config: where it sits in the menu. |
icon | One of the icons; the icon of the section without it. |
catalog | The catalog the page edits. |
catalogs | Two or more catalogs shown as one table, the type of a row chosen when it is added (Remote config). Takes only columns. |
layout | table (default), cards, timeline (a catalog with a window) or track (with threshold and lanes). |
columns | The properties in the table. |
sort, filters | The default sort and the filters of the table. |
card | For cards: the properties for image, title, subtitle and badges. |
detail | The page of a row: sections of fields for its form, and children. |
row | Widgets of live data on the page of a row. |
widgets | Widgets of shared data above the rows; a page with widgets and no catalog is a live page. |
The form of a row is built from the schema of its type: title and description label a
field, an enum gives a select, an amount a currency and a number, a window two dates. A page
of a single catalog is a form and takes only detail.sections.
Children
Section titled “Children”detail.children shows on the page of a row the rows of another catalog that belong to it, as
the offers on the page of their store:
"children": [{ "title": "Offers", "item": "Offer", "catalog": "offers", "match": {"store": "key"}, "layout": "table", "columns": ["image", "name", "key", "price", "stock"], "sections": [{"title": "Offer", "fields": ["key", "name", "price", "store"]}]}]match names the property of the child equal to a property of the row. A catalog shown only as
a child has no page of its own.
Fields
Section titled “Fields”fields gives a property of a type its widget, by the type and the property:
| Widget | Meaning |
|---|---|
markdown | A text with formatting. |
image | An uploaded image (png, jpeg or webp, at most 1 MB). |
ref | A key of a row of a catalog of the module, or with module of a required module: {"widget": "ref", "module": "inventory", "catalog": "items"}. |
labels names the values of an enum type, shown wherever a value of the type is. Without
labels a value is shown capitalized.
Player card
Section titled “Player card”player lists the widgets of the module on the player card.
A view is how a person reads the module for one player, on the Overview of the card. It
names a query of the module without arguments; the Dashboard calls it for the player (every
role may) and shows what it answers by its type: a list as rows, an object as its properties,
with the fields hints and labels of the type, amounts with their currency and times as
“in 7 h” ahead or the date behind. Answer in the shape a person reads (names, not only keys;
done of of; when something resets), which suits a game client too.
| Field | Meaning |
|---|---|
title, function | The title and the query. |
columns | The properties shown, all of them without it. |
fields | A property’s title and widget: progress for {done, of} integers with an optional name, or a list of them (a bar per item, “2/5 Matches played”), or badge for a string (a tag, coloured by its place in its enum). |
actions | Functions of the module an operator calls from the view: title, function and with. |
An action with with sits on each row and fills the arguments it names from the row:
{"quest": "key", "metric": "objectives.0.metric"}, property names and list indexes joined by
dots. A form asks for the other arguments, or only confirms when none is left. An action
without with sits at the top of the card of the module, such as Grant. The form follows
the arguments type as a catalog form does: its fields hints (a ref picks a row by its name
and image), labels, and the title and description of each property; a map of numbers,
texts or switches is edited as rows of a name and a value. An optional argument with no hint,
title or description is under Advanced, closed. After an action the view is read again. A view that fails shows its error in its own card only.
rudder module build refuses a view whose function is not a query without arguments or does
not answer an object type of types or a list of them, a column or field the type lacks,
progress or badge on a property of another shape, and an action whose function, arguments
or paths the module lacks.
The other widgets show the data of the player as the module keeps it, on the Overview of a module without a view:
| Widget | Meaning |
|---|---|
action-button | Calls a function of the module for the player, with a form of its arguments and an optional confirm warning. |
counter, value, set, regen, timer, ledger | Shows a field of the player (primitive). |
records | The records of a records field as a table (primitive, columns, fields, and catalog or catalogs to show keys as rows). |
table | Rows of a catalog. |
Shared data
Section titled “Shared data”widgets of a page show the shared type of the module, read only, in the environment chosen in
the header: counter, value, set and regen for a plain field, records for a records
field (50 at a time, with a search by the start of a key, a page per record) and timer for the
pending timers of a kind.
row widgets show on the page of a row the live data under its key: a records widget with a
counter of of a property (“Sold 3 of 100”), or a sorted-set widget with the standings of a
board (key, period and order name the properties of the row).
Settings
Section titled “Settings”settings names a single catalog shown as the Settings tab of the module page, not in the
menu, with sections like a form.
award, backpack, bell, box, boxes, calendar, castle, clock, coins, crown,
database, dice-5, flag, flame, gamepad-2, gem, gift, hammer, heart, key,
layers, lock, mail, map, medal, message-square, package, puzzle, rocket,
scroll-text, settings, shield, shopping-bag, shopping-cart, skull,
sliders-horizontal, sparkles, star, store, sword, swords, target, ticket,
trophy, user, users, wand, zap.
The Calendar
Section titled “The Calendar”A catalog with a window or a period appears on the Calendar, under the title and icon of
its page. See Calendar.