Skip to content

refactor(user-interface): move motion references to keys #14313

Description

@kyle-sexton

Parent

Refs #14214
Source: PLAN Phase 4, topic literal-measurements-config

Depends on

Outcome

Motion references name a config key or placeholder instead of a taste number, so a team's motion settings reach every recipe.

Demo: The motion stream of the taste scan exits 0, and a motion reference names keys with no default number.

Problem: Most user-interface measurements are stated inline, so a team cannot change them through config and agents treat them as fixed unless the project has its own token.

  • Who / how many: teams and repositories using the user-interface plugin; count unknown.
  • Frequency, trend, cost: unknown.
  • Evidence: 32 reference and skill files hold about 198 lines with px values, and about 252 more lines hold other units, from rough greps (observed); agents treating inline values as fixed (inferred); the owner's no-hardcoding rule (reported).

Goal: A team changes any user-interface taste measurement through one config key, every floor and constant stays stated, and a downstream repository's conventions win.

  • Intent (why, in the user's words): "Everything should be configurable and extensible. We should never be hardcoding specific font sizes or ranges or any specific measurements and approaches."
  • Vision (where this heads): Everything is configurable, one source of truth.
  • When goals conflict, prefer: alignment over throughput

Constraints:

  • Production quality bar.
  • Everything configurable and extensible, with good defaults; approaches are met per rule.
  • Uniform and consistent, DRY, one source of truth, across the repository, plugins and skills; SOLID; highest accuracy and coverage.
  • Fact-based and fact-validated.
  • A downstream repository's conventions win over every layer: its design system, conventions, lint config and layer system.
  • Mechanism details are settled at planning.
  • Nothing is added to CI unless it is 100 percent needed; any CI addition comes to the owner first.
  • Provenance only in upstream records and changelog fragments.
  • Quality requirement: Maintainability: each value has one home and a named key, with the named copies in AC6.
  • Quality requirement: Reliability: an invalid setting follows the cascade rule: a valid higher layer still wins, an invalid personal value leaves the team value, otherwise the default applies.
  • Quality requirement: Usability: a reference stays readable once it names a key, and accessibility floors stay stated.
  • Quality requirement: Observability: the resolver shows each value and its layer.
  • Quality requirement: Scalability: new values join an existing role key where one fits.
  • Quality requirement: Performance: not applicable.
  • Quality requirement: Security: not applicable; scripts receive schema-validated numbers.
  • Run location: this work runs from the owner's local checkout. The classification scan, one-time named-key check and any proof runner stay uncommitted there, so an autonomous lane cannot run its checks.

Load-bearing assumptions

Assumption Source Falsifying check Response if false
Durations and line counts from rough greps are replaced by the classified list; line numbers hold until the blockers land Brief Taste scan with its report-moved option lists the rows it re-keyed Minor: re-key rows by content and proceed

Decisions

  • Plan D1: Placeholder form is {{key}}, root-anchored; the four <animation.*> placeholders in the write-css motion reference migrate to it.
  • Plan D3: This stream is one pull request and is file-disjoint from the other three sweeps.
  • Plan Q3: A recipe in a code block carries a placeholder naming the key.
  • Plan Q7: The gesture damping column stays an example.
  • Interview Q7: A reference names only the key and restates no default.
  • Interview Q28: Key-plus-default text is rewritten to the key alone; the glossary's common-usage numbers stay examples.

Key interfaces

Each file: a taste number becomes a key name (prose) or placeholder (code); restated key-plus-default text is rewritten; "use your own values" becomes the key where one exists; one pointer line to the plugin's values reference when the file holds a placeholder. Rows and forms come from the published classified list.

Files to change (taste numbers from the plan): animation references behaviors (41, with added rows for a line the list missed), catalog (22, with added rows; reconcile "never a template to copy"), gestures (23), performance (4); web performance (5); write-css references motion (11 in code; rewrite its "literal values" header), interaction (6 in code), show-and-hide (23, 20 in code); audit frame-capture (1). The audit motion and glossary easing references have no taste number and stay.

Done when

  • AC3: Every taste value in this stream resolves through one key per role or scale, shared by every mention.
  • AC4: A reference in this stream names the key and restates no default number; existing key-plus-default text is rewritten.
  • AC6: No default value in this stream lives outside the defaults file; code examples classified as examples keep their number.
  • AC15: No new test or CI check is added.
  • AC19: The build starts only after feat(user-interface): default two-axis touch elements to tap-to-activate #14213 closes.
  • The one-time named-key check and the motion stream of the taste scan both exit 0.
  • The pull request adds a changelog fragment.

Out of scope

  • Files in the color, layout-type and write-css-layout streams.
  • Floor text, which the floors item owns.
  • Editing other plugins.
  • All t3dotgg/tstack work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-human

    Type

    Fields

    No fields configured for Task.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions