Skip to content

feat(redesign): tactile artifact personalization and distinct material stocks - #41

Merged
Dunkrick merged 5 commits into
mainfrom
redesign/artifact-personalization
Nov 2, 2026
Merged

Dunkrick merged 5 commits into
mainfrom
redesign/artifact-personalization

Conversation

@Dunkrick

@Dunkrick Dunkrick commented Nov 2, 2026

Copy link
Copy Markdown
Owner

Summary

Transforms Nook's uniform artifact cards into distinct physical paper objects that users can customize and make their own. Cards now carry unique material identities by type, physical micro-interactions on drag/drop, and a personal paper tint palette.

Decisions & Rationale

  1. Type-Specific Material Stocks (--stock-text, --stock-link, --stock-photo, --stock-issue)
    • Reason: Replaced arbitrary deterministic ID modulo (artifactId % 4 + 1) with semantic material stocks based on card type. Complies with design rule V4 dev #5 ("Color has a job... Never pick a color from an id"). TEXT cards feel like sticky notes (#FBF8F1), LINK cards look like catalog cards (#E8ECF6), and GITHUB_ISSUE cards take on a ticket tone (#E6F0E8).
  2. Thought Voice Typography for Notes
  3. Tactile Settle Physics on Card Drop
    • Reason: Dropping a card plays a subtle keyframed landing animation (--motion-settle) with shadow dampening instead of an artificial scale pop. Polaroids carry a slightly heavier pop settle (--motion-pop). Motion automatically reduces to instant on prefers-reduced-motion per rule Edit mode - Card componeny #6.
  4. Square Swatches for Paper Tints (--radius-0)
    • Reason: Tint swatches are interactive controls handled by the user, so they use --radius-0 per design rule V4 dev #2 ("Things you handle are square").
  5. Strict Token Adherence
    • Reason: Added the tint palette (--tint-cream, --tint-rose, --tint-sky, --tint-sage, --tint-lavender, --tint-butter) strictly inside tokens.css. Component CSS contains zero raw hex values, satisfying design rule V3 dev #1.
  6. Backward-Compatible Schema Migration
    • Reason: Added tint String? to the Artifact Prisma model. Existing records default to null (rendering their material type default). Backend validates tints against a strict whitelist while allowing null to clear customizations.

Changes by Layer

Database & Backend

  • Prisma Schema & Migration: Added tint String? column to Artifact and created migration 20261102120000_add_artifact_tint.
  • Validation (backend/src/validation/artifacts.ts): Added VALID_TINTS whitelist check and support for clearing via null.
  • Service (backend/src/services/artifacts.ts): Persisted tint updates with existing ownership and workspace validation.
  • Tests: Added unit test suites for tint validation and update persistence.

Frontend & Design System

  • Tokens (tokens.css): Defined type-level stock aliases and --tint-* palette tokens.
  • Rotation & Type Mapping (ArtifactRotation.ts): Replaced getArtifactColorToken with getTypeStock.
  • Interaction Hook (useArtifactDrag.ts): Dispatched isSettling drop state when dragging finishes.
  • CSS (artifact.css): Added @keyframes nook-artifact-settle, .nook-artifact--settling, type voices, and tint picker styles.
  • Components (TintPicker.tsx, ArtifactActions.tsx, ArtifactHeader.tsx, ArtifactView.tsx, Wall.tsx): Built accessible square swatch picker (role="radiogroup", role="radio", aria-checked, focus rings) and wired optimistic canvas updates.

Signed-off-by: Dunkrick <rithwickgurram05@gmail.com>
Signed-off-by: Dunkrick <rithwickgurram05@gmail.com>
…aphic voices

Signed-off-by: Dunkrick <rithwickgurram05@gmail.com>
Signed-off-by: Dunkrick <rithwickgurram05@gmail.com>
…zation

Signed-off-by: Dunkrick <rithwickgurram05@gmail.com>
@Dunkrick Dunkrick self-assigned this Nov 2, 2026
@vercel

vercel Bot commented Nov 2, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
nook Ready Ready Preview Nov 2, 2026 10:44am UTC

@Dunkrick Dunkrick left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

good to go!

@Dunkrick
Dunkrick merged commit 0f0a9c8 into main Nov 2, 2026
4 checks passed

This branch was successfully deployed

1 active deployment
Preview — 1378cb1a Deployed Nov 2, 2026 by vercel[bot]
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