Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[web]Feat 36 standardize animations #108

Merged

Conversation

Marvelousmicheal
Copy link
Collaborator

@Marvelousmicheal Marvelousmicheal commented Feb 1, 2025

Overview:
This pull request introduces significant improvements to the animation system in our project. The primary goal was to make animations more reusable, scalable, and accessible while also providing an alternative reduced-animation option for better accessibility compliance.

Key Changes:

  1. Reusable Animation Components:

    • All affected components now utilize reusable animation logic instead of duplicating code. This ensures consistency across the application and reduces maintenance overhead.
    • Animations are decoupled from specific components, making it easier to apply them wherever needed.
  2. Reduced Animation Alternative:

    • Introduced a reduced-animation mode as an alternative for users who prefer or require less motion. This aligns with best practices for accessibility (e.g., respecting prefers-reduced-motion media queries).
    • The reduced-animation version provides simpler transitions that do not compromise usability.
  3. Centralized Animation Management:

    • Created an animation.ts file to serve as a single source of truth for all animations. This file will act as a library where new animations can be added systematically when required.
    • Centralizing animations improves organization and makes it easier to update or extend animation behavior globally.

Implementation Details:

  • Refactored Components:

    • Updated existing components to use the reusable animation utilities defined in animation.ts.
    • Ensured backward compatibility by maintaining the same visual behavior unless explicitly overridden.
  • **Reduced Animation Logic:

    • Added conditional checks for the prefers-reduced-motion preference using CSS media queries.
    • Adjusted animation durations, easing functions, and keyframes to provide a subtler experience in reduced mode.
  • **Animation Library (animation.ts):

    • Defined a set of reusable animation functions and configurations.
    • Included clear documentation within the file to guide future contributors on how to add or modify animations.

Summary by CodeRabbit

  • New Features

    • Integrated reduced motion support across dialogs, alerts, dropdown menus, and sheets.
    • Introduced configurable animation options including fade, slide, and zoom effects with customizable durations.
  • Refactor

    • Updated UI component animations to dynamically adjust based on user motion preferences for improved accessibility and smoother visual transitions.
    • Enhanced animation definitions and keyframes for a more consistent and refined user experience.

Copy link

vercel bot commented Feb 1, 2025

@Marvelousmicheal is attempting to deploy a commit to the kindfi Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Contributor

coderabbitai bot commented Feb 1, 2025

Walkthrough

The changes introduce a new custom hook, useReducedMotion, to detect user preferences for reduced animations via CSS media queries. Several UI components—AlertDialog, Dialog, DropdownMenu, and Sheet—have been updated to conditionally render animation classes based on this setting. A new animations module provides predefined class combinations for various transitions, and the Tailwind CSS configuration is updated with keyframes and transition duration settings to support fade animations.

Changes

File(s) Change Summary
apps/web/components/base/alert-dialog.tsx, .../dialog.tsx, .../dropdown-menu.tsx, .../sheet.tsx Components now integrate the useReducedMotion hook to conditionally apply static or animated CSS classes using the new animations module; includes updated method signatures and removal of deprecated props (e.g., sideOffset).
apps/web/hooks/use-reduced-motion.tsx New hook that detects the user's reduced motion preference via CSS media queries, using event listeners to update state.
apps/web/lib/animation.ts New module exporting immutable animation class combinations for fade, zoom, slide, and composite transitions.
apps/web/tailwind.config.ts Added keyframes (fadeIn, fadeOut), new animation properties (fade-in, fade-out), and updated transition duration settings for fade animations.

Sequence Diagram(s)

sequenceDiagram
    participant C as Component
    participant RM as useReducedMotion Hook
    participant M as Media Query

    C->>RM: Invoke hook to check reduced motion preference
    RM->>M: Query 'prefers-reduced-motion'
    M-->>RM: Return boolean value
    RM-->>C: Provide reducedMotion state
    alt Reduced motion enabled
        C->>C: Apply static (non-animated) CSS classes
    else
        C->>C: Apply animated CSS classes from animations module
    end
Loading

