Repository navigation
slim the animation context, delete dead modules, split the timeline stylesheet - #44
Merged
Merged
Conversation
…ach timeline component its own stylesheet
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Three cleanups.
Animation context: 644 lines to 89
After the props-only refactor, the app read only five of the context's 22 fields, and only from organisms and layout components. The context now provides two:
animationEnabled: off when the visitor prefers reduced motion, and still controlled by thedebug:toggle-animationsevent andwindow.__DEBUG_FLAGS.disableAnimations, exactly as before.prefersReducedMotionThe shared variants and the stagger delay now come from
@utils/motion, which the building blocks already use. Removed: entry-animation registry, animation controls, variant factories, low-power detection,optimizeVariants, the dev performance monitor hooks,MotionVariants, and theuseAnimationOptimizationhook.The provider now wraps the app in Framer Motion's
<MotionConfig reducedMotion="user">, so every motion element honours the OS reduced-motion setting, including ones that never ask the context. This is the one intended behaviour change: visitors with reduced motion on no longer get transform animations from any component.Dead modules deleted
Sixteen modules that nothing imports, found by walking imports from the app entry, Storybook, tests and config:
accessibility.tsx,accessibilityUtils.ts,animations.ts,imageOptimizerComponents.tsx,performanceMonitor.ts,validation.ts, three debug components,useEducation.ts,useExperience.ts, and stale mocks under__mocks__folders.Timeline.csssplitThe 691-line stylesheet shared by three components is now
Timeline.css,TimelineCard.cssandTimelineEasterEggOverlay.css, each imported by its own component. Rules were moved verbatim; every selector appears exactly once across the three files. A card rendered on its own (as in its stories) now carries all of its own styles.Verification