← Learnosity Build AideCONTENT HISTORY

Update to Learnosity Build Aide

Snapshot Nov 25, 2026 · 07:29 UTC · version 1.1.0

Collection source: downloaded plugin package.

WHAT CHANGED

First saved snapshot

No earlier snapshot is available to establish a change.

Save Learnosity Build Aide and check future changes in Following.

Up to 3 plugins free · no card required.

Compare saved observations

Download comparison JSON
Full technical diff · 0 changed fields
Full snapshot data
{
  "description": "Guide a developer to design, review, debug or repair an Items API UI Regions configuration — choosing between layout presets, region_overrides and a full regions object, and handling what a catalog cannot state: the order in which the configuration layers are applied, regions inside sections, which behaviors depend on the build in use, and the failure modes that report nothing.",
  "included_files": [],
  "name": "customize-assessment-ui-regions",
  "skill_md_contents": "---\nname: customize-assessment-ui-regions\ndescription: \"Guide a developer to design, review, debug or repair an Items API UI Regions configuration — choosing between layout presets, region_overrides and a full regions object, and handling what a catalog cannot state: the order in which the configuration layers are applied, regions inside sections, which behaviors depend on the build in use, and the failure modes that report nothing.\"\n---\n\n# Customize the Assessment Player UI\n\n**Goal:** Design, review, debug or repair an Items API UI Regions\nconfiguration, establishing which configuration layer takes precedence, how\nthe responsive engine transforms the result, and which errors are reported\nsilently.\n\n**APIs:** `items-api`\n\n## When to use this skill\n\nFor any question about the assessment player's layout or controls: relocating\nthe table of contents, showing or hiding buttons, building a custom player\nshell, or invoking a dialog from application code.\n\n- **Building.** Selecting the least invasive configuration that produces the\n  required layout.\n- **Debugging.** An element is absent, in an unexpected region, present only\n  at some widths or in some sections, or an event does not fire. Most failures\n  in this area are silent; use the diagnostics below, symptom to cause.\n- **Reviewing.** A configuration exists and its rendered result needs to be\n  established, which frequently differs from what the JSON appears to specify.\n\nThe region, element, button and dialog catalogs are in the reference\narticles listed at the end; read them there for lookups. This skill covers the\noperational layer above them: how the parts combine, what varies by build and\nactivity, and how to confirm it.\n\n## Core principle: four layers produce the layout\n\nThe rendered layout is not the object submitted. It is the result of applying,\nin order:\n\n| Order | Layer | Effect |\n| --- | --- | --- |\n| 1 | `config.regions` — preset string or object | The base layout. |\n| 2 | `config.region_overrides` | Edits the base: adds, removes or re-options individual elements, or replaces a whole region. |\n| 3 | A section's `config.regions` / `config.region_overrides` | `regions` replaces the global result for that section; `region_overrides` is applied on top of it. |\n| 4 | The responsive engine, at render time | Transforms the result for the container width. |\n\nThree consequences follow:\n\n- **Layers 1–3 specify the large breakpoint only.** Any narrower rendering is\n  the output of layer 4, so an element that is absent on a tablet is not\n  necessarily a configuration defect.\n- **`navigation.show_*` is overridden.** Any element defined in a regions\n  object, or belonging to the selected preset, takes precedence over the\n  matching `navigation.show_*` flag. Once regions are in use, elements are the\n  only control surface.\n- **Invalid placement is a no-op, not an error.** An element in a region that\n  does not allow it, an element name the build does not implement, or the\n  `items` region in the wrong layer are all discarded with no `errorListener`\n  call and no console output. The absence of an error is therefore not\n  evidence of a valid configuration; compare the region's rendered contents\n  against the element's allowed-regions entry in `360000758337`.\n\n## Preconditions\n\n- **`rendering_type` must be `\"assess\"`.** Inline rendering produces no\n  regions, `assessApp()` returns nothing, and `dialogs()` raises `50007`.\n  `typeof itemsApp.dialogs` is still `function` under inline rendering, so\n  branch on `request.rendering_type` rather than on the method.\n- **`config` belongs inside `request`.** The init object is\n  `{ security, request }`. Examples commonly show the `config` block in\n  isolation for brevity; in a real initialization it sits under `request`. If\n  `itemsApp.getActivity().config` returns without the expected keys, check\n  this first.\n- **Runtime methods exist only once the app is ready.** Immediately after\n  `init()` returns, `itemsApp.dialogs` and `itemsApp.on` may still be\n  `undefined` rather than inert, so a listener registered at that point is\n  lost without an error. Register listeners and call methods inside\n  `readyListener`; `typeof itemsApp.on` distinguishes the two states.\n- **An intro screen suppresses the layout.** Where an activity opens on a\n  Start screen, the regions are present in the DOM but hidden. A configuration\n  that appears to render nothing may be behind that screen.\n\n## Choosing an approach\n\nSelect the least invasive option that satisfies the requirement.\n\n1. **A layout preset** (`regions` as a string). A single line, inheriting the\n   maintained layout including elements added in later releases. Applies in\n   full or not at all.\n2. **A preset plus `region_overrides`.** The appropriate default for most\n   requirements: the maintained base is retained and only the difference is\n   declared. Note the distinction between the dotted and array forms below.\n3. **A full `regions` object.** Only when defining a layout from scratch. All\n   elements then become the integrator's responsibility: any element omitted\n   is not rendered, including elements added by later releases.\n\n`title_element` renders nothing unless `config.title` is set, which can be\nmistaken for a preset failure.\n\n## Worked example: move the horizontal TOC to the top\n\nThe `horizontal` preset places the previous button, `horizontaltoc_element`\nand next button in `bottom`. To relocate only the TOC to `top`:\n\n```yaml\nconfig:\n  regions: horizontal\n  region_overrides:\n    bottom.horizontaltoc_element: false\n    top:\n      - type: horizontaltoc_element\n```\n\n`bottom: false` would disable the entire region, removing the previous and\nnext buttons with it. Target the element, not the region.\n\nThe two TOC types have disjoint allowed regions — `horizontaltoc_element` in\nthe top and bottom regions, `verticaltoc_element` in `right` only — so\nrelocating a TOC between the dock and a horizontal region requires changing\nthe element type, not only the region name.\n\n## Regions inside sections\n\nThis area has the greatest behavioural variation between releases; confirm the\nresult against the build in use.\n\n| Section config | Result |\n| --- | --- |\n| `regions` object | Replaces the global layout for that section. No part of the global configuration is retained, and the replacement does not carry forward: a later section without a regions config renders the global layout again. |\n| `region_overrides` | Applied on top of the global layout; regions not named retain their global contents. |\n| A preset string | Applied, replacing the global layout. Presets are documented as a top-level option, so treat a preset inside a section as build-specific and verify what that section renders before depending on it. |\n| `regions` and `region_overrides` together | The two can compose, but the combination is not a documented contract. Use one or the other per section. |\n| `items` inside a section's `regions` | Ignored, as documented. |\n\nWhere regions carry over from one section into the next, the documented\nv2021.2/v2021.3 behavior — the first section merging into the global config\nand carrying forward — is the first hypothesis. Establish which build is\nserving the page before concluding: read `LearnosityItems.version` in the\nconsole, or the `items.learnosity.com/v…` URL in the network panel. A version\nin the script tag does not guarantee that build is the one loaded, so use the\nversion reported at runtime.\n\n## Custom buttons and dialogs\n\nBehavior beyond the payload shapes given in the reference:\n\n- **`label` is a label bundle reference, not display text.** A reference\n  present in the bundle is translated; one that is absent is rendered\n  verbatim, so the symptom is a raw identifier as the button text and\n  aria-label.\n- **Either app object receives button events.** `assessApp().on()` is the form\n  used in the examples, and `itemsApp.on()` receives the same event, so bind\n  to whichever object is already held.\n- **A wildcard listener is not a diagnostic.** `on(\"*\")` may deliver no events\n  at all, so silence from it establishes nothing. Subscribe to the named\n  event, and validate the listener itself with a known event such as\n  `item:changed`.\n- **Both dialog call forms are valid** and return the same set:\n  `itemsApp.dialogs()` and `itemsApp.assessApp().dialogs()`. Leave existing\n  code on whichever form it uses.\n- **The dialog set follows the activity.** The reference lists the full\n  catalog; a session exposes only the dialogs it has configured — a plain\n  assess session has no `configuration` or `idleTimeout`, for example. Verify\n  the key exists before calling `show()`.\n\n## Failure modes\n\n### Regions configuration\n\n| Configuration error | Result |\n| --- | --- |\n| `region: false` used to remove one element | Disables the region and all its contents. Use the dotted form, `region.element: false`. |\n| Array form where the dotted form was intended | An array replaces the entire region; the dotted form edits a single element. |\n| Both forms for one element | A key occurs once per mapping: `right.calculator_button` is either `false` or an options object. |\n| `horizontaltoc_element` added to `right` | The allowed-regions entry for that element lists the top and bottom regions only, and the player follows it: the override renders nothing. Check an element's allowed regions before placing it. |\n| `items` outside the global `regions` object | Ignored, so `scrollable_option`, `vertical_element` and `progress_element` must be set globally. |\n| A button hidden with `navigation.show_*` | Overridden by the regions config or preset that defines the element. Remove the element instead. |\n| An element name the build does not implement | Discarded silently — `highlight_mode_button`, for example, renders nothing on a build predating its release. |\n\n### Responsive rendering\n\n| Condition | Result |\n| --- | --- |\n| Verification at desktop width only | Below the large breakpoint the `right` region moves into the menu and the top and bottom regions collapse to navigation only. |\n| Breakpoint derived by arithmetic | Margins around the player shift the effective boundary. In a plain container the boundaries fall at 801 for large and 481 for medium, with 480 small, measured on the element passed to Items API; confirm the integration's own container with the resize check below. |\n| `configuration.responsive_regions: false` | Removes the adaptation on every device, including phones. A deliberate trade-off, not a defect fix. |\n| More than seven buttons in `right` | The dock switches to a scrolling menu at approximately the eighth button, and the expand toggle is always added and cannot be positioned. Where the exact count matters, add one button at a time and observe the `menu-with-scroll` class on `.right-wrapper`. |\n\n### Runtime and signing\n\n| Condition | Result |\n| --- | --- |\n| Handlers registered immediately after `init()` | The methods do not yet exist, and the lost registration is not reported. |\n| A dialog key assumed to exist | The set follows the activity's configuration. |\n| `config` assembled after signing | The signature covers the entire `request`, so the player reports `41003 Signatures do not match`, whose message references `security.domain` and directs investigation to the wrong cause. |\n\n## Diagnostics\n\nWork symptom to cause, and confirm the cause before changing configuration.\n\n1. **Previous and next buttons removed along with the TOC.** A region was\n   disabled where an element override was intended.\n2. **A configured element never renders.** Check the allowed-regions entry for\n   that element type, then whether it sits in the `items` region outside the\n   global config, then whether the name exists in the build in use.\n3. **A button persists despite `navigation.show_next: false`.** The regions\n   config or preset defines it. Remove the element.\n4. **Correct at desktop width, incorrect on a tablet.** The responsive engine,\n   not the configuration. Establish the container width, then choose between\n   accepting the reflow, moving the element to a region that survives it, and\n   disabling `responsive_regions` for every device.\n5. **A later section renders unexpected controls.** Read that section's own\n   config first: `regions` replaces, `region_overrides` is applied on top. If\n   regions carry over between sections, consider the older-LTS merge\n   behavior and establish the build in use.\n6. **A custom button renders but its event never fires.** Verify the event\n   name against `options.name`, then that the handler was registered inside\n   `readyListener`. Do not use a wildcard listener to investigate.\n7. **A custom button displays a raw identifier.** The label reference is\n   absent from the bundle.\n8. **`dialogs()` raises an error or has no effect.** In order:\n   `rendering_type` is not `\"assess\"`; the call precedes `readyListener`; the\n   dialog key does not exist for this activity. The call form is not the\n   cause.\n9. **Nothing renders and no error is raised.** Check the intro screen, then\n   `rendering_type`. Where the failure is an undetailed `50004`, examine the\n   environment before the credentials or the content: Items API loads a\n   cross-domain iframe from `items.learnosity.com`, and a browser, extension\n   or network policy that blocks it produces exactly this result. Check\n   `document.querySelector('iframe[src*=\"learnosity\"]')` and the network\n   panel; running the same init in an unrestricted browser confirms it\n   fastest.\n\n## Runtime checks\n\nBuild-specific and activity-specific questions are answered from the console\nof a running player. Prefer these to constructing a test harness.\n\n| Question | Check |\n| --- | --- |\n| Which build is serving the page? | `LearnosityItems.version` |\n| Did the config reach the activity? | `itemsApp.getActivity().config`, compared with the signed request |\n| What rendered in a region? | `document.querySelectorAll('.lrn-right-region .lrn_btn').length`, or list the classes: elements carry stable ones such as `test-save`, `lrn-calc-toggle`, `toc lrn-vertical-toc`, `item-next` |\n| Which dialogs does this activity expose? | `Object.keys(itemsApp.dialogs())` |\n| Is an event firing? | `itemsApp.on('item:changed', console.log)` — a named event, registered inside `readyListener` |\n| Where is the responsive boundary for this layout? | Resize the element passed to Items API, not the window, and observe when the `right` region empties |\n\nRun these inside `readyListener` or after the player has started; before that,\nthe app object does not expose the methods.\n\n## Reference lookups\n\nCall `read_document` with the `source` and `article_id` below. Fetch only what\nthe current question requires.\n\n| Topic | `source` | `article_id` |\n| --- | --- | --- |\n| Regions overview: every region, element and button, allowed regions, options, preset contents, responsive breakpoints, regions in sections | `help_site` | `360000758337` |\n| `config.regions` initialization option | `help_site` | `16560445464989` |\n| Standard dialogs and the `show()`/`hide()` contract | `help_site` | `16461106026013` |\n| Custom dialogs: `header` / `body` / `buttons` and button events | `help_site` | `360000755558` |\n| A complete signed initialization using `regions` | `demos` | `3811035298584101061` |\n\n## Further reading\n\n| Topic | `source` | `article_id` |\n| --- | --- | --- |\n| `rendering_type`, the precondition for regions and dialogs | `help_site` | `16560451464605` |\n| `config.navigation`, the `show_*` flags regions override | `help_site` | `16560458801821` |\n| `itemsApp` methods index (`dialogs()`, `assessApp()`, `on()`) | `help_site` | `16458082061213` |\n| Initialization and callbacks, including `readyListener` | `help_site` | `16582668672669` |\n| Items API events index | `help_site` | `16458090489117` |\n| Label bundles, for `custom_button` labels | `help_site` | `360002918818` |\n| Breaking assessments into sections | `help_site` | `360000758297` |\n| Signature construction and what it covers | `help_site` | `360000754738` |\n\n## Related skills\n\n- `install-and-set-up-the-sdk` — installing the SDK that signs the\n  initialization this configuration travels in.\n- `golden-path-author-items-reports` — the Author, Items and Reports flow this\n  player configuration sits inside.\n"
}

SHA-256 of public snapshot: 4a0e99951181a108f21907dc2d665c78a21bad0a9004c7edb1b811c599899afc