Skip to content

Ship a loadable Height Tools example add-in #3

Description

@protosphinx

Why this matters

The add-in API documentation has an inline example, but contributors cannot download and load a checked-in working module. A small real example shortens the path from reading the API to making a first contribution.

Scope

  • Add examples/addins/height-tools.mjs.
  • Make its no-argument command work on the Starter plate by resolving exactly one height parameter and updating it through api.document.transact.
  • Return a clear error if the parameter is missing or ambiguous.
  • Link the example and loading instructions from the add-in documentation.
  • Exercise the real example module from the existing add-in smoke instead of duplicating its implementation inside the test.

Relevant files

  • examples/addins/height-tools.mjs
  • docs/addin-api.md
  • scripts/studio-addin-api-smoke.ts

Acceptance evidence

  • Loading registers the manifest but grants no document access before approval.
  • Enabling the add-in registers one namespaced command.
  • Running the command changes the Starter plate height through a typed transaction.
  • The exact rebuilt bounds and volume change by the expected amount.
  • Disable and unregister remove commands and listeners.
  • The documentation names the trust boundary: local add-ins are trusted browser code, not a sandbox.

Test commands

npm run build
npm run smoke:addin-api
npm run ci:gate

Contribution size

S: one example module, a documentation link, and focused lifecycle assertions.

Maintainer response expectation

Comment before starting. A maintainer will confirm scope and ownership before implementation; review will focus on the listed acceptance evidence.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions