Skip to content

Conversation

@Tucchhaa
Copy link
Contributor

No description provided.

@Tucchhaa Tucchhaa self-assigned this Jan 12, 2026
@Tucchhaa Tucchhaa marked this pull request as ready for review January 14, 2026 06:41
@Tucchhaa Tucchhaa requested a review from a team as a code owner January 14, 2026 06:41
Copilot AI review requested due to automatic review settings January 14, 2026 06:41
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes a bug where the Scheduler's scrollTo method does not properly account for the viewOffset option. The fix modifies the scroll coordinate calculation logic to find the closest cell when the exact date is not found, and updates the scroll date validation to consider the view offset.

Changes:

  • Added findClosest parameter to findGlobalCellPosition to find the closest cell when exact date match is not found
  • Updated _isValidScrollDate to consider viewOffset when validating scroll dates
  • Simplified _getScrollCoordinates by removing hours/minutes parameters and using the closest cell's data
  • Added comprehensive test coverage for different offset scenarios (positive, negative, zero)

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
packages/testcafe-models/scheduler/index.ts Added getCellDataAtViewportCenter() helper method for tests and refactored scrollTo() method
packages/devextreme/js/__internal/scheduler/workspaces/view_model/m_view_data_provider.ts Added findClosest parameter to find closest cell, extracted getCellPosition helper, refactored date comparison logic
packages/devextreme/js/__internal/scheduler/workspaces/m_work_space.ts Simplified _getScrollCoordinates signature, added viewOffset consideration in _isValidScrollDate()
e2e/testcafe-devextreme/tests/scheduler/common/scrollTo.ts Added comprehensive test cases for scrollTo with different offset values

@Tucchhaa Tucchhaa merged commit 158ab75 into DevExpress:26_1 Jan 16, 2026
94 checks passed
@Tucchhaa Tucchhaa deleted the scrollTo_viewoffset_26_1 branch January 16, 2026 08:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants