Team survey

The team survey: each member answers the same questions; results are encrypted in the browser and compared by role. The page carries the mount; survey.js and results.js run it.

Organism · beta · v1.0.0 · owner: Site system lead · contract 19 of 20 points (open: figma)

Do and don't

Do: The survey

Rendered by survey.ts

Open example: Team survey · Do: The survey Use the full-page example to follow page links.

As it ships.

Do: The results

Rendered by survey.ts

Open example: Team survey · Do: The results Use the full-page example to follow page links.

The results page's mount.

Don't: Indexed by search engines

Rendered by survey.ts

Open example: Team survey · Don't: Indexed by search engines Use the full-page example to follow page links.

It is for one team.

Don't: Without its privacy link

Rendered by survey.ts

Open example: Team survey · Don't: Without its privacy link Use the full-page example to follow page links.

Say what happens to the answers.

Rules

RuleWhyCheck
Team survey is computed by Loom's code from each member's own answers, encrypted in the browser (survey-crypto.js) and compared by role on the results page, not drawn by hand.A showcase is proof only if the product's own code produced what it shows.Automated: scripts/site/interactives/check.ts (recomputes the showcase data and fails on drift)
Answers are encrypted in the browser before they are sent.Team answers are sensitive.Automated: tests/unit (survey crypto)

API

PropTypeRequiredDefaultWhat it does
resultsbooleanNofalseThe results page's mount.

Contract details

The full contract: identity, anatomy, variants, states, tokens, layout, motion, accessibility, content, tests

Identity

AspectValue
Idsurvey
LayerOrganisms
Categoryapp
OwnerSite system lead
Statusbeta
Version1.0.0
Sourceapps/showcase/site/system/organisms/survey.ts (private repository; the contract and the render function are this one module)
VersionDateChange
1.0.02026-10-26Team survey: computed by Loom's code from each member's own answers, encrypted in the browser (survey-crypto.js) and compared by role on the results page.

Use when

  • /survey/ and /survey/results.html, sent by a Loom consultant. Why: A task that needs the whole screen.

Do not use when

  • Public marketing pages. Why: It is noindex and reached by a link from the consultant.

Anatomy

PartWhat it is
progressdiv#progress (the survey)
appdiv#app: the intro until the script takes over
noscriptA notice

Made of: showcase-frame, panel, form-field, button, facts-list, table.

Used in: task-body, page-apps.

Variants

VariantWhenWhy
fullOn its demo page and its section.The whole experience where the claim is made.

States

StateRendered or not applicable
defaultBuild-time respondent/results mounts show Loading until their own survey.js/results.js boot. Without JavaScript the respondent mount displays its existing notice.
hoverNative question choices, buttons, links and local file controls retain task hover affordances.
focus-visibleQuestion and local results controls show focus; step changes focus the heading and invalid team labels focus the field.
activeThe reader answers, advances/backtracks, edits, forgets, downloads or copies; the consultant loads local keys/files/codes. No timed playback exists.
disabledDownload and Copy are natively disabled until respondent encryption succeeds; encryption failure leaves them disabled with a status message.
loadingOwn task boot, respondent encryption and local results file/key work are distinct task operations; no native showcase-host ready/dispose claim is made.
emptyUnanswered/unsure answers remain explicit; results with no added answers show the existing empty notice.
errorIncomplete/invalid encryption links are refused; team labels reject contact details; encryption, malformed answer/decryption and boot failures use the task messages. No answers are submitted by this client.
currentChecked question choices and written progress identify the respondent position; results identify accepted/rejected responses and role comparisons, not a playback frame.
visitedNot applicable: No visited state on this root; any contained native links retain their own browser history.
expandedNot applicable: No disclosure state on this root; replacing a view is not aria-expanded.

Tokens

