Update VCP to v3.3.1, split calendar/datepicker components - #42856
Conversation
|
Based on #42836 (comment), we can directly bump to 3.3.1 in this PR. |
|
I bumped Vanilla Calendar Pro to v3.3.1 in 088a346. I checked the release notes and moved the dependency to v3.3.1 instead. There is no separate v3.3.0 GitHub release — npm published it, but v3.3.1 is the next tagged release after v3.2.0. What v3.3.1 changes upstream
None of this changes Vanilla Calendar Pro's public JS API. Bundle sizeThe bundle build inlines Vanilla Calendar Pro, and v3.3.1 bundles the new animation/week/swipe/collapse code into Code fix:
|
|
Edit: Fixed via c771522 by caching the ancestor on first lookup (which happens before VCP writes the attribute), so the observer always watches the real ancestor. Issue found while testing the deployed version. If you load the website in light mode:
Then switch dynamically to dark mode:
The UI is rendered incorrectly. If you perform a hard refresh, everything goes back to normal. The same issue occurs in the opposite direction: if you start in dark mode and dynamically switch to light mode, the UI is also rendered incorrectly until you hard refresh. |
VCP 3.2.0 wraps the months and years in row and cell elements to fix their ARIA grid structure. That change moves the grid columns off the container, so put the column grid on the new row elements. The month and year views otherwise collapse to three rows. Also split the calendar grid out of the datepicker into its own Sass partial and token map. The datepicker now layers the popup surface onto a bare calendar, instead of inline calendars undoing the popup styling. Use the `--calendar-*` tokens to style a calendar and the `--datepicker-*` tokens to style the popup. Add unit tests that pin the month and year markup, because this regression was invisible to the suite. Closes #42836
The calendar now has its own Sass partial and token map, so document it apart from the datepicker. The page covers the inline calendar, the `--calendar-*` tokens, and the color modes. Point at the datepicker for options, methods, and events, because the calendar has no JavaScript of its own.
The bundle build inlines Vanilla Calendar Pro, so the v3.2.0 row and cell markup adds 555 bytes gzipped to `bootstrap.bundle.min.js`. That puts the file at 55.75 kB, above the 55.5 kB budget.
c771522 to
025650e
Compare


vanilla-calendar-proto v3.2.0 inpackage.json, the lockfile, and the CDN URL inconfig.yml_datepicker.scssinto a newscss/_calendar.scsswith its own token map. The datepicker now layers the popup surface onto a bare calendar, instead of inline calendars undoing the popup styling--calendar-*tokens and the popup with the--datepicker-*tokens. The popup passes its padding down through--calendar-paddingdata-vc-inputpopup/inline distinction, because this regression was invisible to the suiteFixes #42836