Skip to content

Releases: aalpercem/MMHeatmap

Release list

1.1.6

Choose a tag to compare

@aalpercem aalpercem released this 15 Feb 22:12

BREAKING: MMHeatmap now enforces system calendar semantics for grid and week-start behavior. MMHeatmapView no longer accepts calendar/locale/timeZone inputs and now uses labelLocale strictly for text formatting (e.g., month labels), reducing locale-related week-start mismatches.

1.1.5

Choose a tag to compare

@aalpercem aalpercem released this 15 Feb 20:53

Summary

  • Improves locale/calendar correctness across heatmap rendering.
  • Fixes weekday/month inconsistencies for non-default locale/calendar setups.
  • Refactors month-grid computation for better testability and reliability.

What changed

  • Added locale-aware API inputs to MMHeatmapView (calendar, locale, timeZone).
  • Reworked month/week grid logic to respect calendar.firstWeekday.
  • Removed hardcoded Sunday-first assumptions from date/grid calculations.
  • Added MMHeatmapStyle.localizedWeekSymbols(...) helper for correct weekday label ordering.
  • Hardened rendering against edge cases:
    • Safe handling for maxValue == 0
    • Safe fallback when week labels are invalid length
    • Reduced force-unwrap risk in date paths
  • Extracted month-grid math into a dedicated utility (MMHeatmapMonthGrid).
  • Split preview/playground code into separate preview file.
  • Expanded test suite for locale/calendar semantics and grid behavior.

Compatibility

  • Backward compatible with existing usage (new parameters are optional).
  • Existing consumers can migrate incrementally by passing locale/calendar inputs when needed.

Migration hint

  • For locale-correct weekday labels, generate week with:
    • MMHeatmapStyle.localizedWeekSymbols(calendar:locale:style:)
  • Use the same calendar for both MMHeatmapData creation and MMHeatmapView.