Skip to content

Conversation

@simbo1905
Copy link

Description

This PR implements a complete infinite scroll calendar with event cards and drag-and-drop functionality.

Key Features Added

📅 Calendar System

  • UK week numbering system (ISO 8601) starting Mondays
  • Current week initialization (e.g. Week 41, Oct 6-12, 2025)
  • Infinite scroll loading for additional weeks
  • Year display in week headers

🎯 Drag & Drop Functionality

  • Full drag-and-drop support between calendar days using
  • Cross-day meal transfers with proper state management
  • Visual feedback with drop zone highlighting during drag operations
  • Smooth animations using Svelte's flip animation

🍽️ Rich Meal Cards

  • Beautiful meal cards with icons, time displays, and color-coded borders
  • Proper ARIA attributes for accessibility
  • Responsive design with scroll snapping
  • Support for different meal types (utensils, chef-hat icons)

🎨 User Interface

  • Interactive meal selection modal with search functionality
  • Removed unnecessary UI elements (header banner, ingredient button)
  • Enhanced drop zones to include empty state areas
  • Mobile-friendly responsive layout

Technical Implementation

Dependencies

  • Added for drag-and-drop functionality
  • Maintained Svelte 5 compatibility with runes system

Type Safety

  • Updated TypeScript interfaces with unique card IDs
  • Added proper drag-and-drop event types
  • Full type safety across all components

State Management

  • Implemented cross-day transfer logic
  • Proper reactive state updates using Svelte 5 runes
  • Maintained data integrity during drag operations

UI/UX Improvements

  • Better Targeting: Drop zones now include the '+ Add' button area for easier targeting of empty days
  • Visual Feedback: Enhanced drop zone styling with blue outline and background highlighting

Testing

All functionality has been tested and verified:

  • ✅ Drag meals between days with existing meals
  • ✅ Drag meals into empty days (now works properly)
  • ✅ Meal selection and addition via modal
  • ✅ Search functionality in modal
  • ✅ Responsive design across screen sizes
  • ✅ TypeScript compilation without errors

The implementation provides a complete infinite scrolling calendar experience while maintaining the lightweight Svelte 5 architecture and following existing code patterns.

@vercel
Copy link

vercel bot commented Oct 11, 2025

@simbo1905 is attempting to deploy a commit to the domino Team on Vercel.

A member of the Team first needs to authorize it.

Maintains compatibility with upstream by reverting TypeScript type changes
in the core InfiniteLoader component. Uses type assertions to handle
Node.js Timeout types while preserving the original number type interface.
Fixes the pluralization logic to properly display:
- '0 activities' instead of '0 activityies'
- '1 activity' for singular
- 'X activities' for plural

Uses proper conditional logic with activit{week.totalActivities === 1 ? 'y' : 'ies'}
@ndom91
Copy link
Owner

ndom91 commented Oct 13, 2025

Hey so thanks for your interest! I appreciate a demo, but i don't know if this is the right place for it.

If you can make it self-contained in a sub folder like my primary development example sort of, that would be acceptable.

However, do not add dependencies like tailwind to the main package, that doesn't make much sense.

Thanks!

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.

2 participants