kloudlite / web

Kloudlite Web
http://kloudlite.io
GNU Affero General Public License v3.0
2 stars 1 forks source link

removed framer-motion from option-list #324

Closed tulsiojha closed 1 month ago

tulsiojha commented 1 month ago

Summary by Sourcery

Enhancements:

sourcery-ai[bot] commented 1 month ago

Reviewer's Guide by Sourcery

This pull request removes the framer-motion dependency from the option-list component and replaces it with CSS animations. The changes focus on simplifying the animation implementation and improving performance by using native CSS transitions.

Class diagram for OptionMenuContent component changes

classDiagram
    class OptionMenuContent {
        +ref
        +sideOffset
        +align
        +side
        +alignOffset
        +loop
        +asChild
        +onClick(e)
        +children
    }
    note for OptionMenuContent "Removed framer-motion and added CSS animations"
    class OptionMenuPrimitive {
        +Portal
        +Content
    }

Class diagram for Tailwind CSS configuration changes

classDiagram
    class TailwindConfig {
        +keyframes
        +animation
    }
    TailwindConfig : +slideDownAndFade
    TailwindConfig : +slideLeftAndFade
    TailwindConfig : +slideUpAndFade
    TailwindConfig : +slideRightAndFade
    note for TailwindConfig "Added new CSS animations for sliding and fading"

File-Level Changes

Change Details Files
Removed framer-motion animations from OptionMenuContent
  • Removed AnimatePresence component
  • Replaced motion.div with a regular div element
  • Removed initial, animate, exit, and transition props
  • Added CSS classes for animations using Tailwind
src/design-system/components/atoms/option-list.tsx
Added new CSS animations to Tailwind configuration
  • Added slideDownAndFade, slideLeftAndFade, slideUpAndFade, and slideRightAndFade keyframes
  • Added corresponding animation classes with cubic-bezier timing functions
src/design-system/tailwind-base.js
Updated OptionMenuPrimitive.Content props
  • Removed forceMount prop
  • Removed conditional rendering based on 'open' state
src/design-system/components/atoms/option-list.tsx

Tips and commands #### Interacting with Sourcery - **Trigger a new review:** Comment `@sourcery-ai review` on the pull request. - **Continue discussions:** Reply directly to Sourcery's review comments. - **Generate a GitHub issue from a review comment:** Ask Sourcery to create an issue from a review comment by replying to it. - **Generate a pull request title:** Write `@sourcery-ai` anywhere in the pull request title to generate a title at any time. - **Generate a pull request summary:** Write `@sourcery-ai summary` anywhere in the pull request body to generate a PR summary at any time. You can also use this command to specify where the summary should be inserted. #### Customizing Your Experience Access your [dashboard](https://app.sourcery.ai) to: - Enable or disable review features such as the Sourcery-generated pull request summary, the reviewer's guide, and others. - Change the review language. - Add, remove or edit custom review instructions. - Adjust other review settings. #### Getting Help - [Contact our support team](mailto:support@sourcery.ai) for questions or feedback. - Visit our [documentation](https://docs.sourcery.ai) for detailed guides and information. - Keep in touch with the Sourcery team by following us on [X/Twitter](https://x.com/SourceryAI), [LinkedIn](https://www.linkedin.com/company/sourcery-ai/) or [GitHub](https://github.com/sourcery-ai).