docs: remove false animate-[...] arbitrary-value section (#83)#88
docs: remove false animate-[...] arbitrary-value section (#83)#88claude[bot] wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Pull request overview
Removes inaccurate documentation for animation arbitrary bracket syntax (animate-[...]) that is not implemented by the AnimationParser, and records the fix in the changelog to prevent users from relying on a no-op example.
Changes:
- Removed the Arbitrary Values section (and its ToC entry) from
doc/interactivity/animation.mdthat claimedanimate-[...]works. - Added an [Unreleased] → Fixed entry to
CHANGELOG.mddocumenting the docs correction and pointing users to theme customization.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| doc/interactivity/animation.md | Removes the incorrect animate-[...] arbitrary-value documentation and keeps the page structure/anchors coherent. |
| CHANGELOG.md | Adds an Unreleased “Fixed” entry describing the docs correction and the correct extension path. |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
|
||
| ### Fixed | ||
|
|
||
| - `doc/interactivity/animation.md`: removed the Arbitrary Values section that claimed `animate-[...]` bracket syntax works; `AnimationParser` only resolves theme-map keys, so the example silently no-ops. Use the Customizing Theme section to register custom animations. (#83) |
There was a problem hiding this comment.
CLAUDE.md rule: "one-line bullet per change." This reads as two sentences; the trailing sentence about the Customizing Theme section is guidance, not a description of the change itself. The issue ref (#83) is correct.
| - `doc/interactivity/animation.md`: removed the Arbitrary Values section that claimed `animate-[...]` bracket syntax works; `AnimationParser` only resolves theme-map keys, so the example silently no-ops. Use the Customizing Theme section to register custom animations. (#83) | |
| - `doc/interactivity/animation.md`: removed the `Arbitrary Values` section — `animate-[...]` bracket syntax is not implemented in `AnimationParser`; tokens not present in `context.theme.animations` silently no-op. (#83) |
| ``` | ||
|
|
||
| <a name="customizing-theme"></a> | ||
| ## Customizing Theme |
There was a problem hiding this comment.
This section (the PR's stated "correct extension path") has a bug in its own example.
AnimationParser looks up the full class token against the theme map — className is e.g. 'animate-wiggle', not 'wiggle':
// animation_parser.dart:40
context.theme.animations.containsKey(className)The defaults confirm the key format (lib/src/theme/defaults/animations.dart):
'animate-spin': WindAnimationType.spin,
'animate-ping': WindAnimationType.ping,
// ...The example below this heading uses 'wiggle' as the key. A user following that example gets the same silent no-op this PR is trying to fix. The key must be 'animate-wiggle':
// WRONG (current)
WindThemeData(animations: {'wiggle': WindAnimationType.bounce})
// CORRECT
WindThemeData(animations: {'animate-wiggle': WindAnimationType.bounce})This needs fixing before the PR lands — otherwise removing the arbitrary-values section and pointing to this section is a net-zero improvement for users.
Review: docs: remove false animate-[...] arbitrary-value section (#83)Direction is correct; one blocker before merging. The PR's core diagnosis is accurate — BlockerCustomizing Theme example uses the wrong key format (inline comment on The PR description says "Use the Customizing Theme section directly below, which is the correct extension path," but that section's code example uses // lib/src/theme/defaults/animations.dart
'animate-spin': WindAnimationType.spin, // key includes the prefixA user following the Customizing Theme section after this PR lands hits the same silent no-op. Needs a one-line fix to Pre-existing issues (not introduced here, worth a follow-up)
No regression test for the silent no-op. What's correct
|
|
Closed: infra test artifact from claude-issue-agent dry-run. Reverting the agent workflow; will revisit later. |
Fixes #83
Removed the Arbitrary Values section from
doc/interactivity/animation.mdthat claimedanimate-[wiggle_1s_ease-in-out_infinite]works.AnimationParseronly resolves theme-map keys viacontext.theme.animations.containsKey(); there is no bracket-syntax handler, so the documented example silently no-ops. Users wanting custom animations should use the Customizing Theme section directly below, which is the correct extension path.