Skip to content

πŸš€ v1.2.0 - Major Release: Enhanced Positioning & Auto-Dismiss

Latest

Choose a tag to compare

@diyardev diyardev released this 24 Sep 21:47
· 7 commits to main since this release

Release Notes

v1.2.0 - Major Release: Enhanced Positioning & Auto-Dismiss πŸš€

✨ New Features

  • Enhanced Bottom Positioning - Fixed bottom toast positioning with absolute layout for perfect screen alignment
  • Extended Auto-Dismiss Duration - Increased default auto-dismiss to 5 seconds for better user experience
  • Smart Default Handling - Improved undefined value handling for duration and position properties
  • Production Ready - Removed all debug messages for clean production builds

πŸ› Critical Bug Fixes

  • Spread Operator Issue - Fixed spread operator overriding default values in ToastContext
  • Bottom Toast Positioning - Resolved bottom toasts appearing at top due to incorrect CSS positioning
  • Duration Handling - Fixed undefined duration preventing auto-dismiss functionality
  • Position Filtering - Enhanced toast filtering logic for better position-based rendering

πŸ”§ Technical Improvements

  • Better TypeScript Support - Enhanced type safety with proper undefined checks
  • Cleaner Code Structure - Refactored components for better maintainability
  • Optimized Rendering - Improved performance with better conditional rendering
  • CSS Architecture - Restructured styles with absolute positioning for bottom toasts

πŸ“¦ Installation

npm install @diyardev/react-native-dynamic-toast@1.2.0
# or
yarn add @diyardev/react-native-dynamic-toast@1.2.0

🎯 Usage Examples

// Top position (default, 5 seconds auto-dismiss)
ToastAPI.error('Please fill all fields');

// Bottom position with custom duration
ToastAPI.success('Login successful!', { 
  position: 'bottom',
  duration: 3000 
});

// Validation errors
ToastAPI.errorWithValidation('Validation failed', {
  email: ['Email is required'],
  password: ['Password must be at least 6 characters']
});

πŸ”„ Breaking Changes

None! This release is fully backward compatible.

πŸ“± Enhanced Compatibility

  • React Native >= 0.60.0
  • React >= 16.8.0
  • TypeScript 5.0+ support
  • iOS and Android tested
  • Safe area context support

🎨 Visual Improvements

  • Perfect Bottom Alignment - Bottom toasts now appear exactly at screen bottom
  • Consistent Spacing - Improved margins and padding for both positions
  • Smooth Animations - Enhanced enter/exit animations for all positions
  • Better Touch Handling - Non-blocking touch events preserved

πŸš€ Performance

  • Faster Rendering - Optimized component re-renders
  • Smaller Bundle - Removed debug code reduces bundle size
  • Memory Efficient - Better cleanup of toast timers

πŸ“„ License

MIT License - see LICENSE file for details.

πŸ‘¨β€πŸ’» Author

Created by diyardev


Full Changelog: v1.0.0...v1.2.0

Documentation: README.md