Skip to content

View customization

A view says how your site wants its wall to look. It is optional. A program that does not know it shows the default wall. The schema is view.schema.json.

All four places take the same shape.

WhereHow
Manifestthe view field
Recipethe view field
Level 1 page<script type="application/json" data-wall-view>{ ... }</script> (the first one counts; invalid JSON is ignored)
Level 3new Wall({ view, hooks })

If the same setting is given in more than one place, the order is: options of new Wall first, then the page, manifest or recipe, then the defaults. hooks is code, so it exists only on Level 3. It can choose which actions an item shows, change a button label, and replace the lines of the panel or the card label. The wall still draws everything and applies the limits below.

"view": {
"actions": {
"favourite": { "label": "Favourite", "labelActive": "Favourited", "icon": "♡", "iconActive": "♥", "placement": "primary", "state": "favourited" },
"cart": { "label": "Add to cart", "placement": "primary", "order": 2 },
"compare": { "label": "Compare", "placement": "more" }
},
"panel": { "fields": ["title", "meta.price", "description"], "side": ["tags"], "metaLabels": { "price": "Price" } },
"wall": { "rows": 4, "radius": 3, "card": { "width": 0.3, "height": 0.3 }, "labelFields": ["title", "meta.price"], "indicator": "favourite" },
"theme": {
"colors": { "accent": "#c9334f", "panel": "rgba(8, 8, 11, 0.85)" },
"environment": { "preset": "night", "stars": true, "dim": 0.4 }
},
"strings": { "signin_on_site": "Sign in on :site first" }
}

Transport and display are separate. actions.<id> in the manifest says how a request is sent (URL, method, auth). view.actions.<id> only says how the button looks.

By action id.

FieldMeaning
label, labelActiveButton text, and the text while the action is on. At most 24 characters.
icon, iconActiveOne or two characters before the label. At most 4 characters.
placementprimary (in the column, at most 3), more (behind “More”) or hidden (no button).
orderSort key. Lower comes first. Equal keys keep the order of the manifest.
styleprimary (always filled) or secondary (filled only while the action is on).
confirmtrue asks for a second press. false does not turn it off where the wall requires it.
stateKey in item.state that says the action is on. Default liked for like, else the action id.
countItem field or item.state key with a number, shown after the label.
FieldMeaning
fieldsLines of the info panel, in order: title, subtitle, creator, collection, description, likes, tags, badges, meta (every pair as Label: value) or meta.<key> (one pair). At most 8. Absent: title, creator, likes and description.
sideWhich links the column beside the picture shows: creator, collection, tags. Default all three.
metaLabelsLabels for the keys of item.meta. Each at most 24 characters.
FieldMeaning
rowsRows of cards.
radius, arcDistance of the wall from the viewer in metres, and how far around it goes in degrees.
card.width, card.heightSize of a card in metres.
labelhover (default) shows the label of the focused card, none shows nothing.
labelFieldsLines of that label: title, subtitle, creator, count or meta.<key>. At most 3.
badgesfalse stops item.badges[0] being drawn on cards. Default true.
indicatorAction id whose state draws the mark on the card. Default like. null: no mark.
FieldMeaning
colorsbg, surface, surfaceHi, text, textSoft, muted, accent, accentStrong, accentText, panel. Hex (#abc or #aabbcc). panel may also be rgba(r, g, b, a).
fontA CSS font family.
environmentpreset (studio, night, plain), colours top, horizon, bottom, floor (hex), stars (boolean), panorama (an image URL around the viewer) and dim (how much the panorama is darkened).

An object of texts by key. They replace the built-in texts of the wall. Placeholders such as :site are filled in by the wall.

SettingAllowed
wall.rowswhole number, 1 to 5
wall.radius1.8 to 4.0
wall.arc60 to 150
wall.card.width0.25 to 0.6
wall.card.height0.25 to 0.7
wall.rows × (card.height + 0.06)at most 2.2 m. Extra rows are dropped.
wall.card.widthat least 0.1 × wall.radius. A narrower card is widened.
wall.labelFieldsat most 3
panel.fieldsat most 8
action label, labelActive, and metaLabels valuesat most 24 characters
action icon, iconActiveat most 4 characters
theme.environment.dim0 to 0.8
theme.environment.panoramahttp or https only. The adapters drop any other value.
colourshex only (panel also rgba(...))

The wall clamps a value outside these limits to the nearest allowed one and writes a [diazoma] view: warning to the console. It also moves a text colour that is hard to read on its background (contrast below 4.5:1) toward black or white. The validator reports a value outside the limits as a failure.

  • Leaving VR, opening a page of the site and any action with mode: "deeplink" always ask for a second press.
  • Text sizes are not configurable.
  • Buttons are the actions the site declares, narrowed by item.actions when an item has it. A site that declares no action gets no action button. Without placement, the first two actions are in the column and the rest are behind “More”.
  • follow follows the item’s collection from the column beside the picture. It becomes a column button only when the view gives it a placement.
  • An answer with a state updates item.state, the button and the mark on the card.
  • A 401, 403 or 419 answer shows the signin_on_site text. When the manifest has auth.login, the button then opens that page, with a second press. Any other failure shows the action_failed text.