Dynamic max events and Month View refactor | Beta version#47
Merged
Jaganath-MSJ merged 20 commits intobetafrom Feb 16, 2026
Merged
Dynamic max events and Month View refactor | Beta version#47Jaganath-MSJ merged 20 commits intobetafrom
Jaganath-MSJ merged 20 commits intobetafrom
Conversation
fix date selection logic and dependency arrays | Standard Version
## [1.1.1](v1.1.0...v1.1.1) (2026-02-11) ### Bug Fixes * fix date selection logic and dependency arrays ([78aa7e7](78aa7e7))
- Remove maxEvents from CalendarContentType interface as it's now computed dynamically - Fix conditional logic in EventItem to properly handle endDateWeek and endDate - Enhance calculateMaxEvents to accept rowsInView parameter for better flexibility - Compute maxEvents in CalendarContent using memoized calculation based on calendar grid rows - Simplify Calendar component by moving maxEvents calculation to CalendarContent
- Update calendar-simple from version 1.1.0 to 1.1.1 in package.json and lock file - Replace static demo events with dynamic, date-relative events for better testing - Make calendar container responsive using viewport units - Set selectedDate to current date and add maxEvents prop for demonstration
- Extract hardcoded values into CALENDAR_CONSTANTS object - Update EventItem, Calendar, and utility functions to use centralized constants - Improve maintainability by eliminating magic numbers across components
Add smart positioning logic to prevent popover from overflowing screen edges. Increase popover dimensions and add scrollable content area for better event display. Make maxEvents required in DateDataType interface to ensure consistent behavior.
Add type annotations to week and day parameters in map callbacks for better type safety and improved IDE support.
- Create Storybook configuration files (main.ts, preview.ts) with proper TypeScript support - Add Calendar component stories with comprehensive examples and controls - Configure Vite build to conditionally exclude type generation during Storybook builds - Add necessary dependencies and scripts for Storybook development and build - Create type declaration file for Storybook module resolution
Update @types/node, @types/react, @types/react-dom, esbuild, prettier, semantic-release, and typescript to their latest compatible versions to maintain security and leverage latest features and fixes.
… versions Update react and react-dom to ^19.2.4 for bug fixes and improvements. Update dev dependencies including eslint, typescript packages, and vite to their latest compatible versions to maintain security and toolchain stability.
- Add 'docs' and 'storybook-static' to .gitignore to exclude generated documentation and Storybook builds - Significantly expand the demo event data in the playground to include more diverse scenarios: - Overlapping events to test visual rendering - Long-duration and cross-month events - Events from previous and next months - Single-day deadlines and multi-day tasks - Remove the `maxEvents` prop from the Calendar component in the demo to display all events
Use fixed positioning to ensure popover stays within viewport boundaries. Anchor the popover to the "more events" button element and calculate position relative to viewport with overflow detection for both vertical and horizontal axes. This prevents the popover from being cut off by scroll containers and ensures consistent placement.
Only include @semantic-release/git plugin for non-prerelease branches to avoid unnecessary commits during prerelease builds.
- Remove deprecated convertToDayjs function and replace with dateFn - Extract common date operations into named utility functions (formatDate, getDiffDays, addMonths, etc.) - Update all components to use new utility functions instead of chained dayjs methods - Improve type safety with DateInputType union - Maintain same functionality while reducing dayjs API surface exposure
Simplify event handling by making DataTypeList a discriminated union that explicitly distinguishes between regular events and spacer events. This eliminates conditional checks for optional properties and ensures type safety throughout the codebase. - Replace interface with union type separating spacer and non-spacer events - Make startDateWeek required for non-spacer events - Remove fallback logic in EventItem since startDateWeek is now guaranteed - Add internal type helper with _tempId for slot calculation - Update slot lookup to use non-null assertion for type safety
- Use CalendarType['onEventClick'] in Popover to match parent interface - Remove duplicate onMonthChange prop from CalendarContent and use from restProps - Extend HeaderProps from CalendarType to ensure type safety and reduce duplication
Consistent use of function declarations improves hoisting behavior and aligns with team style preferences. This change affects utility functions across date handling, calendar logic, and hooks.
…iner height" This reverts commit 25e1404.
Dynamic max events and Month View refactor
|
🎉 This PR is included in version 1.2.0-beta.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version 1.2.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR implements dynamic calculation of
maxEventsbased on the container's height and refactors theMonthViewcomponent to use a discriminated union pattern for better type safety and modularity.Changes
ResizeObserverto auto-calculatemaxEvents.Verification