From 304c770201791e13f787849a8e81c1d3101f60e4 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 18 Nov 2026 07:25:33 +0000 Subject: [PATCH] Document the animation visuals on announcements CP-9190, PR 2 of 2 Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01F1a5xpSo2UobPNHBqkyNXT --- openapi.yaml | 31 ++++++++++++++++++++++++++++--- server.js | 6 +++--- 2 files changed, 31 insertions(+), 6 deletions(-) diff --git a/openapi.yaml b/openapi.yaml index 71e3318..7badd14 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -18142,10 +18142,12 @@ components: description: The message. Required. visual_type: type: string - enum: [name_change, vimeo, image, none] + enum: [name_change, vimeo, image, intro_animation, storyboard, none] description: >- The name-change animation (Makerble's own only), a Vimeo video, an uploaded image (with `image` and - `image_alt`), or nothing. Changing it from `image` removes the image and its alt text. + `image_alt`), a feature's Intro animation (`intro_animation`, with `intro_key`; Makerble's own only), an + animation of its own (`storyboard`; Makerble's own only), or nothing. Changing it from `image` removes the + image and its alt text. name_changes: type: array minItems: 1 @@ -18170,6 +18172,20 @@ components: type: string maxLength: 250 description: For `image`, required. What the image shows, read out by screen readers. + intro_key: + type: string + description: | + For `intro_animation`: the key of the Intro (guidance panel) whose animation the popup plays, such as + `checklists`. It must have a storyboard. The popup plays the Intro's storyboard as it is when shown, so a + later change to the Intro's animation changes the announcement's too; if the Intro loses its animation, the + popup shows no visual. The usual choice for a feature's announcement. + storyboard: + type: object + additionalProperties: true + description: | + For `storyboard`: an animation of the announcement's own, for when the Intro's doesn't fit (for example when + only one part of a feature is new). The same format and rules as an Intro's storyboard (`archetype`, + `loop_seconds`, `alt`, `steps`); one that breaks them is refused with 422, naming the problem. learn_more_url: type: string nullable: true @@ -18324,7 +18340,7 @@ components: type: string visual_type: type: string - enum: [name_change, vimeo, image, none] + enum: [name_change, vimeo, image, intro_animation, storyboard, none] name_changes: type: array items: @@ -18362,6 +18378,15 @@ components: type: string nullable: true description: For the `image` visual, the image's alt text; null otherwise. + intro_key: + type: string + nullable: true + description: For `intro_animation`, the key of the Intro whose animation it plays; null otherwise. + storyboard: + type: object + nullable: true + additionalProperties: true + description: For `storyboard`, the announcement's own animation storyboard; null otherwise. starts_on: type: string format: date diff --git a/server.js b/server.js index 7fa09be..32a070a 100644 --- a/server.js +++ b/server.js @@ -4507,7 +4507,7 @@ function buildDocsPage() {

An Announcement is a popup that each signed-in user in its audience sees once, between its start and end dates. There are two kinds. Makerble's own "What's new in Makerble" popups, for example "Projects are now Workspaces", are written by Makerble staff in Site Overview › Announcements; their scope_type is null. An Organisation's, Workspace's or Team's announcements are written by the people who look after it, for the colleagues there: scope_type is Charity, Project or Team, with scope_id.

System Access users can see and change every announcement. Anyone else can see and change only those for places where they hold the role now: an Organisation Admin, for their Organisation and its Workspaces and Teams; a Workspace editor (Project Editor), for that Workspace; a Team leader, for that Team. Someone who can make announcements nowhere gets 403.

-

visual_type is name_change (an animation of 1 to 3 name_changes, old name → new name), vimeo (a Vimeo video at vimeo_url), image (an uploaded picture, such as a screenshot, shown whole with its image_alt for screen readers; returned as image_url) or none. audience is everyone, colleagues (everyone except Contacts with a login) or administrators (Organisation Admins); a place's announcement is always for its colleagues (an Organisation's colleagues, a Workspace's editors, reporters and observers, or a Team's members and leaders), can't use name_change, and its learn_more_url can be any https page. status stores draft or scheduled; current_status also says whether a scheduled one is live or has ended.

+

visual_type is name_change (an animation of 1 to 3 name_changes, old name → new name), vimeo (a Vimeo video at vimeo_url), image (an uploaded picture, such as a screenshot, shown whole with its image_alt for screen readers; returned as image_url), intro_animation (the animation of a feature's Intro, by its intro_key; the popup plays the Intro's storyboard as it is when shown, and nothing if the Intro loses it), storyboard (an animation of its own, with the same rules as an Intro's storyboard, for when the Intro's doesn't fit) or none. The two animations are for Makerble's own only. audience is everyone, colleagues (everyone except Contacts with a login) or administrators (Organisation Admins); a place's announcement is always for its colleagues (an Organisation's colleagues, a Workspace's editors, reporters and observers, or a Team's members and leaders), can't use name_change, and its learn_more_url can be any https page. status stores draft or scheduled; current_status also says whether a scheduled one is live or has ended.

Makerble's own can be narrowed further. roles shows it only to people holding at least one of the listed roles, in place of audience: organisation_admin, editor (Workspace editor), reporter, observer, team_leader, active_participant (Contact with a login) and survey_portal_user; Contacts with a login and Survey Portal users are left out unless their own role is listed. audience_rules targets people by behaviour, as JSON over named facts, for example {"all": [{"fact": "distance_travelled_not_set_up"}]} for people whose organisation hasn't set up Distance Travelled. Each rule is exactly one of {fact, params}, {all: [rules]}, {any: [rules]} or {not: rule}, at most 5 deep and 10 facts. List Announcement Facts gives the facts and their params; an unknown fact or param returns 422 naming the rule. Both are for System Access users only.

Makerble's own can also be limited to some pages with page_keys, so a feature is announced where it lives: ["contacts"] shows it only when someone opens Manage Contacts, including when they move there from another page without reloading. A page key is the key of the page's Intro (its Show/Hide Guidance panel), such as contacts, events, checklists, surveys or tasks; pages without an Intro can't be chosen. An empty list (the default) means any page. An unknown key returns 422 listing the keys available. System Access users only.

@@ -4542,8 +4542,8 @@ function buildDocsPage() { { code: "201", cls: "response-2xx", desc: "Announcement created (a draft unless status is scheduled)" }, { code: "403", cls: "response-4xx", desc: "The user doesn't hold the role on that place, or (with no place) doesn't have System Access" }, { code: "404", cls: "response-4xx", desc: "The Organisation, Workspace or Team doesn't exist" }, - { code: "422", cls: "response-4xx", desc: "Validation failed, e.g. no headline, a headline over 90 characters, a Vimeo visual with a YouTube link, an image without alt text, a file that isn't a PNG, JPG, GIF or WebP image or is over 5 MB, or the name change animation for a place" } - ], "Body: scope_type and scope_id (whose announcement; leave out for one of Makerble's own), title (headline, up to 90), body (message, up to 280), visual_type, name_changes: [{old_name, new_name}] (1 to 3), vimeo_url, image and image_alt (for image: a PNG, JPG, GIF or WebP file of up to 5 MB, sent as a file in a multipart/form-data request or in JSON as {filename, data} with the data in base64, and its alt text, up to 250 characters, both required), learn_more_url (a Makerble User Guide page for Makerble's own; any https page for a place's), training_material_id (a place's announcement only: one of its Organisation's Training materials, linked for the colleagues it is shared with), button_label (default \"Got it\"), feature_tour_id (Makerble's own only: a feature tour; while it is live the button says \"Take the tour\" and starts it), audience, roles, audience_rules and page_keys (Makerble's own only; see above), starts_on, ends_on, status.")} + { code: "422", cls: "response-4xx", desc: "Validation failed, e.g. no headline, a headline over 90 characters, a Vimeo visual with a YouTube link, an image without alt text, an intro_key whose Intro has no animation, a storyboard that breaks the rules, a file that isn't a PNG, JPG, GIF or WebP image or is over 5 MB, or the name change animation for a place" } + ], "Body: scope_type and scope_id (whose announcement; leave out for one of Makerble's own), title (headline, up to 90), body (message, up to 280), visual_type, name_changes: [{old_name, new_name}] (1 to 3), vimeo_url, image and image_alt (for image: a PNG, JPG, GIF or WebP file of up to 5 MB, sent as a file in a multipart/form-data request or in JSON as {filename, data} with the data in base64, and its alt text, up to 250 characters, both required), intro_key (for intro_animation), storyboard (for storyboard), learn_more_url (a Makerble User Guide page for Makerble's own; any https page for a place's), training_material_id (a place's announcement only: one of its Organisation's Training materials, linked for the colleagues it is shared with), button_label (default \"Got it\"), feature_tour_id (Makerble's own only: a feature tour; while it is live the button says \"Take the tour\" and starts it), audience, roles, audience_rules and page_keys (Makerble's own only; see above), starts_on, ends_on, status.")} ${endpointCard("PATCH", "/announcements/{id}", "Update an Announcement", true, [ { name: "id", in: "path", type: "integer", required: true, desc: "Announcement ID" } ], [