feat: calendar sidebar pane with aggregated day views#199
Merged
Conversation
Adds a calendar widget to the left sidebar that provides an at-a-glance view of note activity and allows quick navigation to notes from specific dates. Features: - Calendar widget in left sidebar (top position by default) with month nav - Activity badges behind date numbers using logarithmic scaling (95th percentile reference to avoid outlier skew) - Today's date highlighted with accent color - Clicking a day opens current tab showing notes created/modified on that date - Tab titled with ISO date format (yyyy-MM-dd) - Two sections: Created and Modified, sorted newest-first - Deduplication: existing date tabs are focused instead of duplicated Technical: - CalendarDayActivityCalculator: logarithmic badge sizing with outlier protection - TabItem.date(Date): new enum case with displayName formatting - openDate(): opens in current tab vs openDateInNewTab() - 52 total tests covering calculator, filtering, and tab behavior Closes #196
The test used only 3 data points which caused the 95th percentile to return a value that made multiple days hit the max size. Fixed by adding more data points so the 95th percentile is a middle value, allowing proper differentiation between high, medium, and low activity. Fixes CI failure in test_badgeSize_proportionalToMaxActivity.
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
Adds a calendar widget to the left sidebar that provides an at-a-glance view of note activity and allows users to quickly navigate to notes created or modified on a specific day.
Closes #196
Features
yyyy-MM-ddTechnical Details
New Files
CalendarDayActivityCalculator.swift- Logarithmic badge size calculation with outlier protectionCalendarPaneView.swift- SwiftUI calendar grid with activity badgesDatePageView.swift- Tab content showing created/modified note sectionsCalendarDayActivityCalculatorTests.swift- 16 tests for calculatorAppStateDateFilteringTests.swift- 12 tests for date filteringAppStateDateTabTests.swift- 24 tests for tab behaviorModified
AppState.swift- AddedTabItem.date(Date),openDate(),notesCreatedOnDate(),notesModifiedOnDate()SettingsManager.swift- Addedcalendarcase toSidebarPane, updated default sidebar configContentView.swift- Added calendar pane to sidebar contentSplitPaneEditorView.swift- Added handling for.datetabsTesting