Skip to content

Implement Atlas Controls#355

Draft
PauloMFJ wants to merge 22 commits into
datacommonsorg:mainfrom
madebypxlp:paulo/atlas-controls
Draft

Implement Atlas Controls#355
PauloMFJ wants to merge 22 commits into
datacommonsorg:mainfrom
madebypxlp:paulo/atlas-controls

Conversation

@PauloMFJ
Copy link
Copy Markdown
Contributor

@PauloMFJ PauloMFJ commented Jun 3, 2026

Implement Atlas Controls

Adds the floating control chrome for the Atlas (tldraw) canvas — a zoom control, export button, and a tool palette — plus the supporting design-system pieces (icons, tokens, typography, a Button size variant).

Controls component

  • New scopes/atlas/components/controls.tsx + .module.scss, rendered through tldraw's InFrontOfTheCanvas slot so it reads live editor state via useEditor while staying out of the canvas transform.
  • Zoom: in/out buttons + a live zoom readout. The displayed value is rescaled from the real zoom range onto a friendlier 0–200 scale via a new mapRange helper, and steps by a constant amount.
  • Tool palette: Select / Pan / Text, bound 1:1 to tldraw tool ids (select / hand / text), with the active tool highlighted.
  • Export: button in place (wiring to the export flow is a follow-up — see TODO below).
  • All three control groups are built on the shared Button element with per-state colorSchemes.

Atlas editor config

  • New scopes/atlas/config.ts centralizes the zoom config: MIN_ZOOM / MAX_ZOOM and an evenly-spaced ZOOM_STEPS array generated from a single display-step value (keeps the on-screen increment constant), plus the display range.
  • atlas.tsx now caps the camera zoom (setCameraOptions), styles the built-in text tool to match the design system, and tints the selection stroke from the accent token (updateThemes). Selection colours are also wired through --tl-color-* overrides in atlas.module.scss.

Design system

  • Icons: cursor, hand, insert_text, minus, plus.
  • Button: new required size prop ('small' | 'large') → data-size.
  • Tokens (colors.json): added control-surface,
    control-surface-hover, control-accent, control-accent-content,
    control-content, and surface-content; renamed card-shadowshadow.
  • Typography: renamed the mixins onto a clearer Material-style scale —
    type-control → type-label-large, type-label → type-label-medium,
    type-tab → type-label-small (title / body unchanged); all usages
    updated.

Follow-ups

  • Controls export button is a no-op (// TODO: Support export here) — needs wiring to the canvas export API.

Testing

  • pnpm lint (type-check + Biome + Stylelint) and pnpm build pass.
  • Verified controls render over the canvas; zoom in/out, tool switching, and active-tool highlighting work; selection stroke uses the accent colour.

@PauloMFJ PauloMFJ requested a review from a team as a code owner June 3, 2026 16:43
@PauloMFJ PauloMFJ marked this pull request as draft June 3, 2026 16:44
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces the 'Atlas' canvas feature, integrating tldraw to provide an interactive, camera-tracked workspace. It establishes a comprehensive set of reusable components, including a customizable Button, a loading Skeleton, and a flexible Card system supporting text and chart variants (with tabbed line-chart and table views powered by recharts). Additionally, the PR updates the frontend style guides to enforce category-first naming and flat-by-default folder structures, introduces several SVG icons, and adds utility functions and hooks for layout and resize handling. I have no feedback to provide as there are no review comments.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@nick-nlb nick-nlb self-requested a review June 4, 2026 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant