Skip to content

View window rendering - #4668

Open
getheobald wants to merge 10 commits into
feature/ganttfrom
feature/gantt-windows-shared-rendering
Open

getheobald wants to merge 10 commits into
feature/ganttfrom
feature/gantt-windows-shared-rendering

Conversation

@getheobald

@getheobald getheobald commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

Changes

  • The chart builds one scale from the selected view: the chart's start and end, its columns, and pixels per day. Every part of the chart uses that scale, so nothing assumes one column is one week anymore.
  • Edits snap to whole weeks in every view, not to the column unit. Work package durations are saved as whole weeks, so snapping to days or months would get silently rounded on save. Letting tasks snap to days in Week view could be a later addition.
  • Retrospective and Project Detail charts default to Half Year. They have no dropdown, and Half Year is closest to their old layout. The main Gantt page still defaults to Month.
  • Columns show the Monday's date for weeks, the day number for days, and short month names for months. Groups show "Mar 2026", or "2026" in Year view.
  • Year view's "Show tasks" filter checkbox still shows whatever you last chose, even though tasks are hidden there

Screenshots

image Smallest possible window in chrome on mac image Year view image Half year view image Month view image Week view

To Do

More extensive testing is covered in #4485 - that's where I wanna do all the regression testing with editing flow and all that. But that needs the editing fix from my other PR first.

Checklist

It can be helpful to check the Checks and Files changed tabs.
Please review the contributor guide and reach out to your Tech Lead if anything is unclear.
Please request reviewers and ping on slack only after you've gone through this whole checklist.

  • All commits are tagged with the ticket number
  • No linting errors / newline at end of file warnings
  • All code follows repository-configured prettier formatting
  • No merge conflicts
  • All checks passing
  • Screenshots of UI changes (see Screenshots section)
  • Remove any non-applicable sections of this template
  • Assign the PR to yourself
  • No yarn.lock changes (unless dependencies have changed)
  • Request reviewers & ping on Slack
  • PR is linked to the ticket (fill in the closes line below)

Closes #4666
Closes #4480
Closes #4481
Closes #4482
Closes #4483
Closes #4484

@getheobald getheobald self-assigned this Nov 1, 2026
getheobald and others added 5 commits November 1, 2026 14:49
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-rendering

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tt-windows-shared-rendering

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@getheobald
getheobald marked this pull request as ready for review November 12, 2026 03:28
return {
gridColumnStart: getStartCol(event.date),
gridColumnEnd: getEndCol(addWeeksToDate(event.date, 1)),
...ganttElementPositionStyles(getElementPositionPx(event.date, addWeeksToDate(event.date, 1), scale)),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Events are still hardcoded to one week, make it 1 day and let the minimum width floor handle visibility

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Comment thread src/frontend/src/utils/gantt.utils.tsx Outdated
@@ -225,6 +235,97 @@ export const getElementWidthPx = (start: Date, end: Date, timeWindow: GanttTimeW

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The minimum width is set in days, so the floor ranges from about 21px (Month) to 93px (Week). Use a pixel floor instead: Math.max(days * pixelsPerDay, GANTT_MIN_ELEMENT_PX)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

searchText,
history
history,
timeWindow

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With timeWindow in the effect's dependencies, every view switch rebuilds all collections, even Week ↔ Month. Depend on GANTT_TIME_WINDOWS[timeWindow].showTasks instead

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

if (projects && teams) {
requestRefresh(projects, teams, editedProjects, addedProjects, { ...filters, showCars }, searchText);
// some windows (Year) never show tasks, regardless of the filter
const hideTasks = (filters.hideTasks ?? false) || !GANTT_TIME_WINDOWS[timeWindow].showTasks;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Year view hides tasks, but the "show tasks" filter checkbox still shows as checked

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done


setWidth(newWidth); // sync render
setCorrectWidth(getCorrectWidth(newWidth));
const days = getDistanceFromLeft(e.clientX) / scale.pixelsPerDay;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: rename the local days to daysFromStart

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

const onDrop = (day: Date) => {
const days = ceilToMultipleOf7(differenceInDays(day, task.start));
const onDrop = (weekStart: Date) => {
const days = ceilToSnap(differenceInDays(weekStart, task.start));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: rename the local days to daysFromStart

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@coderabbitai

coderabbitai Bot commented Dec 3, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Central YAML; Path: .coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 518f276d-7fbe-4435-9812-e4078de4e963

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

This branch has not been deployed

No deployments
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

Successfully merging this pull request may close these issues.

2 participants