Skip to content

Conversation

@ahnv
Copy link
Member

@ahnv ahnv commented Jan 20, 2025

No description provided.

@ahnv ahnv changed the title feat: AI Editor initial code feat: AI Editor Jan 20, 2025
ahnv added 28 commits January 23, 2025 13:07
ahnv added 21 commits August 18, 2025 11:37
## New Features
- Add useVisibility hook for intersection observer-based lazy loading
  - Supports configurable root margin (default: 300px)
  - Includes fallback for environments without IntersectionObserver
  - Provides ref and visible state for component integration

## UI Improvements
- Optimize toolbar image thumbnail dimensions
  - Reduce thumbnail height from 32 to 24 units
  - Reduce thumbnail width from 40 to 32 units
  - Adjust minimum width from 40 to 32 units
- Improve toolbar scrolling behavior
  - Add overflowY: hidden to prevent vertical scrolling
  - Add vertical padding (pt: 2.5, pb: 2) for better spacing
- Remove hover scale transform effect for smoother interactions
  - Commented out transform: "scale(1.02)" on hover
  - Maintains box shadow hover effect for visual feedback

## Performance Enhancements
- Smaller thumbnail sizes reduce memory usage and improve rendering
- useVisibility hook enables lazy loading capabilities for better performance
- Optimized scrolling container prevents unnecessary overflow

## Technical Details
- useVisibility hook uses TypeScript generics for type safety
- Includes proper cleanup and cancellation handling
- Fallback detection for elements already in viewport
- Compatible with custom root elements and configurable margins
Copy link
Member

@hrhv hrhv left a comment

Choose a reason for hiding this comment

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

Minor comments. Rest lgtm

@@ -0,0 +1,111 @@
import { Box, Button, Flex, Text, Tooltip } from "@chakra-ui/react"
Copy link
Member

Choose a reason for hiding this comment

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

Text is unused.

}
}}
_hover={{
// transform: "scale(1.02)",
Copy link
Member

Choose a reason for hiding this comment

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

Is this intentional?

@@ -0,0 +1,185 @@
import { Box, Button, Flex, HStack, Icon, Text, VStack } from "@chakra-ui/react"
Copy link
Member

Choose a reason for hiding this comment

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

Flex is unused

import {
Alert,
AlertDescription,
AlertIcon,
Copy link
Member

Choose a reason for hiding this comment

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

AlertIcon is unused

@ahnv ahnv merged commit aa8eb52 into main Aug 27, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants