fix(frontend): Correct time display and dragging behavior in Gantt view #2305
No reviewers
Labels
No Label
dependencies
duplicate
help wanted
invalid
kind/bug
kind/feature
needs reproduction
question
security
wontfix
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: vikunja/vikunja#2305
Loading…
Reference in New Issue
No description provided.
Delete Branch "wake/vikunja:main"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
This Pull Request addresses an issue in the Gantt view where task bars incorrectly displayed only the date with a forced time of 00:00. This misrepresented the actual duration and position of tasks, leading to potential misunderstandings.
Problem
In the current system, a task scheduled from
4/23 12:00
to4/28 12:00
would only display from4/23 00:00
to4/28 00:00
in the Gantt view. Visually, this made the task bar appear as if it only extended to4/27
, not accurately reflecting the true end time.Changes Made
Time Display: Updated the system to display the exact start and end times on the task bars within the Gantt view, ensuring that both date and time are correctly reflected.
Drag Behavior: Enhanced the functionality to ensure that when a task bar is dragged to update times, the new start and end times are correctly processed and displayed. This change ensures that the visual representation in the Gantt chart aligns with the actual schedule of the task.
Impact
These improvements will correct the cognitive errors previously experienced due to incorrect time truncation. Users will now see a precise representation of task schedules, and the drag-and-update functionality will behave as expected, enhancing the usability and accuracy of planning tools in the Gantt view.
Additional Notes
Closes #1997
WIP: fix(frontend): Correct time display and dragging behavior in Gantt viewto fix(frontend): Correct time display and dragging behavior in Gantt viewIt appears that the build failed due to issues already present in the main branch. Could you please confirm if this is the case? Any suggestions on how we might address this, or steps I should take next would be greatly appreciated. Thank you! 🙏
There are two errors which you seem to have introduced:
The warnings do not fail the build, errors do. The
main
branch does not have any errors.@ -13,2 +13,2 @@
:chart-start="isoToKebabDate(filters.dateFrom)"
:chart-end="isoToKebabDate(filters.dateTo)"
:chart-start="isoToKebabDatetime(dateFromDate.toISOString())"
:chart-end="isoToKebabDatetime(dateToDate.toISOString())"
Why not continue to use the dates from filters?
@ -84,3 +86,3 @@
}>()
const DAYJS_ISO_DATE_FORMAT = 'YYYY-MM-DD'
const DAYJS_ISO_DATE_FORMAT = 'YYYY-MM-DD HH:mm'
Can you rename the const to make it clear that it does not only contain a date but the time as well?
@ -0,0 +1,19 @@
import type {DateISO} from '@/types/DateISO'
import type {DatetimeKebab} from '@/types/DatetimeKebab'
// ✅ Format a date to YYYY-MM-DD HH:MM
The comment seems wrong here