Calendar preview shows correct files for each dot #2401
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #1798 with a stable dot hover detection system.
The issue was that, if you hovered a day on the calendar preview, you would only be able to see the first file from that day. This allows you to hover over a specific dot to see a specific file from that day. I wrote an initial implementation, then looked and saw lizhuoran1019@3afb3c7, which seemed to be a bit similar to mine, and theirs had some flaw in it which mine also did. The people there suggested using
data-
tags, which I tried, and it now seems to work quite reliably.There is still an issue where, if you move your mouse around on the dots, multiple previews stack up back to back. I have an idea on how to fix this, but I don't know the Obsidian events API enough to be able to close a hover preview. If someone knows that, I would appreciate it, but this should resolve #1798 for now. Each dot now corresponds to an individual note created that day.