Possibly related PRs

  • feat: adding semantic html for dialog #76: Modifies DialogOverlay and DialogContent components for semantic HTML improvements, sharing code-level modifications with the current reduced motion handling changes.

Suggested reviewers

  • AndlerRL
  • Bran18

Poem

I'm a bunny in the code garden, light and spry,
Skipping through hooks and CSS like a joyful sigh.
Reduced motion or animated dance, I see,
Every line now hops with accessibility.
With carrot dreams and rhythms so grand,
I celebrate our code with a twitch of my hand! 🐰

✨ Finishing Touches
  • 📝 Generate Docstrings (Beta)

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@coderabbitai coderabbitai bot added documentation Improvements or additions to documentation enhancement New feature improvement or request webapp web app related labels Feb 1, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 11

📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 77ef376 and 9a73c5a.

⛔ Files ignored due to path filters (1)
  • apps/web/bun.lockb is excluded by !**/bun.lockb
📒 Files selected for processing (8)
  • apps/web/.gitignore (1 hunks)
  • apps/web/components/base/alert-dialog.tsx (2 hunks)
  • apps/web/components/base/dialog.tsx (2 hunks)
  • apps/web/components/base/dropdown-menu.tsx (3 hunks)
  • apps/web/components/base/sheet.tsx (2 hunks)
  • apps/web/hooks/use-reduced-motion.tsx (1 hunks)
  • apps/web/lib/animation.ts (1 hunks)
  • apps/web/tailwind.config.ts (2 hunks)
👮 Files not reviewed due to content moderation or server errors (4)
  • apps/web/tailwind.config.ts
  • apps/web/components/base/sheet.tsx
  • apps/web/components/base/alert-dialog.tsx
  • apps/web/components/base/dropdown-menu.tsx
🧰 Additional context used
📓 Learnings (3)
apps/web/components/base/dropdown-menu.tsx (2)
Learnt from: Marvelousmicheal
PR: kindfi-org/kindfi#70
File: apps/web/components/base/dropdown-menu.tsx:48-65
Timestamp: 2025-01-27T08:48:57.046Z
Learning: In the dropdown menu component, when implementing animation class utilities, using an if statement for the reducedMotion check is preferred over a ternary operator for better readability.
Learnt from: Marvelousmicheal
PR: kindfi-org/kindfi#70
File: apps/web/components/base/dropdown-menu.tsx:48-65
Timestamp: 2025-01-27T01:17:36.610Z
Learning: In the dropdown menu component, slide animations that are specific to dropdown positioning (e.g., data-[side=bottom]:slide-in-from-top-2) should be kept within the component file rather than in the centralized animation.ts, as they are component-specific and not reused elsewhere.
apps/web/hooks/use-reduced-motion.tsx (2)
Learnt from: Marvelousmicheal
PR: kindfi-org/kindfi#70
File: apps/web/hooks/use-reduced-motion.tsx:1-35
Timestamp: 2025-01-27T00:58:24.309Z
Learning: Guard clauses for SSR compatibility in React hooks should check for `typeof window === 'undefined'` at the start of useEffect hooks that access browser APIs.
Learnt from: Marvelousmicheal
PR: kindfi-org/kindfi#70
File: apps/web/hooks/use-reduced-motion.tsx:1-38
Timestamp: 2025-01-27T09:29:32.886Z
Learning: The MediaQueryList API in older Safari browsers requires using `addListener`/`removeListener` instead of `addEventListener`/`removeEventListener`. Always include this fallback when working with media queries.
apps/web/tailwind.config.ts (1)
Learnt from: Marvelousmicheal
PR: kindfi-org/kindfi#70
File: apps/web/tailwind.config.ts:100-101
Timestamp: 2025-01-25T09:50:47.511Z
Learning: In the Tailwind configuration for fade animations, using `ease-in-out` timing function is preferred over separate `ease-in` and `ease-out` functions to maintain consistency and provide smoother transitions.
🔇 Additional comments (21)
apps/web/.gitignore (1)

39-44: Environment configuration files added to .gitignore.

