Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
164 changes: 155 additions & 9 deletions openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20786,6 +20786,47 @@ paths:
"403":
$ref: '#/components/responses/ForbiddenError'

/guidance_panels/illustrations:
get:
tags: [Guidance Panels]
summary: List the illustrations an animation can play
description: |
The flat illustrations of a feature's screens that an Intro's or announcement's animation can play
(an illustration storyboard; see `GuidancePanelStoryboard`). Developers add them to Makerble; they
can't be uploaded through the API. Each has its `name` (the storyboard's `illustration`, or a
`scene` step's), its `view_box` (`[x, y, width, height]`, the units a `crop` is given in) and its
`parts`, which steps target: a `field` is filled in by `type` and `swap`, a `scroll` part is
scrolled by `scroll`, and any part can appear, be pointed at, highlighted, clicked or zoomed on.
Only Makerble staff with System Access, with their own token.
operationId: listGuidancePanelIllustrations
security: [{tokenAuth: []}]
parameters:
- $ref: '#/components/parameters/Page'
- $ref: '#/components/parameters/PerPage'
responses:
"200":
description: Paginated list of illustrations, by name
content:
application/json:
schema:
$ref: '#/components/schemas/PaginatedGuidancePanelIllustrations'
example:
page: 1
page_size: 1
page_count: 3
total_count: 3
data:
- name: event_booking
view_box: [0, 0, 1600, 1000]
parts:
- { name: content, kind: part }
- { name: first_name, kind: field }
- { name: confirmation, kind: part }
"401":
$ref: '#/components/responses/Unauthorized'
"403":
$ref: '#/components/responses/ForbiddenError'

/guidance_panels/{key}:
parameters:
- name: key
Expand Down Expand Up @@ -20832,8 +20873,9 @@ paths:
(unlisted videos) or `https://player.vimeo.com/video/<id>?h=<hash>`. An empty `vimeo_url` puts the
page back to its fallback visual.

`storyboard` is the Intro's animation, drawn from Makerble building blocks when there is no Vimeo
link (see `GuidancePanelStoryboard` for its rules). Send it as an object, or `null` to remove it.
`storyboard` is the Intro's animation, drawn from Makerble building blocks, or from one of the
feature's illustrations (`GET /guidance_panels/illustrations`), when there is no Vimeo link (see
`GuidancePanelStoryboard` for its rules). Send it as an object, or `null` to remove it.

`feature_tour_id` chooses the feature tour the Intro offers with "Take the tour" (`null` for none).
It sets that tour's `page_key` to this Intro and unlinks any other tour that pointed here, naming it in
Expand Down Expand Up @@ -33082,7 +33124,22 @@ components:
GuidancePanelStoryboardStep:
type: object
description: |
One step of an Intro animation. Steps play in order, evenly spread across the loop.
One step of an Intro animation. Steps play in order, evenly spread across the loop, or each at its
`at` (seconds from the start of the loop, to one decimal place, in order; on every step or on none).

In an illustration storyboard, steps work on the illustration's parts:

- `appear` shows a `part` with a `motion`: `fade`, `rise`, `lift` (the default) or `pop`. Parts that
no `appear` names are there from the start.
- `move_cursor` (with optional `seconds`, 0.2 to 3), `click`, `highlight` and `zoom` act on the part
named in `target`. The cursor glides in from the bottom right corner on a gentle arc.
- `type` and `swap` fill in a `field` part with `text`; `scroll` moves a `scroll` part `to` 0 (the
top) or 1 (the bottom), or between, over `seconds` (0.2 to 10).
- `scene` starts a new scene with another `illustration`, with a `transition` of `cut`, `fade` (the
default) or `slide`. A slide moves the `moving` part, which both illustrations must have, out to
the left and in from the right, while everything else (a header, say) stays put.

In a building-block storyboard:

