Repository navigation
feat: add orchestrated page animations and micro-interactions - #8
Conversation
Motion enhancements (inspired by PR #6): - Orchestrated page entry: form slides from left, preview from right - Staggered form block animations with cascading delays - History panel scale-in animation - Focus ring pulse animation on inputs Micro-interactions: - translateX(4px) hover effect on item rows and history items - scale(0.98) button press effect on all button types - Smooth transitions for all interactive elements Layout: - Asymmetrical grid (0.9fr : 1fr) for visual interest Print improvements: - Hide noise texture and animations in print - Preserve dark total row styling - Hide skip-link and placeholder in print output All changes respect prefers-reduced-motion preference. Amp-Thread-ID: https://ampcode.com/threads/T-019bee5e-33fb-7526-9a97-ab10f03bd6ff Co-authored-by: Amp <amp@ampcode.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ef86c51214
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| .form-block { | ||
| opacity: 0; | ||
| animation: fadeInUp 0.4s var(--ease-out-expo) forwards; | ||
| } |
There was a problem hiding this comment.
Keep form blocks visible after entry animation
Because main.css imports utilities before components, the later .form-block rule in components/forms.css overrides the animation here and drops the forwards fill mode. With opacity: 0 still coming from this rule, once the entry animation finishes (normal motion, non-reduced), the blocks revert to opacity 0 and effectively disappear. Consider removing the base opacity or ensuring the final animation rule keeps forwards/sets opacity: 1.
Useful? React with 👍 / 👎.
Deploying rebill with
|
| Latest commit: |
79435dd
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://465b0188.rebill.pages.dev |
| Branch Preview URL: | https://feat-enhanced-motion-interac.rebill.pages.dev |
Playwright test resultsDetails
|
Addresses PR review comment: The .form-block animation in forms.css was overriding the orchestrated animation in animations.css due to CSS cascade order (components load after utilities).
|
@codex review |
|
Codex Review: Didn't find any major issues. Can't wait for the next one! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
There was a problem hiding this comment.
Pull request overview
This PR adds orchestrated page entry animations and micro-interactions to enhance the user experience while maintaining accessibility through prefers-reduced-motion support. The changes introduce staggered animations for form blocks, slide-in effects for main sections, hover micro-interactions, and improved print styles.
Changes:
- Added orchestrated page entry animations with form section sliding from left and invoice preview from right
- Implemented micro-interactions including translateX hover effects and scale press effects on buttons
- Updated layout to use asymmetrical grid (0.9fr : 1fr) for visual interest
- Enhanced print styles to hide animations and preserve dark total row styling
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| src/css/utilities/animations.css | Added keyframe definitions for slideInFromLeft, slideInFromRight, scaleIn, and focusRingPulse animations; implemented orchestrated page entry and staggered form block animations with reduced motion support |
| src/css/layout/responsive.css | Enhanced print media query to disable animations/transitions and hide noise texture while preserving dark total row styling |
| src/css/layout/grid.css | Changed grid from symmetrical (1fr 1fr) to asymmetrical (0.9fr 1fr) for visual interest |
| src/css/components/history.css | Added translateX(4px) hover micro-interaction and transform transition property to history items |
| src/css/components/forms.css | Added hover micro-interaction to item-row with translateX(4px) and background change; removed old animation in favor of centralized animation in animations.css |
| src/css/components/buttons.css | Added scale(0.98) press effect to all button types (primary, secondary, ghost) on active state |
| src/css/base/variables.css | Added --ease-out-expo timing function, stagger delay variables (--stagger-1 through --stagger-6), and --primary-rgb variable for alpha usage |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| /* Stagger delays for orchestrated animations */ | ||
| --stagger-1: 0.1s; | ||
| --stagger-2: 0.15s; | ||
| --stagger-3: 0.2s; | ||
| --stagger-4: 0.25s; | ||
| --stagger-5: 0.3s; | ||
| --stagger-6: 0.35s; | ||
|
|
There was a problem hiding this comment.
The stagger delay variables defined in this file are not being used. In animations.css, the animation delays are hardcoded (0.1s, 0.15s, 0.2s, etc.) instead of using these CSS variables. Consider either removing these unused variables or updating the animation delays in animations.css to use them (e.g., animation-delay: var(--stagger-1);). This would improve maintainability by centralizing the delay values.
| /* Stagger delays for orchestrated animations */ | |
| --stagger-1: 0.1s; | |
| --stagger-2: 0.15s; | |
| --stagger-3: 0.2s; | |
| --stagger-4: 0.25s; | |
| --stagger-5: 0.3s; | |
| --stagger-6: 0.35s; |
| .form-block:nth-child(1) { animation-delay: 0.1s; } | ||
| .form-block:nth-child(2) { animation-delay: 0.15s; } | ||
| .form-block:nth-child(3) { animation-delay: 0.2s; } | ||
| .form-block:nth-child(4) { animation-delay: 0.25s; } | ||
| .form-block:nth-child(5) { animation-delay: 0.3s; } | ||
| .form-block:nth-child(6) { animation-delay: 0.35s; } |
There was a problem hiding this comment.
The animation delays are hardcoded here, but CSS variables for stagger delays (--stagger-1 through --stagger-6) are defined in variables.css. Consider using these variables instead to improve maintainability. For example: animation-delay: var(--stagger-1); for the first child, animation-delay: var(--stagger-2); for the second, etc.
| .form-block:nth-child(1) { animation-delay: 0.1s; } | |
| .form-block:nth-child(2) { animation-delay: 0.15s; } | |
| .form-block:nth-child(3) { animation-delay: 0.2s; } | |
| .form-block:nth-child(4) { animation-delay: 0.25s; } | |
| .form-block:nth-child(5) { animation-delay: 0.3s; } | |
| .form-block:nth-child(6) { animation-delay: 0.35s; } | |
| .form-block:nth-child(1) { animation-delay: var(--stagger-1); } | |
| .form-block:nth-child(2) { animation-delay: var(--stagger-2); } | |
| .form-block:nth-child(3) { animation-delay: var(--stagger-3); } | |
| .form-block:nth-child(4) { animation-delay: var(--stagger-4); } | |
| .form-block:nth-child(5) { animation-delay: var(--stagger-5); } | |
| .form-block:nth-child(6) { animation-delay: var(--stagger-6); } |
| /* ===== Focus Ring Animation ===== */ | ||
| .form-group input:focus, | ||
| .form-group textarea:focus, | ||
| .form-group select:focus { | ||
| animation: focusRingPulse 0.2s ease-out forwards; | ||
| } |
There was a problem hiding this comment.
The focusRingPulse animation sets box-shadow values that will override the static box-shadow defined in forms.css line 146 (.form-group input:focus has box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);). The animation starts with box-shadow: 0 0 0 0 rgba(var(--primary-rgb), 0.4) and ends with box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.15). This means after the animation completes, the box-shadow will be 0 0 0 3px rgba(99, 102, 241, 0.15) instead of the expected 0 0 0 3px rgba(99, 102, 241, 0.12) from the :focus rule. Consider adjusting the animation's final state to match the static focus style, or adjust the static style to use the animation's end state.
| /* Asymmetrical grid for visual interest */ | ||
| grid-template-columns: 0.9fr 1fr; |
There was a problem hiding this comment.
There's a discrepancy in the asymmetrical grid ratio. This PR implements 0.9fr 1fr, but the referenced PR #6 (mentioned in the description) states it uses 0.85fr : 1fr. Please verify which ratio is intended and ensure consistency between the implementations.
| scroll-behavior: auto !important; | ||
| } | ||
|
|
||
| .form-block { |
There was a problem hiding this comment.
The reduced motion media query only explicitly sets opacity for .form-block elements, but other animated elements (.form-section, .invoice-section, .invoice-placeholder, .item-row, .history-panel) also start with opacity: 0 in their animations. When animations are disabled with animation-duration: 0.01ms, these elements might flash briefly at opacity 0 or may have visibility issues. Consider adding explicit opacity rules for all animated elements within the reduced motion media query to ensure they're fully visible, similar to what's done for .form-block.
| .form-block { | |
| .form-block, | |
| .form-section, | |
| .invoice-section, | |
| .invoice-placeholder, | |
| .item-row, | |
| .history-panel { |
|
|
||
| /* ===== Staggered Form Block Entry ===== */ | ||
| .form-block { | ||
| animation: fadeInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) both; |
There was a problem hiding this comment.
The cubic-bezier timing function is hardcoded here but a CSS variable --ease-out-expo is defined in variables.css with the same value. Consider using var(--ease-out-expo) instead for consistency and maintainability, as is done in other animation rules (lines 63, 68, 87, 92).
| animation: fadeInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) both; | |
| animation: fadeInUp 0.4s var(--ease-out-expo) both; |
Motion enhancements (inspired by PR #6):
Micro-interactions:
Layout:
Print improvements:
All changes respect prefers-reduced-motion preference.
Amp-Thread-ID: https://ampcode.com/threads/T-019bee5e-33fb-7526-9a97-ab10f03bd6ff