The update now includes multiple environment configuration files (.env.local, .env.development, .env.test, and .env.production) alongside the existing .env file. This ensures that sensitive or environment-specific settings are not accidentally committed, aligning with best practices for environment management. The changes are clear and consistent with the project’s configuration strategy.

apps/web/components/base/dialog.tsx (1)

22-39: Great integration of reduced motion logic in DialogOverlay.

The conditional application of 'bg-black/80' for reduced motion and the 'fadeAndAnimateAndOverlay.inOut' animation for the default state is a clear solution to accommodate users who prefer less motion. Well done!

apps/web/tailwind.config.ts (6)

102-109: LGTM! Well-documented animation configurations.

The documentation clearly describes the purpose and usage of fade animations, making it easier for other developers to understand and implement them correctly.


119-126: LGTM! Animation configurations align with best practices.

The fade animations are well-implemented with:

  • Proper opacity transitions
  • Consistent ease-in-out timing function (as per previous learnings)

Also applies to: 131-132


102-109: LGTM! Well-documented animation utilities.

The documentation clearly explains the purpose and usage of the fade animations, making it easier for other developers to understand and use them correctly.


119-126: LGTM! Consistent timing function used.

The fade animations use ease-in-out timing function as recommended in the retrieved learnings, which provides smoother transitions.


102-109: Well-documented animation utilities!

Clear and comprehensive documentation for the fade animations, specifying their purpose and usage across different components.


119-126: LGTM! Animation configuration aligns with best practices.

The fade animations use the recommended ease-in-out timing function as per the retrieved learning, providing smooth transitions.

Also applies to: 131-132

apps/web/components/base/sheet.tsx (5)

23-38: LGTM! Well-implemented reduced motion support.

The SheetOverlay component correctly implements reduced motion support by:

  • Using the useReducedMotion hook
  • Conditionally applying animations
  • Providing a static fallback for users who prefer reduced motion

42-42: LGTM! Transition durations updated to use standardized values.

The sheetVariants configuration now uses the new standardized duration values (duration-slow, duration-fast), improving consistency across animations.


23-38: LGTM! Proper implementation of reduced motion support.

The component correctly uses the useReducedMotion hook to conditionally apply animations, improving accessibility for users who prefer reduced motion.


23-38: LGTM! Proper implementation of reduced motion preferences.

The SheetOverlay component correctly handles reduced motion preferences by conditionally applying animations.


42-42: Verify transition duration classes.

The duration classes have been updated from hardcoded values to the new standardized durations.

✅ Verification successful

Verified: New standardized transition durations confirmed.

  • The Tailwind configuration in apps/web/tailwind.config.ts defines slow as '500ms' and fast as '300ms'.
  • The component at apps/web/components/base/sheet.tsx correctly references these standardized duration classes.
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify that the new duration classes are defined in the Tailwind config

rg -A 1 "duration-(slow|fast|default)" apps/web/tailwind.config.ts

Length of output: 68


Script:

#!/bin/bash
# Description: Search the entire repository for references to "duration-slow" and "duration-fast"
rg -n "duration-slow" .
echo ""
rg -n "duration-fast" .

Length of output: 536


Script:

#!/bin/bash
# Description: Search the tailwind.config.ts for any definitions of standardized duration values "slow" or "fast"
rg -n "slow" apps/web/tailwind.config.ts
echo ""
rg -n "fast" apps/web/tailwind.config.ts

Length of output: 138

apps/web/components/base/alert-dialog.tsx (3)

20-36: LGTM! Consistent implementation of reduced motion support.

The AlertDialogOverlay component follows the same pattern as SheetOverlay, ensuring consistency across components.


20-36: LGTM! Proper implementation of reduced motion support.

The component correctly uses the useReducedMotion hook to conditionally apply animations, improving accessibility.


20-36: LGTM! Consistent implementation of reduced motion preferences.

The AlertDialogOverlay component follows the same pattern as SheetOverlay for handling reduced motion preferences.

apps/web/components/base/dropdown-menu.tsx (5)

23-33: LGTM! Well-implemented animation utility function.

