feat: split remote calendar events into a separate column#843
Closed
johnyoonh wants to merge 1 commit intoivan-lednev:mainfrom
Closed
feat: split remote calendar events into a separate column#843johnyoonh wants to merge 1 commit intoivan-lednev:mainfrom
johnyoonh wants to merge 1 commit intoivan-lednev:mainfrom
Conversation
Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
Pull request overview
Adds an option to render timed remote calendar events in their own timeline column, keeping horizontal overlap placement independent between local planner tasks and remote calendar events.
Changes:
- Introduces
showRemoteCalendarEventsInSeparateColumnsetting (defaultfalse) and exposes it in the settings UI. - Updates timeline task derivation to split timed tasks into
withTime(planner/local) andremoteCalendarWithTime(remote) before horizontal placing. - Updates timeline/multi-day UI to render an additional column when enabled and adjusts internal column counting.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/settings.ts | Adds the new setting to the settings interface and defaults. |
| src/ui/settings-tab.ts | Adds a toggle to control rendering remote events in a separate column. |
| src/ui/hooks/use-edit/use-edit-context.ts | Splits timed tasks into planner vs remote lists and runs overlap placement independently. |
| src/ui/components/timeline.svelte | Renders the optional remote-events column and adds left/right column classes. |
| src/ui/components/multi-day/multi-day-grid.svelte | Adjusts computed internal column count to account for the optional remote column. |
| src/ui/components/column.svelte | Adds support for passing a class to the Column wrapper. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+133
to
159
| {#if settingsSignal.current.showRemoteCalendarEventsInSeparateColumn} | ||
| <Column | ||
| class="planner-right-column" | ||
| visibleHours={getVisibleHours($settings)} | ||
| > | ||
| {#if $isToday(day)} | ||
| <Needle autoScrollBlocked={isUnderCursor} /> | ||
| {/if} | ||
|
|
||
| <div class="tasks absolute-stretch-x"> | ||
| {#each $displayedTasksForTimeline.remoteCalendarWithTime as task (getRenderKey(task))} | ||
| <PositionedTimeBlock {task}> | ||
| <UnscheduledTimeBlock {task}> | ||
| {#snippet bottomDecoration()} | ||
| {getBlockProps(task, settingsSignal.current)} | ||
| {/snippet} | ||
| </UnscheduledTimeBlock> | ||
| </PositionedTimeBlock> | ||
| {/each} | ||
| </div> | ||
| </Column> | ||
| {/if} | ||
| {/if} | ||
|
|
||
| {#if $settings.timelineColumns.timeTracker} | ||
| <Column visibleHours={getVisibleHours($settings)}> | ||
| <Column class="planner-right-column" visibleHours={getVisibleHours($settings)}> | ||
| {#if $isToday(day)} |
Comment on lines
+192
to
+210
| const uniqueWithTime = uniqBy(t.getRenderKey)( | ||
| tasksForDay.withTime, | ||
| ) as Array<WithTime<Task>>; | ||
| const separateRemoteCalendars = | ||
| $settings.showRemoteCalendarEventsInSeparateColumn; | ||
| const remoteCalendarWithTime = separateRemoteCalendars | ||
| ? addHorizontalPlacing(uniqueWithTime.filter(isRemote)) | ||
| : []; | ||
| const plannerWithTime = separateRemoteCalendars | ||
| ? uniqueWithTime.filter((task) => !isRemote(task)) | ||
| : uniqueWithTime; | ||
| const withTime: Array<WithPlacing<WithTime<Task>>> = | ||
| addHorizontalPlacing(plannerWithTime); | ||
|
|
||
| return { | ||
| ...tasksForDay, | ||
| withTime, | ||
| remoteCalendarWithTime, | ||
| }; |
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
planner-left-columnandplanner-right-columnclasses to timeline columns.Test plan
npm run typescriptcould not complete in this checkout because dependencies are not installed (@tsconfig/svelteand Svelte type definitions missing).Made with Cursor