Scheduler: fix all day appointment resizing in timeline and vertical views - #34702
Scheduler: fix all day appointment resizing in timeline and vertical views#34702aleksei-semikozov wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
Fixes Scheduler appointment resizing behavior by correctly distinguishing “all-day panel” appointments (day-based resizing) from “all-day” appointments rendered in the regular date table (cell-duration resizing), and adjusts vertical resizing handles for split/reduced appointment parts.
Changes:
- Adjusted
getDeltaTimesubscribe wiring to treat only vertical-view all-day-panel appointments as day-resized. - Updated vertical appointment resizing rules to render resize handles only on the appropriate reduced parts (head/body/tail).
- Added Jest coverage for delta-time calculation across view types and for vertical-view resize handle rendering.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| packages/devextreme/js/__internal/scheduler/m_subscribes.ts | Introduces isAllDayPanelAppointment and uses it to compute isAllDayPanel for resizing delta-time. |
| packages/devextreme/js/__internal/scheduler/m_subscribes.test.ts | Adds unit tests validating delta-time behavior for timeline/vertical/month views and all-day-panel visibility. |
| packages/devextreme/js/__internal/scheduler/appointments/appointment/m_appointment.ts | Updates vertical resizing handles to honor reduced appointment parts (only edge parts are resizable). |
| packages/devextreme/js/__internal/scheduler/tests/appointments_resizing_vertical.test.ts | Adds integration tests verifying correct handle rendering for split appointments and hidden all-day panel scenarios. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.
Suppressed comments (2)
packages/devextreme/js/__internal/scheduler/tests/appointments_resizing_vertical.test.ts:27
- This test suite creates real Scheduler instances and appends them to
document.body, but it never disposes the widget or clears the DOM after each test. Other scheduler Jest suites dispose the scheduler and resetdocument.bodyinafterEach, and skipping that cleanup can leak timers/event handlers and make tests order-dependent.
const baseConfig: Properties = {
currentDate: new Date(2021, 3, 12),
views: ['week'],
currentView: 'week',
editing: { allowUpdating: true, allowResizing: true },
height: 600,
};
packages/devextreme/js/__internal/scheduler/appointments/appointment/m_appointment.ts:149
handlesis computed viareducedHandles[this.option('reduced') as any]. Ifreducedis set to an unexpected string, this yieldsundefinedand can break Resizable handle rendering. Alsothis.option('reduced')is read twice and usesas any. Consider narrowing the value and falling back to the default handles when it’s not one of the supported parts.
handles: this.option('reduced') ? reducedHandles[this.option('reduced') as any] : DEFAULT_VERTICAL_HANDLES,
No description provided.