The getDropdownAnimationClasses function:

  • Is well-documented
  • Uses if statement for readability (as per previous learnings)
  • Correctly keeps slide animations within the component (as per previous learnings)

60-73: LGTM! Consistent implementation across dropdown components.

Both DropdownMenuSubContent and DropdownMenuContent components:

  • Use the shared utility function
  • Implement reduced motion support consistently

Also applies to: 77-96


23-33: LGTM! Well-structured animation utility.

The utility follows the learning about using if statement over ternary operator for better readability.


23-33: LGTM! Well-structured animation utility function.

The getDropdownAnimationClasses function follows the recommended pattern of using an if statement for reduced motion checks, as per the retrieved learning.


60-73: LGTM! Consistent animation handling across components.

Both DropdownMenuSubContent and DropdownMenuContent components properly implement reduced motion preferences using the utility function.

Also applies to: 77-96

apps/web/components/base/dialog.tsx Outdated Show resolved Hide resolved
apps/web/hooks/use-reduced-motion.tsx Show resolved Hide resolved
apps/web/lib/animation.ts Show resolved Hide resolved
apps/web/tailwind.config.ts Show resolved Hide resolved
apps/web/components/base/alert-dialog.tsx Outdated Show resolved Hide resolved
apps/web/tailwind.config.ts Show resolved Hide resolved
apps/web/components/base/sheet.tsx Outdated Show resolved Hide resolved
apps/web/components/base/dropdown-menu.tsx Outdated Show resolved Hide resolved
coderabbitai[bot]
coderabbitai bot previously approved these changes Feb 1, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9a73c5a and 5b8f7df.

📒 Files selected for processing (7)
  • apps/web/components/base/alert-dialog.tsx (2 hunks)
  • apps/web/components/base/dialog.tsx (2 hunks)
  • apps/web/components/base/dropdown-menu.tsx (3 hunks)
  • apps/web/components/base/sheet.tsx (2 hunks)
  • apps/web/hooks/use-reduced-motion.tsx (1 hunks)
  • apps/web/lib/animation.ts (1 hunks)
  • apps/web/tailwind.config.ts (2 hunks)
🧰 Additional context used
📓 Learnings (3)
apps/web/components/base/dropdown-menu.tsx (2)
Learnt from: Marvelousmicheal
PR: kindfi-org/kindfi#70
File: apps/web/components/base/dropdown-menu.tsx:48-65
Timestamp: 2025-01-27T01:17:36.610Z
Learning: In the dropdown menu component, slide animations that are specific to dropdown positioning (e.g., data-[side=bottom]:slide-in-from-top-2) should be kept within the component file rather than in the centralized animation.ts, as they are component-specific and not reused elsewhere.
Learnt from: Marvelousmicheal
PR: kindfi-org/kindfi#70
File: apps/web/components/base/dropdown-menu.tsx:48-65
Timestamp: 2025-01-27T08:48:57.046Z
Learning: In the dropdown menu component, when implementing animation class utilities, using an if statement for the reducedMotion check is preferred over a ternary operator for better readability.
apps/web/tailwind.config.ts (1)
Learnt from: Marvelousmicheal
PR: kindfi-org/kindfi#70
File: apps/web/tailwind.config.ts:100-101
Timestamp: 2025-01-25T09:50:47.511Z
Learning: In the Tailwind configuration for fade animations, using `ease-in-out` timing function is preferred over separate `ease-in` and `ease-out` functions to maintain consistency and provide smoother transitions.
apps/web/hooks/use-reduced-motion.tsx (2)
Learnt from: Marvelousmicheal
PR: kindfi-org/kindfi#70
File: apps/web/hooks/use-reduced-motion.tsx:1-35
Timestamp: 2025-01-27T00:58:24.309Z
Learning: Guard clauses for SSR compatibility in React hooks should check for `typeof window === 'undefined'` at the start of useEffect hooks that access browser APIs.
Learnt from: Marvelousmicheal
PR: kindfi-org/kindfi#70
File: apps/web/hooks/use-reduced-motion.tsx:1-38
Timestamp: 2025-01-27T09:29:32.886Z
Learning: The MediaQueryList API in older Safari browsers requires using `addListener`/`removeListener` instead of `addEventListener`/`removeEventListener`. Always include this fallback when working with media queries.
🔇 Additional comments (17)
apps/web/components/base/dialog.tsx (3)