- `appear` puts a building block on the stage: `block` (required), and optionally an `id` that later
steps target, a `text` label, a `value` (required for a `chart_bar`, from 0 to 100, and for a
Expand All @@ -33104,7 +33161,29 @@ components:
properties:
type:
type: string
enum: [appear, move_cursor, click, type, highlight, check, swap, cut, frame, carry, zoom]
enum: [appear, move_cursor, click, type, highlight, check, swap, cut, frame, carry, zoom, scroll, scene]
at:
type: number
minimum: 0
description: Seconds from the start of the loop that the step plays at
part:
type: string
description: In an illustration storyboard, the part an `appear` step shows
motion:
type: string
enum: [fade, rise, lift, pop]
seconds:
type: number
description: How long a `move_cursor` (0.2 to 3) or `scroll` (0.2 to 10) takes
illustration:
type: string
description: For `scene`, the next scene's illustration
transition:
type: string
enum: [cut, fade, slide]
moving:
type: string
description: For a `slide`, the part that slides, which both illustrations have
block:
type: string
enum: [top_bar, sidebar_item, table_row, card, button, field, chip, avatar, chart_bar, cell, timeline_item, calendar_event, icon]
Expand Down Expand Up @@ -33134,9 +33213,15 @@ components:
type: string
enum: [register, profile, table, web_page, calendar, compare]
to:
type: string
pattern: '^[a-z][a-z0-9_]{0,29}$'
description: For `carry`, the `id` of the block the carried block lands on, which appears after the next `cut`
oneOf:
- type: string
pattern: '^[a-z][a-z0-9_]{0,29}$'
- type: number
minimum: 0
maximum: 1
description: >-
For `carry`, the `id` of the block the carried block lands on, which appears after the next `cut`.
For `scroll`, how far down to scroll, from 0 (the top) to 1 (the bottom).


GuidancePanelStoryboard:
Expand All @@ -33145,6 +33230,12 @@ components:
description: |
An Intro's animation: a short loop of Makerble building blocks drawn in the panel's module colour,
shown when there is no Vimeo link. Up to 8,000 characters of JSON.

An illustration storyboard names an `illustration` instead, and animates its parts, following the
visitor through the feature across scenes. It may run up to 40 seconds, 40 steps and 12,000
characters, push the `camera` slowly in across each loop, and `crop` the first illustration for the
small Intro panel (an announcement plays it uncropped). People who turn off motion, or pause it, see
the finished picture of its last scene.
required: [archetype, loop_seconds, alt, steps]
additionalProperties: false
properties:
Expand All @@ -33158,16 +33249,38 @@ components:
loop_seconds:
type: integer
minimum: 4
maximum: 20
maximum: 40
description: Up to 20 for building blocks, 40 for an illustration storyboard
alt:
type: string
minLength: 10
maxLength: 250
description: What the animation shows, read out by screen readers
illustration:
type: string
description: The first scene's illustration, from `GET /guidance_panels/illustrations`
hold_seconds:
type: number
minimum: 2
maximum: 8
description: How long the finished picture holds before the loop starts again; 2.5 if left out
camera:
type: string
enum: [push]
description: Illustration storyboards only. A slow 2.5% zoom in across each loop
crop:
type: array
items:
type: number
minItems: 4
maxItems: 4
description: >-
Illustration storyboards only. `[x, y, width, height]` of the first illustration, inside its
`view_box`: the piece the small Intro panel shows
steps:
type: array
minItems: 1
maxItems: 24
maxItems: 40
items:
$ref: '#/components/schemas/GuidancePanelStoryboardStep'
example:
Expand Down Expand Up @@ -33333,6 +33446,39 @@ components:
items:
$ref: '#/components/schemas/GuidancePanel'

GuidancePanelIllustration:
type: object
properties:
name:
type: string
example: event_booking
view_box:
type: array
items:
type: number
example: [0, 0, 1600, 1000]
parts:
type: array
items:
type: object
properties:
name:
type: string
example: first_name
kind:
type: string
enum: [part, field, scroll]

PaginatedGuidancePanelIllustrations:
allOf:
- $ref: '#/components/schemas/PaginationEnvelope'
- type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/GuidancePanelIllustration'

PaginatedApiKeys:
allOf:
- $ref: '#/components/schemas/PaginationEnvelope'
Expand Down
8 changes: 8 additions & 0 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -4922,6 +4922,7 @@ function buildDocsPage() {
<p><strong>Who can use these endpoints:</strong> only Makerble staff with System Access, with their own <code>X-User-Email</code> and <code>X-User-Token</code>. Anyone else, an API key and a connected app all get <code>403</code>. The same changes can be made in Site Overview › Guidance Panels, and every change, wherever it is made, is kept as a version that can be seen and restored.</p>
<p><strong>Rules:</strong> a headline of at most 80 characters; 2 to 5 points, each with a <code>lead</code> (up to 40 characters) and <code>text</code> (up to 200); a <code>user_guide_url</code> in the Makerble User Guide (<code>https://makerble.atlassian.net/wiki/spaces/MCPD/…</code>); and a <code>vimeo_url</code> that is empty or one of <code>https://vimeo.com/&lt;id&gt;</code>, <code>https://vimeo.com/&lt;id&gt;/&lt;hash&gt;</code> (unlisted) or <code>https://player.vimeo.com/video/&lt;id&gt;?h=&lt;hash&gt;</code>.</p>
<p><strong>Animation storyboard:</strong> when there is no Vimeo link, a panel can show a looping animation of Makerble building blocks, drawn in the page's module colour from its <code>storyboard</code>. A storyboard has an <code>archetype</code> (<code>assemble</code>, <code>flow</code>, <code>journey</code> or <code>concept</code>), <code>loop_seconds</code> (4 to 20), <code>alt</code> (10 to 250 characters describing the animation for screen readers) and 1 to 24 <code>steps</code>. An <code>appear</code> step puts a <code>block</code> on the stage (<code>top_bar</code>, <code>sidebar_item</code>, <code>table_row</code>, <code>card</code>, <code>button</code>, <code>field</code>, <code>chip</code>, <code>avatar</code>, <code>chart_bar</code>, which needs a <code>value</code> from 0 to 100, <code>cell</code>, <code>timeline_item</code> or <code>calendar_event</code>), with an optional <code>id</code> and <code>text</code> (up to 40 characters). <code>move_cursor</code>, <code>click</code>, <code>highlight</code>, <code>check</code>, <code>type</code> (into a <code>field</code>) and <code>swap</code> (new <code>text</code>) act on the block whose <code>id</code> is their <code>target</code>; <code>cut</code> clears the stage for the next scene. For a <code>journey</code>, where one piece of data turns up on page after page by itself: <code>frame</code>, a scene's first step, draws the scene as a simplified page captioned with its <code>text</code> (<code>register</code>, <code>profile</code>, <code>table</code>, <code>web_page</code>, <code>calendar</code> or <code>compare</code>); <code>carry</code> lifts its <code>target</code> and, after the next <code>cut</code>, flies it onto the block whose <code>id</code> is its <code>to</code>; <code>zoom</code> scales in on its <code>target</code> for two beats, then back out. The <code>cell</code> (a tickable Register cell), <code>timeline_item</code> and <code>calendar_event</code> blocks (whose <code>value</code> is the weekday, 1 to 5) belong to those pages, and an <code>avatar</code>, <code>table_row</code>, <code>card</code> or <code>timeline_item</code> can show a <code>face</code> from 1 to 5, one of the Makerble avatars. An <code>icon</code> block shows one of twelve named icons beside its <code>text</code> (its <code>icon</code> is <code>pin</code>, <code>map</code>, <code>calendar</code>, <code>clock</code>, <code>document</code>, <code>chart</code>, <code>people</code>, <code>home</code>, <code>envelope</code>, <code>phone</code>, <code>star</code> or <code>heart</code>), for a concept's metaphor. A chip, card or row shows a tick box only if a <code>check</code> step ticks it. People who turn off motion see the last frame. The response's <code>visual</code> is <code>storyboard</code> while one is showing.</p>
<p><strong>Illustration storyboards:</strong> instead of blocks, a storyboard can name an <code>illustration</code>, one of the flat drawings of a feature's screens listed by <code>GET /guidance_panels/illustrations</code>, and animate its parts across scenes. <code>appear</code> shows a <code>part</code> with a <code>motion</code> (<code>fade</code>, <code>rise</code>, <code>lift</code> or <code>pop</code>); <code>move_cursor</code> (optional <code>seconds</code>), <code>click</code>, <code>highlight</code> and <code>zoom</code> act on a part; <code>type</code> and <code>swap</code> fill in a <code>field</code> part; <code>scroll</code> moves a <code>scroll</code> part <code>to</code> 0 (top) or 1 (bottom) over <code>seconds</code>; and <code>scene</code> moves to another <code>illustration</code> with a <code>cut</code>, <code>fade</code> or <code>slide</code> (whose <code>moving</code> part slides out left and in from the right while the header stays put). Any storyboard can time its steps with <code>at</code> (seconds from the start of the loop, on every step or none) and set <code>hold_seconds</code> (2 to 8). An illustration storyboard can also push the <code>camera</code> in slowly, and <code>crop</code> its first illustration for the small Intro panel; announcements play it uncropped. It may run up to 40 seconds, 40 steps and 12,000 characters.</p>
</div>
<div class="endpoint-list">
${endpointCard("GET", "/guidance_panels", "List the Guidance Panels", true, [
Expand All @@ -4932,6 +4933,13 @@ function buildDocsPage() {
{ code: "200", cls: "response-2xx", desc: "Paginated list of panels, by page name" },
{ code: "403", cls: "response-4xx", desc: "No System Access, or called with an API key or connected app" }
])}
${endpointCard("GET", "/guidance_panels/illustrations", "List the illustrations an animation can play", true, [
{ name: "page", type: "integer", required: false, desc: "Page number" },
{ name: "per_page", type: "integer", required: false, desc: "Records per page" }
], [
{ code: "200", cls: "response-2xx", desc: "Paginated list of illustrations: each one's <code>name</code>, <code>view_box</code> and <code>parts</code>, each a <code>{name, kind}</code> where kind is <code>part</code>, <code>field</code> or <code>scroll</code>" },
{ code: "403", cls: "response-4xx", desc: "No System Access" }
])}
${endpointCard("GET", "/guidance_panels/{key}", "Get a Guidance Panel and its recent changes", true, [
{ name: "key", in: "path", type: "string", required: true, desc: "The panel's key, e.g. <code>events</code>" }
], [
Expand Down
Loading