diff --git a/docs/releases/unreleased.md b/docs/releases/unreleased.md index 39aae7c4..4a52cf35 100644 --- a/docs/releases/unreleased.md +++ b/docs/releases/unreleased.md @@ -38,6 +38,7 @@ When a change has user-facing documentation, include a canonical tasknotes.dev l ## Fixed +- (#1985) Fixed embedded Calendar and Agenda time-grid views drifting out of alignment inside callouts and Reading mode. Thanks to @matesvecenik for reporting and sharing screenshots. - (#1980) Added mobile bottom spacing to Agenda Calendar views so the last visible tasks can scroll above Obsidian's bottom navigation bar. Thanks to @Jomo94 for reporting and sharing the screenshot. - (#1984) Fixed mobile task link overlays hiding configured inline task card properties such as scheduled date, due date, contexts, and projects. Thanks to @stil-sudo for reporting. - (#1979) Kept the left-positioned subtask chevron from overlapping the task status control on mobile task cards. Thanks to @Jomo94 for reporting and sharing the screenshot. diff --git a/styles/advanced-calendar-view.css b/styles/advanced-calendar-view.css index 9a7c06c7..efc5ad3a 100644 --- a/styles/advanced-calendar-view.css +++ b/styles/advanced-calendar-view.css @@ -747,6 +747,14 @@ body.is-mobile .timeblock-attachment-remove { width: 100%; } +.advanced-calendar-view .fc-timegrid-cols table { + margin: 0; +} + +.advanced-calendar-view .fc-timegrid-cols .fc-timegrid-col { + padding: 0; +} + /* Remove outer borders only */ .advanced-calendar-view .fc-theme-standard .fc-scrollgrid { border: none; diff --git a/tests/unit/issues/issue-1985-embedded-calendar-timegrid-alignment.test.ts b/tests/unit/issues/issue-1985-embedded-calendar-timegrid-alignment.test.ts new file mode 100644 index 00000000..346ba9ee --- /dev/null +++ b/tests/unit/issues/issue-1985-embedded-calendar-timegrid-alignment.test.ts @@ -0,0 +1,21 @@ +import fs from "fs"; +import path from "path"; + +const repoRoot = path.resolve(__dirname, "../../.."); + +function readRepoFile(relativePath: string): string { + return fs.readFileSync(path.join(repoRoot, relativePath), "utf8"); +} + +describe("Issue #1985: embedded Calendar time-grid alignment", () => { + it("prevents markdown table spacing from shifting FullCalendar timed events", () => { + const css = readRepoFile("styles/advanced-calendar-view.css"); + + expect(css).toMatch( + /\.advanced-calendar-view \.fc-timegrid-cols table\s*\{[^}]*margin:\s*0;[^}]*\}/s + ); + expect(css).toMatch( + /\.advanced-calendar-view \.fc-timegrid-cols \.fc-timegrid-col\s*\{[^}]*padding:\s*0;[^}]*\}/s + ); + }); +});