6-7: Imports look good.
These imports cleanly introduce the useReducedMotion hook and the animations module, aligning with the PR's goal of centralizing animations and supporting reduced-motion preferences.


21-36: Conditional application of overlay animation is well-structured.
Using useReducedMotion to selectively apply fadeAndAnimateAndOverlay.inOut ensures accessibility for users who prefer reduced motion. This approach is consistent with the SSR guard best practices used elsewhere.


39-71: Consider consolidating combined animations.
The DialogContent includes both animations.fadeAndAnimate.inOut and manual zoom/slide transitions (e.g., data-[state=closed]:zoom-out-95). This was previously noted in an outdated commit review:

"Consider consolidating fade, zoom, and animation into a single utility..."
If you wish to reduce complexity, you could unify these transitions into one combined utility in the animations module or keep them fully separate, but ensure clarity in maintenance.

apps/web/components/base/dropdown-menu.tsx (3)

23-33: Utility function for dropdown animations is clearly structured.
The getDropdownAnimationClasses approach neatly separates the logic for reducedMotion, improving readability and maintainability.


60-74: Retain component-specific slide animations locally.
The existing data attributes (e.g., data-[side=bottom]:slide-in-from-top-2) duplicate some logic found in animations.slideAndAnimate.slideIn. Per your retrieved learnings, consider removing the slide logic from the central animations or removing the local variant to avoid duplication and confusion.


78-97: Consistent reducedMotion handling.
The usage of useReducedMotion for DropdownMenuContent parallels your SubContent logic, ensuring consistent experiences whether a user prefers standard or reduced animations. Good job!

apps/web/hooks/use-reduced-motion.tsx (2)

22-24: Remove redundant type union.
The type annotation repeats MediaQueryListEvent. Per your past review comment, a single MediaQueryListEvent is sufficient.

Apply this minor fix:

