-
Notifications
You must be signed in to change notification settings - Fork 3k
feat: add Radix UI slot component and enhance Markdown rendering #10391
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
base: main
Are you sure you want to change the base?
Conversation
- Added `@radix-ui/react-slot` dependency to package.json for improved component composition. - Introduced a new `Loader` component with various loading styles to enhance user experience during asynchronous operations. - Updated `PlaceholderBlock` to utilize the new `Loader` component, improving loading state representation. - Enhanced `Markdown` component to support smooth fade animations based on streaming status, improving visual feedback during content updates. - Refactored utility functions to include a new `cn` function for class name merging, streamlining component styling.
Code Review for PR #10391Thank you for your contribution! I've reviewed the changes to add Radix UI slot component and enhance Markdown rendering. Here's my comprehensive feedback: ✅ Strengths
🔍 Code Quality & Best Practices1. Memory Leak Risk in Markdown Component 🚨The // Current implementation creates new components on every render
p: SmoothFade((props) => <p {...props} />, isStreaming), Recommendation: Move 2. Missing Dependencies Installation
|
src/renderer/src/pages/home/Messages/Blocks/PlaceholderBlock.tsx
Outdated
Show resolved
Hide resolved
…tions - Removed `@radix-ui/react-slot` dependency from package.json and corresponding entries in yarn.lock to streamline dependencies. - Adjusted the `PlaceholderBlock` component's margin styling for improved layout. - Refactored utility functions by exporting `cn` from `@heroui/react`, enhancing class name management.
…n component - Introduced a new `fadeInWithBlur` keyframe animation in Tailwind CSS for enhanced visual effects. - Removed inline fade animation styles from the `Markdown` component to streamline rendering. - Updated the `SmoothFade` function to utilize the new animation, improving the user experience during content transitions.
@radix-ui/react-slot
dependency to package.json for improved component composition.Loader
component with various loading styles to enhance user experience during asynchronous operations.PlaceholderBlock
to utilize the newLoader
component, improving loading state representation.Markdown
component to support smooth fade animations based on streaming status, improving visual feedback during content updates.cn
function for class name merging, streamlining component styling.55cd83d1a28759759a418cd72800b835.mov