Skip to content

fix(theme): time the theme's transitions with the names the token editor sets - #704

Merged
rubenvdlinde merged 1 commit into
developmentfrom
fix/697-animation-tokens-reach-transitions
Sep 28, 2026
Merged

rubenvdlinde merged 1 commit into
developmentfrom
fix/697-animation-tokens-reach-transitions

Conversation

@rubenvdlinde

Copy link
Copy Markdown
Contributor

Animation speeds set in the token editor did not reach the theme's own transitions.

The defect

The editor offers --animation-quick and --animation-slow and writes those names. css/systems/nldesign/theme.css timed its buttons, links and inputs with var(--nldesign-animation-quick), which the editor never sets, and overrides.css only maps the nldesign name onto the Nextcloud name. So "Animation quick" at 2s changed Nextcloud's own components while the theme's transitions stayed at 100ms, and the page ran two speeds.

The test that was red

tests/Unit/MotionTokensReachTransitionsTest.php reads every custom property a transition or animation in theme.css uses and asks the real TokenRegistry whether the editor can set it. On development testEveryThemeTransitionReadsAnEditableMotionToken failed on --nldesign-animation-quick. testTheSetSpeedStillFeedsTheNextcloudNames guards the mapping the fix relies on.

The fix

The eight transitions in theme.css read var(--animation-quick). With no override saved, overrides.css still sets --animation-quick from the set's --nldesign-animation-quick, so the default stays 100ms; an editor override now reaches Nextcloud's components and the theme's transitions alike. A side effect: Nextcloud's reduced-motion theme sets --animation-quick: 0, which these transitions now follow too.

The typed motion tokens, the renamed editor rows and the repair step in authoring-token-value-types tasks 1.3, 2.4 and 2.5 are not part of this change; this is the smaller fix of the one name that did not line up. For a user who picked a theme explicitly, a :root override still loses to core's body declarations; that is #698.

Verified

  • composer check:strict: exit 0 (its test:all skips in a bare clone, so PHPUnit ran separately).
  • PHPUnit with the server's lib/private on the autoloader: 870 tests, the same 11 errors and 7 failures as on development (missing Symfony and server classes outside a Nextcloud tree).
  • npm run lint, format, test:l10n, check:l10n-js, check:manifest, test:unit, test:guest-css, test:component-scopes: all exit 0.
  • Hydra gates --scope-to-diff: exit 0.

Fixes #697

…tor sets

The editor writes --animation-quick and --animation-slow, while theme.css
timed its buttons, links and inputs with --nldesign-animation-quick, which
the editor never sets. overrides.css only maps the nldesign name onto the
Nextcloud name, so the admin's speed never reached those transitions and
the page ran two speeds. theme.css now reads --animation-quick, which
overrides.css still feeds from the set's --nldesign-animation-quick when no
override is saved.

Fixes #697
@rubenvdlinde
rubenvdlinde merged commit dc4d911 into development Sep 28, 2026
32 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

Quality Report — ConductionNL/thematiq @ 11de2ed

Check PHP Vue Security License Tests
lint ✅
phpcs ✅
phpmd ✅
psalm ✅
phpstan ✅
phpmetrics ✅
eslint ✅
stylelint ✅
build ✅
check-manifest ✅
test-l10n ✅
format ✅
composer ✅ ✅ 107/107
npm ✅ ✅ 2/2
app:check-code ⏭️
info.xml ✅
REUSE ✅
lockfile sync ✅
PHPUnit ✅
Newman ✅
Playwright ⏭️ deferred: E2E runs locally and on the promotion path only. This pull request targets development, so the suite is asked once per promotion into beta and main rather than once per push per open pull request. Run it on any branch from the Actions tab, or locally with npx playwright test.
Hydra gates ✅

Quality workflow — 2026-09-28 15:36 UTC

Download the full PDF report from the workflow artifacts.

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