- const handleChange = (e: MediaQueryListEvent | MediaQueryListEvent) => {
+ const handleChange = (e: MediaQueryListEvent) => {
    setReducedMotion(e.matches)
}

7-36: Well-implemented SSR guard and fallback for older browsers.
Your early exit for SSR and use of addEventListener/removeEventListener with a addListener/removeListener fallback meet compatibility requirements. This ensures robust support for a range of user agents.

apps/web/lib/animation.ts (5)

35-47: LGTM! Well-organized slide animations.

The slide animations are well-structured with clear directional naming and logical grouping of entrance and exit animations.


62-71: LGTM! Effective combination of animations.

The combined animations are well-implemented, with clear naming and efficient class combination using array join.


77-84: LGTM! Consistent implementation pattern.

The fade and animate combination follows the established pattern effectively.


53-56: 🧹 Nitpick (assertive)

Align naming with other animation categories.

For consistency with other animation categories, consider updating the naming:

 animate: {
-  in: 'data-[state=open]:animate-in',
-  out: 'data-[state=closed]:animate-out',
+  onOpen: 'data-[state=open]:animate-in',
+  onClose: 'data-[state=closed]:animate-out',
 },

Likely invalid or redundant comment.


17-20: 🛠️ Refactor suggestion

Clarify fade animation naming.

The current naming of fade animations is counterintuitive:

  • in applies fade-out when closing
  • out applies fade-in when closing

Consider using more descriptive names to prevent confusion:

 fade: {
-  in: 'data-[state=closed]:fade-out-0',
-  out: 'data-[state=closed]:fade-in-0',
+  onClose: 'data-[state=closed]:fade-out-0',
+  onOpen: 'data-[state=closed]:fade-in-0',
 },

Likely invalid or redundant comment.

apps/web/tailwind.config.ts (2)

134-137: Use semantic names for transition durations.

The current duration names are confusing as fast (300ms) is slower than default (200ms).

Consider using semantic names:

 transitionDuration: {
-  default: '200ms',
-  slow: '500ms',
-  fast: '300ms',
+  instant: '200ms',
+  normal: '300ms',
+  relaxed: '500ms',
 },

119-126: LGTM! Clear and well-documented fade animations.

The fade animation keyframes are well-implemented with clear documentation of their usage.

apps/web/components/base/sheet.tsx (1)

22-37: LGTM! Well-implemented reduced motion support.

The SheetOverlay component effectively handles reduced motion preferences by conditionally applying appropriate classes.

apps/web/components/base/alert-dialog.tsx (1)

54-60: Extract animation class logic.

The component applies multiple animation classes that could potentially conflict. Consider extracting this logic into a utility function:

+const getDialogAnimationClasses = (reducedMotion: boolean): string => {
+  if (reducedMotion) return animations.contentSlide.inOut
+  return [
+    animations.fadeAndZoomAndAnimate.inOut,
+    animations.contentSlide.inOut
+  ].join(' ')
+}

 className={cn(
   'fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-default',
-  reducedMotion ? '' : animations.fadeAndZoomAndAnimate.inOut,
-  animations.contentSlide.inOut,
+  getDialogAnimationClasses(reducedMotion),
   'sm:rounded-lg',
   className,
 )}

apps/web/lib/animation.ts Show resolved Hide resolved
apps/web/lib/animation.ts Show resolved Hide resolved
apps/web/lib/animation.ts Show resolved Hide resolved
Copy link
Member

@AndlerRL AndlerRL left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks for taking care the observations and marking them as done 👌 👍 Merging!

@AndlerRL AndlerRL merged commit aa80f9b into kindfi-org:develop Feb 2, 2025
1 of 3 checks passed
@AndlerRL AndlerRL linked an issue Feb 2, 2025 that may be closed by this pull request
anonfedora pushed a commit to anonfedora/kindfi that referenced this pull request Feb 2, 2025
…mponents (kindfi-org#108)

Co-authored-by: Brandon Fernández <[email protected]>
Co-authored-by: Roberto Lucas <[email protected]>
AndlerRL added a commit that referenced this pull request Feb 2, 2025
* feat: Implement Escrow Initialization API Endpoint #48

* fix: escrow types

* fix: metadata fields

* fix: minor fixes

* fix: Number

* enhancement: dates

* enhancement: dates

* feat: refactoring

* fix: refactoring, fixes

* feat: enhance forms inputs accessibility (#79)

* feat: adding aria attributes

* feat: removing extra attributes

* Update apps/web/app/(auth-pages)/sign-in/page.tsx

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Update apps/web/app/(auth-pages)/sign-up/page.tsx

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* feat: adding error messages

* feat: adding values to footer input

* feat: fix build error

* feat: adding validation hook

* Update apps/web/hooks/use-form-validation.ts

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Update apps/web/hooks/use-form-validation.ts

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Update apps/web/hooks/use-form-validation.ts

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* feat: adjusting email regex

* Update apps/web/hooks/use-form-validation.ts

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* feat: adding resetValidation

* feat: adjusting resetValidation

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* [web] feat: add descriptive aria labels to all buttons  (#80)

* feat: update all buttons with descriptive aria-labels

* fix: remove redundant aria-labels

* fix: remove redundant aria-label from sign-up button

* fix: refactor aria-label text on sign up and sign in button

* feat: test commit

* refactor(buttons): simplify aria-labels for accessibility

* refactor(buttons): remove redundant aria-labels for clarity

* feat: adding semantic html for dialog (#76)

* feat: adding semantic html for dialog

* fix: code rabbit fixes

* feat: adding semantic html for dialog

* feat: adding semantic html for dialog

* feat: adding semantic html for dialog

* fix(dialog): last fixes for accessibility

* fix: adding coderabbit changes

* fix: adding coderabbit changes

* Update dialog.tsx

* feat(components): Create project details components for project page (#97)

Co-authored-by: Brandon Fernández <[email protected]>

* feat(alert):Implemented-aria-live-regions-#34 (#95)

* feat(alert):Implemented-aria-live-regions-#34

* Update apps/web/components/base/alert-dialog.tsx

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Update apps/web/components/base/alert-dialog.tsx

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Brandon Fernández <[email protected]>

* update: improvementes on navigation menu (#89)

* update: improvementes on navigation menu

* update: improvement on navigation menu

* update: comment to sign the commit

* update remove comment to sign the commit

---------

Co-authored-by: Dario Zamora Rojas <[email protected]>
Co-authored-by: Brandon Fernández <[email protected]>

* feat: Feat building participation card v2 (#98)

* [web] impr: rename, organize and implement lazy loading in home sections (#82)

* feat(web): add sections directory structure and organize home components

* impr(web): implement lazy loading for home sections

* chore(web): resolve requested changes from PR #38

* chore(web): resolve requested changes from PR #38

* chore(web): resolve requested changes from PR #38

* chore(web): resolve requested changes from PR #38

* chore(web): resolve requested changes from PR #38

* chore(web): remove unnecessary files

* fix(web): build errors

---------

Co-authored-by: Roberto Lucas <[email protected]>

* [web] feat: project achievement components (#99)

* feat: implement user achievements and collection component - user view

* refactor: move fallbacks folder to components folder

---------

Co-authored-by: Roberto Lucas <[email protected]>

* [web] feat: kindfi theme colours and breakpoints for (#96)

* Add custom theme and breakpoints for ShadCN

* Add custom theme and breakpoints to Tailwind config update

* refactor: extract breakpoints into shared constant

* refactor: extract breakpoints into shared constant

* refactor: extract breakpoints into shared constant

* refactor: extract breakpoints into shared constant

* feat: updated colour patterns

* enhancements: AI recommendations

* enhancements: AI recommendations1

* enhancement: modify type

* [web] feat: improve dialog focus management and a11y + linting errors (#105)

* feat(dialog): improve focus management and a11y. Fix linting errors

1. Improve Dialog focus management and a11y
2. Fix linting errors.

* refactor: use event IDs as keys instead of titles/labels. Wrap media thumbnails in buttons

* refactor: add --no-install clause to husky commit-msg

* fix: assign appropraite IDs to mocked data in otder to resolve type errors in project-updates.tsx

* fix: remove duplicate ID in mock data

* [web] impr: remove duplicated layout #78 (#94)

* fix(layout): resolve duplicated layout issue and remove redundant wrapper

* fix: duplicate layout issues and lint errors

* fix(components): resolve linting issues in project components

---------

Co-authored-by: Favour Abangwu <[email protected]>

* fix: base img render + copilot instructions + biome config tweak (#112)

* fix: base img render + copilot instructions + biome config tweak

* fix: coderabbitai suggestions

* refactor(ui): create use-reduced alt, and apply it across affected components (#108)

Co-authored-by: Brandon Fernández <[email protected]>
Co-authored-by: Roberto Lucas <[email protected]>

---------

Co-authored-by: Diego Barquero Quesada <[email protected]>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Favour Abangwu <[email protected]>
Co-authored-by: Kevin Latino <[email protected]>
Co-authored-by: Josué Araya Marín <[email protected]>
Co-authored-by: Brandon Fernández <[email protected]>
Co-authored-by: Frankie Power <[email protected]>
Co-authored-by: Dario Zamora <[email protected]>
Co-authored-by: Dario Zamora Rojas <[email protected]>
Co-authored-by: davedumto <[email protected]>
Co-authored-by: Derian <[email protected]>
Co-authored-by: Roberto Lucas <[email protected]>
Co-authored-by: Nnaji Benjamin <[email protected]>
Co-authored-by: ayo-ola0710 <[email protected]>
Co-authored-by: Emmanuel Ejei-Okeke <[email protected]>
Co-authored-by: Lulu <[email protected]>
Co-authored-by: Marvelousmicheal <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature improvement or request webapp web app related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement Base Component Animation Patterns
3 participants