Richardsl / heatmap-calendar-obsidian

An Obsidian plugin for displaying data in a calendar similar to the github activity calendar
Apache License 2.0
645 stars 103 forks source link

Dark mode stopped working for empty cells #64

Closed PeterBeckley closed 1 year ago

PeterBeckley commented 1 year ago

Class "isEmpty" isn't getting added to the <li>s, so those cells have the same color regardless of light or dark mode. Text elements properly switch between modes, just not the empty cells. EDIT: no class names are getting pushed. "today" is missing as well.

Richardsl commented 1 year ago

Hi, did this start to happen with yesterdays release?

PeterBeckley commented 1 year ago

Yes, sorry for not adding that.

bakharew commented 1 year ago

Same problem, just installed the plugin

afterglowu commented 1 year ago

In commit 649a7fd638937bace97dbd16196f1355b707fee8, file main.ts, the code

const box: Box = {
    classNames: [],
}

was replaced with

const box: Box = {}

So the following operations won't push the classes (today, hasData and isEmpty) into box.classNames as we expected, thus cause this issue and #63.

// main.ts
box.classNames?.push("today")
box.classNames?.push("hasData")
box.classNames?.push("isEmpty")