feat(views): lazy calendar-view iterators (days/weeks)#6
Merged
AriajSarkar merged 14 commits intomainfrom Mar 22, 2026
Merged
Conversation
- introduce `Calendar::days/days_back` and `weeks/weeks_back` with `DayView`/`WeekView` - add owned occurrence model and fallible iterators yielding `Result` items - switch day-boundary logic to half-open local windows for date checks and event queries - export new `views` module, add example/tests, and bump crate version to `0.5.0`
Contributor
There was a problem hiding this comment.
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
- cover Event::occurs_on for matching and non-matching days - verify week all_events ordering across days - add edge-case checks for inclusive day end and week boundary helpers - validate invalid full-week start returns zero remaining weeks
… README example to use new `Duration` API.
- Use checked arithmetic when stepping back from nonexistent local times - Add regression test for the New York spring-forward gap
… for gaps between events. Now it correctly tracks which event precedes each gap. - schedule.ics added to Cargo.toml exclude — Prevents a stray test file from shipping in the published crate.
…breaking changes, and fixes - Added calendar view iterators and owned view models for better UI rendering. - Introduced integration and unit tests for improved coverage. - Documented changes in serialization behavior and validation error messages. - Fixed issues with week day advancement and example imports in README.
- Enhanced `to_json` method to provide clearer error messages during serialization. - Updated `from_json` method to ignore invalid timezone fields at the top level while enforcing validation for event-level timezones. - Refactored various sections for improved readability and consistency in error handling. - Added tests to ensure proper handling of missing events and malformed JSON inputs.
…cross examples - Enhanced rustfmt configuration for better readability and consistency. - Refactored example files to consolidate print statements into single lines for improved clarity. - Minor adjustments in performance benchmarks for cleaner code structure.
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
Add lazy DayIterator and WeekIterator to Calendar that yield pre-bucketed, owned event views — making it trivial to plug eventix into Rust UI frameworks (Yew, Leptos, Dioxus) for calendar rendering.
Closes #5
New Public API
New Types
Key Design Decisions
Framework Compatibility
Verified compatible with the prop/signal requirements of:
Files Changed (12 files, +1210 / -68)
Verification