Skip to content

Add axis mapping authoring model#145

Merged
kostyafarber merged 2 commits into
mainfrom
axes-ui-work
Jul 13, 2026
Merged

Add axis mapping authoring model#145
kostyafarber merged 2 commits into
mainfrom
axes-ui-work

Conversation

@kostyafarber

Copy link
Copy Markdown
Collaborator

What changed

  • model external/internal axes, continuous/discrete axis kinds, value labels, and font-owned mappings with stable IDs
  • evaluate independent mappings before the single cross-axis mapping group in Rust
  • persist mappings through the working store, .shift packages, undo/redo, N-API, generated TypeScript DTOs, and renderer workspace state
  • round-trip Designspace per-axis maps, cross-axis mappings, discrete axes, and standard axis labels
  • expose mapping mutation/query APIs to the renderer and full read-only mapping inspection in shift-cli

Why

The existing axis model only represented continuous min/default/max ranges. The axes UI needs one coherent authoring model for mapping lists, graph samples, discrete axes, axis value labels, and Fontra-compatible cross-axis mapping data.

Impact

  • .shift axis records now use role, a discriminated kind, and labels
  • .shift packages require axis-mappings.json
  • schema version remains 1; this is a pre-release baseline change with no runtime migration path
  • deleting or updating axes validates dependent mappings and preserves them correctly through undo/redo

Validation

  • cargo test --workspace
  • cargo clippy --workspace --all-targets -- -D warnings
  • pnpm typecheck
  • pnpm lint:check
  • pnpm test
  • repository pre-commit suite, including formatting, dead-code checks, and Vitest

Comment thread apps/desktop/src/renderer/src/lib/model/Font.ts Outdated
Comment thread crates/shift-font/src/ir/font.rs
@kostyafarber kostyafarber marked this pull request as ready for review July 12, 2026 20:18
@kostyafarber kostyafarber merged commit e261156 into main Jul 13, 2026
11 of 12 checks passed
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