Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Wrong data being displayed #30

Open
bjornfiles opened this issue Mar 31, 2024 · 10 comments
Open

Bug: Wrong data being displayed #30

bjornfiles opened this issue Mar 31, 2024 · 10 comments

Comments

@bjornfiles
Copy link

First of all, thank you for creating this very elegant plugin (when it works).

It's the lightest, lowest-friction and, IMO most outcome-focused take on habit tracking I've seen to date, in or outside of Obsidian.

However, as of today it's completely failing for me:

This is my Habit Tracker code block in my daily note template:

{
	"path": "system/Habit Tracker 21",
	"lastDisplayedDate": "2024-04-15"
}

But I'm not seeing my recent completed habit boxes and the "current month" displayed ends at 30, when March has 31 days.

Screenshot here:

image

@zincplusplus
Copy link
Owner

Thank you @bjornfiles ❤️

This is super duper weird. I suspect it's a date issue, especially since it skipped the last day of March. Probably that's not March at all.

By any chance could you share a copy of your vault? If not, can you help with this info:

  • what is your timezone?
  • can you get it to work in any other files, path or config?
  • since data is missing, I assume it was working before: can you tell me what happened around the time it broke?

@TheRealPJC
Copy link

I get the same issue, and as you suggest @zoreet, setting the "lastDisplayedDate" caused the wrong month (out by one) to be displayed. For example, when I set "lastDisplayedDate" to be "2024-04-26" (i.e. up to 26 April), the grid show habits completed up to 26 May. An issue with the lovely js Date library?

@zincplusplus
Copy link
Owner

Shit. Let me looks into it

@zincplusplus
Copy link
Owner

I can't figure it out, so I will need your help. I've released a new version that has 2 features to help me debug this issue.

  1. If you hover over the date in the header it will show you a tooltip with the actual date being rendered. That way we can know for sure if the correct date is rendered.

  2. If you add "debug": 1 to your config it should show some additional data below the table. Right now it's very basic, but for this problem I'm only interested in lastDisplayedDate

Can you pls give this a try and report back? @TheRealPJC @bjornfiles

@TheRealPJC
Copy link

OK, I tried the debug version, and I cannot reproduce the problem. The mouse-over dates, debug JSON and displayed habits data all behave exactly as expected. I'm not sure what is going on...

@pinetreemoonlight
Copy link

The date displayed is also wrong for me, right now it starts at 29 May 2024 and I cannot change it even when I include lastDisplayDate

@pinetreemoonlight
Copy link

pinetreemoonlight commented Jun 18, 2024

I can't figure it out, so I will need your help. I've released a new version that has 2 features to help me debug this issue.

  1. If you hover over the date in the header it will show you a tooltip with the actual date being rendered. That way we can know for sure if the correct date is rendered.
  2. If you add "debug": 1 to your config it should show some additional data below the table. Right now it's very basic, but for this problem I'm only interested in lastDisplayedDate

Can you pls give this a try and report back? @TheRealPJC @bjornfiles

image

My timezone is gmt+2

@zincplusplus
Copy link
Owner

@pinetreemoonlight I'm confused. Is the value for lastDisplayedDate correct? Because if it is, it looks like the habit tracker 21 is rendering the days between 2024-05-29 and 2024-06-18 which is exactly 21 days.

@ronilaukkarinen
Copy link

It's October and I see March dates. I just installed the plugin, only the default "path": "Habits/ parameter added. What's going on?

@ronilaukkarinen
Copy link

...oh I added the path parameter the md file inside the Habits folder, that's why... it shows a loooong horizontally scrollable list and the March is at the beginning, that's why. When I use it without parameters, it works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants