Skip to content

Frontend standard: staff and kiosk

Status: proposed baseline for implementation and review. Designsystemet is the provisional component and visual foundation, subject to a technical spike with Rails, Turbo and Stimulus. No library is installed or selected irrevocably by this document. Product UI is built with Hotwire as decided in ADR-0005.

Do not use eyebrows, overlines or other small category labels above headings. Use a clear heading and, where orientation is genuinely needed, meaningful navigation or breadcrumbs instead. This applies to all staff and kiosk views, including prototypes and third-party patterns; remove such labels when adapting them. This does not prohibit functional labels, status text or navigation.

Do not add explanatory subtitles, introductory paragraphs, helper copy or repeated instructions for obvious headings, fields or actions. For example, do not explain that the sign-in form signs the user in. Prefer a clear heading, control label and action, and omit redundant copy rather than relocating it.

When optional context genuinely helps a decision, use a short tooltip or contextual help control adjacent to the relevant element. It must work with keyboard, pointer and touch, have an accessible name and not depend on hover or the HTML title attribute alone. Test focus and screen-reader behavior.

Keep essential information visible: input requirements, validation errors, critical warnings, consequences of irreversible actions, delivery uncertainty and information required to complete a task must never be hidden in a tooltip. Long or interactive help belongs in an accessible popover or help page instead.

Designsystemet supplies the starting component styles, tokens and documented behavior where supported. NotiFi owns branding, page composition, responsive behavior and product-specific patterns. Use semantic tokens and shared UI primitives instead of ad hoc colors or one-off controls. Avoid copying a whole library or inventing a generic component without a concrete need.

The integration spike must prove the exact package versions, asset build and license; keyboard navigation, focus, validation and dialog behavior; Turbo navigation and stream replacement; and compatibility with Rails forms. Document what works and what requires adapters or local ownership before adopting it.

Designsystemet owns the internal layout and appearance of its components. Use its documented classes, variants, tokens and component variables. Do not apply local padding, dimensions, icon positioning or internal-selector overrides to a third-party component. Put placement and spacing between components on their parent or a wrapper. When a documented variable is insufficient, record the reason and test the affected states before adding a narrowly scoped exception.

Keep theme tokens, shared shell/layout, shared UI patterns and product-specific styles separate. Do not accumulate page-specific fixes in a global stylesheet. Introduce reusable components only for real repeated patterns, with one clear owner for behavior and appearance.

Design mobile-first. Test layouts at 320, 375, 768, 1024 and 1440 CSS pixels, plus a relevant kiosk screen. These are review widths, not fixed device classes; choose layout transitions based on content and document them in the shell.

  • Staff navigation: a keyboard- and touch-accessible menu on narrow screens; persistent navigation only when space permits. Closing the menu restores focus. On mobile, use a labelled menu button and a left-hand drawer containing the same navigation and organization/session actions. The desktop sidebar stays visible on wider screens. Closing with Escape or the close button restores focus; a Turbo visit or cache snapshot closes the drawer without trapping it.
  • Lists: prioritize essential fields and actions on small screens; use a clear list/card layout or deliberate scrollable table when comparison requires it. Never hide critical actions or status behind accidental overflow.
  • Forms and dialogs: visible labels and errors, appropriate input types, usable touch targets, and no required action clipped by the viewport or keyboard.
  • Kiosk: separate uncluttered shell, large touch targets, explicit progress and error recovery, and a clear return to the start after an appropriate timeout. Define privacy and session-reset requirements before real visitor data.
  • Zoom and reflow: validate at 200% zoom and a 320 CSS-pixel viewport, with no loss of content or function. Data tables may need deliberate scrolling.

Every interactive control has a visible label or accessible name, works by keyboard and shows focus. Dialogs manage focus correctly. Status includes text, not color alone; live updates are announced appropriately without stealing focus. Respect reduced-motion preferences and use adequate contrast.

Every screen accounts for loading, empty, error, disconnected and stale data where applicable. Live delivery views identify their connection state and offer a refresh path; the database remains the source of truth. Never represent an SMS delivery as proof a visitor is safe or has read the message.

  • Inspect the changed flow at the review widths and record the results; test staff and kiosk shells separately when touched.
  • Verify the primary task with keyboard, visible focus, labels, errors and zoom.
  • Verify loading, empty, error and reconnect states relevant to the change.
  • Exercise Turbo navigation/replacement and check that focus and event handlers still behave correctly. Include meaningful automated browser tests when the browser-test foundation is in place; until then record manual checks in PRs.
  • Confirm the implementation respects the product/UI boundary document and contains no real visitor data in screenshots, fixtures or examples.
  • Check that no eyebrow or overline appears above a heading.
  • Remove redundant explanatory copy; check that optional help is accessible and essential instructions, errors and warnings remain visible.

For a form paired with a map, preview or other workspace, staff pages can opt into the wide main area and use the shared workspace-layout slots for fields, workspace and actions. The layout stays stacked until a 68rem viewport leaves room for both columns after the persistent staff navigation and page padding. The workspace then sits to the right of the form. The mobile workspace-first option is explicit; the shared controller keeps DOM and keyboard order aligned with the visual order as the viewport changes. Product components own their own content and behavior, not the layout.

Use the shared shared/status_message partial for non-interruptive status and success messages. Pass a translated message and a Designsystemet tone when rendering on the server. Interactive behavior can update the same persistent live region with showStatusMessage from lib/status_message; use plain for brief progress text, success for a completed action, and the appropriate info, warning or danger tone when needed. Keep the live region mounted, write text rather than HTML, and do not move focus. The component does not replace assertive validation or critical alerts. A local confirmation is not a server save, and copy must distinguish them.

Non-critical alerts have an explicit dismiss control; short plain progress text does not. Dismissing a message must not undo the action or hide form errors, and focus returns to the triggering control when available, otherwise to the main content. Do not auto-dismiss information users may need to read.

For a list paired with a visual surface, paired-list can size the surface and scrolling viewport to a chosen number of measured items. On narrow layouts the visual surface retains its own height. The list is keyboard focusable only when it needs scrolling; measurements respond to wrapping and zoom. Avoid fixed card heights or changing Designsystemet component internals to align the columns.

A success status must describe a confirmed outcome, not the intent to perform an action. See status-outcomes.md for transaction, uncertainty and external provider boundaries. Local UI confirmation and a successful database save are separate events and require distinct copy.