PartToken
app.ground--cotton
panel.background--surface
--survey-margin-top-space-7var(--space-7)
--survey-gap-space-4var(--space-4)
--survey-padding-space-4var(--space-4)
--survey-padding-space-6var(--space-6)
--survey-background-surfacevar(--surface)
--survey-border-inkvar(--ink)
--survey-padding-space-5var(--space-5)
--survey-border-rule-hairvar(--rule-hair)
--survey-border-radius-radiusvar(--radius)
--survey-color-inkvar(--ink)
--survey-gap-space-5var(--space-5)
--survey-margin-top-space-9var(--space-9)
--survey-font-type-smallvar(--type-small)
--survey-margin-space-5var(--space-5)
--survey-padding-left-space-7var(--space-7)
--survey-gap-space-3var(--space-3)
--survey-font-size-fs-smallvar(--fs-small)
--survey-gap-space-6var(--space-6)
--survey-margin-space-6var(--space-6)
--survey-padding-space-3var(--space-3)
--survey-border-linevar(--line)
--survey-margin-top-space-11var(--space-11)
--survey-margin-bottom-space-4var(--space-4)
--survey-margin-bottom-space-7var(--space-7)
--survey-border-bottom-linevar(--line)
--survey-font-size-fs-labelvar(--fs-label)
--survey-color-ink-2var(--ink-2)
--survey-padding-space-1var(--space-1)
--survey-background-teal-softvar(--teal-soft)
--survey-color-teal-inkvar(--teal-ink)
--survey-background-saffron-softvar(--saffron-soft)
--survey-color-saffron-inkvar(--saffron-ink)
--survey-background-madder-softvar(--madder-soft)
--survey-color-madder-inkvar(--madder-ink)
--survey-padding-space-7var(--space-7)
--survey-font-size-fs-bodyvar(--fs-body)
--survey-margin-space-2var(--space-2)
--survey-margin-space-4var(--space-4)

Layout

AspectValue
breakpointsRequired review at 390, 768, 1024 and 1440 px; execution is not implied by this declaration; columns stack under 768 px and controls fill the row on phones.
wrappingText wraps; code panes scroll inside their own focusable region.
textExpansionJapanese strings come from the i18n tables and wrap; engine output stays English.

Spacing and rhythm

AspectValue
internalInside the Showcase frame's padding, controls and caption at its foot.
externalFull width of its section.
rhythmOne showcase per section, after the section's claim (D-SITE-008).

Motion

AspectValue
NoneReader-controlled task progression and local encryption/results work; no autoplay or intrinsic timed sequence.

Runtime and reuse

  1. Render-only element; mount any registered child enhancements separately. Preserve required Site CSS, fonts, responsive and locale rules from nativeElement.

Accessibility passport

AspectValue
roleRespondent task sections/forms and consultant local-results file controls/tables.
nameIts heading or caption
keyboardNative question controls and Next/Back; Download/Copy after encryption; local file/code/key controls in results.
focusStep changes focus the heading; invalid team input is focused. Clipboard fallback focuses/selects the existing response-code field.
screenReaderWritten progress, encryption/copy statuses, rejected-file reasons and results; no Play/Pause announcements.
contrastInk on surface 14:1; state dyes only as marks with words.
targetControls are 44 px.

Content

SlotLengthVoice
question1 sentencePlain, second person

Good: “Where do you look for a component first?”

Bad: “Rate your synergy”

Japanese: English only: the survey loader reads the existing English question and survey catalogues. Japanese survey/results content and locale selection are not implemented.

Icons and illustrations

None: this element uses no icon or illustration of its own.

Decisions and exceptions

Usage

7 uses across the built pages (measured by npm run site:system).

Tests

AspectValue
unittests/unit/site-system.test.ts: renders every do and don't example through the registry and checks the classes it owns
visualNot yet: there are no screenshot baselines; the Library page is checked for sideways scroll at 1440 px by tests/site/system.spec.ts
a11ytests/site/system.spec.ts: axe (0 serious or critical) on the element's Library page in light and dark
parityscripts/site/system/check.ts: Library examples are rendered by the same render function the site imports

Figma

not-yet: The Loom Site Figma library is the last stage of the plan; this element is not mapped yet.

Open in Storybook

Start with a conversation about your system.

We read your system, show you what we found, and agree with your team what to fix first.