Skip to content

Commit 23655e2

Browse files
pclslopesclaude
andcommitted
version 3.0.7: add mobile view dropdown, improve toolbar layout, fix overflow issues
Major improvements to toolbar responsiveness and layout stability: - Add mobile-responsive view switcher: view buttons collapse into dropdown menu at ≤640px - Replace flexbox with CSS Grid for stable toolbar layout (prevents button repositioning) - Add disabled state for navigation/today buttons in list view - Implement uniform row heights in month view (pre-calculates max slots across all weeks) - Fix horizontal scrollbar issues with strategic overflow-x: clip - Fix tooltip clipping on calendar edges - Improve toolbar compactness: reduced padding, gaps, and font sizes - Update bundle sizes in README: 45KB JS + 22KB CSS (was 42KB + 20KB) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent f93441d commit 23655e2

10 files changed

Lines changed: 590 additions & 154 deletions

CHANGELOG.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,54 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99

1010
No unreleased changes yet.
1111

12+
## [3.0.7] - 2026-02-25
13+
14+
### Breaking Changes
15+
- **Removed `maxEventsPerCell` option** - Calendar now always automatically calculates optimal event display based on available space
16+
- Month view cells intelligently adapt to container height
17+
- Events are automatically limited based on cell height with "+N more" indicator
18+
- Cells flex naturally when container is resized
19+
- Simplified API - no manual configuration needed
20+
21+
### Added
22+
- **Mobile-responsive view switcher** - View buttons transform into compact dropdown menu at screen widths ≤640px
23+
- Single icon button (⊞) replaces four view buttons to save toolbar space
24+
- Dropdown includes all view options (Month, Week, Day, List) plus Today button
25+
- Today button in dropdown shows active state when calendar displays today's date
26+
- Automatic breakpoint at 640px width
27+
- **List view toolbar controls** - Navigation and Today buttons now visible in list view but appear disabled (grayed out)
28+
- Maintains visual consistency across all views
29+
- Clear indication that navigation doesn't apply to list view
30+
- Applies to both desktop toolbar and mobile dropdown
31+
32+
### Changed
33+
- **Toolbar layout system** - Replaced flexbox with CSS Grid for more stable button positioning
34+
- Three equal columns (left buttons, center title, right buttons)
35+
- Buttons no longer switch positions or overflow at narrow widths
36+
- Date title abbreviates with ellipsis instead of wrapping to new line
37+
- Removed all responsive media queries that caused layout shifts
38+
- **Uniform row heights in month view** - All week rows maintain consistent height in natural sizing mode
39+
- Pre-calculates maximum event slots across entire month
40+
- Empty rows no longer appear shorter than rows with events
41+
- Improved visual consistency and polish
42+
- **Overflow management** - Strategic use of `overflow-x: clip` prevents horizontal scrollbars while maintaining tooltip visibility
43+
- Tooltips can still escape calendar boundaries (via parent `overflow-x: visible`)
44+
- No unwanted scrollbars in month, week, or day views
45+
- **Compact toolbar styling** - Reduced button padding and gaps to maximize space efficiency
46+
- All buttons: 4px vertical × 6px horizontal padding (was 5px × 10px)
47+
- Toolbar gap: 4px (was 8px)
48+
- Font sizes: title 14px, buttons 12px
49+
- Calendar now always uses `height: 100%` to fill parent container
50+
- Month view cells flex to fit available space instead of using fixed min-height
51+
- All views consistently respect container dimensions
52+
- Removed `--cal-cell-min-height` CSS custom property (no longer needed)
53+
54+
### Fixed
55+
- Toolbar buttons no longer disappear or overflow off-screen at narrow widths
56+
- Date title no longer jumps to new line when calendar is resized
57+
- Horizontal scrollbars no longer appear in month/week/day views
58+
- Tooltips display correctly on all edges without being clipped
59+
1260
## [3.0.6] - 2026-02-24
1361

1462
### Added

README.md

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
A lightweight, zero-dependency JavaScript calendar component with internationalization support and framework wrappers for React, Vue, and Angular.
44

55
[![npm version](https://img.shields.io/npm/v/simple-calendar-js)](https://www.npmjs.com/package/simple-calendar-js)
6-
[![license](https://img.shields.io/npm/l/simple-calendar-js)](LICENSE)
6+
[![license](https://img.shields.io/npm/l/simple-calendar-js)](https://unpkg.com/simple-calendar-js/LICENSE)
77

88
## Features
99

@@ -17,7 +17,7 @@ A lightweight, zero-dependency JavaScript calendar component with internationali
1717
- **Responsive Design** - Adapts to any screen size
1818
- **Customizable Styling** - CSS custom properties for easy theming
1919
- **Accessible** - Semantic HTML with proper ARIA attributes
20-
- **Small Bundle Size** - ~42KB minified JS + ~20KB CSS (~15KB total gzipped)
20+
- **Small Bundle Size** - ~45KB minified JS + ~22KB CSS (~16KB total gzipped)
2121

2222
## Installation
2323

@@ -168,7 +168,6 @@ export class CalendarComponent {
168168
| `showTimeInItems` | boolean | `true` | Show time in event items |
169169
| `showGridLines` | boolean | `true` | Show calendar grid lines |
170170
| `showBorder` | boolean | `true` | Show calendar outer border |
171-
| `maxEventsPerCell` | number | `-1` | Maximum events per cell in month view. `-1` = auto-calculate based on cell height (responsive), `0` = unlimited (show all events), `1+` = show exactly that number |
172171
| `showToolbar` | boolean | `true` | Show the toolbar |
173172
| `showTodayButton` | boolean | `true` | Show "Today" button |
174173
| `showNavigation` | boolean | `true` | Show prev/next navigation arrows |
@@ -1125,12 +1124,3 @@ This project is available for personal, educational, and non-commercial use.
11251124
**Commercial use requires a separate license.** See [LICENSE](LICENSE) file for full terms.
11261125

11271126
For commercial licensing inquiries: simplecalendarjs@gmail.com
1128-
1129-
## Links
1130-
1131-
- **Documentation**: [docs.html](docs.html)
1132-
- **Demo**: [index.html](index.html)
1133-
- **Changelog**: [CHANGELOG.md](CHANGELOG.md)
1134-
- **Repository**: [github.com/pclslopes/SimpleCalendarJs](https://github.com/pclslopes/SimpleCalendarJs)
1135-
- **NPM**: [npmjs.com/package/simple-calendar-js](https://www.npmjs.com/package/simple-calendar-js)
1136-
- **Website**: [simplecalendarjs.com](https://www.simplecalendarjs.com)

0 commit comments

Comments
 (0)