Skip to content

Scheduler - Appointments Collection Refactoring - Focus State#33230

Draft
Tucchhaa wants to merge 5 commits intoDevExpress:26_1from
Tucchhaa:focus_state_26_1
Draft

Scheduler - Appointments Collection Refactoring - Focus State#33230
Tucchhaa wants to merge 5 commits intoDevExpress:26_1from
Tucchhaa:focus_state_26_1

Conversation

@Tucchhaa
Copy link
Copy Markdown
Contributor

No description provided.

@Tucchhaa Tucchhaa self-assigned this Apr 13, 2026
@Tucchhaa Tucchhaa requested a review from a team as a code owner April 13, 2026 08:50
@Tucchhaa Tucchhaa added the 26_1 label Apr 13, 2026
Copilot AI review requested due to automatic review settings April 13, 2026 08:50
@Tucchhaa Tucchhaa marked this pull request as draft April 13, 2026 08:52
Copy link
Copy Markdown
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

Refactors the new Scheduler appointments rendering pipeline to introduce a shared ViewItem base abstraction and implement focus/keyboard navigation (Tab handling + focus state) for appointment items/collectors, including support hooks for virtual scrolling.

Changes:

  • Introduced ViewItem base component and migrated appointment/collector views to inherit it (focus, tabIndex, keyboard handling).
  • Added AppointmentsFocusController and wiring from SchedulerAppointments to enable focus navigation and virtual scrolling integration (scrollTo, getSortedAppointments, etc.).
  • Extended view-model diffing to preserve previous sortedIndex (oldSortedIndex) to keep stable item identity across reorders.

Reviewed changes

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

Show a summary per file
File Description
packages/devextreme/js/__internal/scheduler/m_scheduler.ts Passes new focus/navigation dependencies (tabIndex, scrolling + sorted items hooks) into new appointments component.
packages/devextreme/js/__internal/scheduler/appointments_new/view_item.ts Adds new base DOMComponent for focusability + keyboard/focus events.
packages/devextreme/js/__internal/scheduler/appointments_new/view_item.test.ts Adds unit tests for focus/tabIndex/keydown behavior shared by view items.
packages/devextreme/js/__internal/scheduler/appointments_new/utils/get_view_model_diff.ts Adds oldSortedIndex to diff items to support stable mapping during reorders/resizes.
packages/devextreme/js/__internal/scheduler/appointments_new/utils/get_view_model_diff.test.ts Updates tests to validate oldSortedIndex behavior in diff output.
packages/devextreme/js/__internal/scheduler/appointments_new/const.ts Adds CSS class constants for focused state and resource-color marker.
packages/devextreme/js/__internal/scheduler/appointments_new/appointments.ts Refactors mapping from “appointment component by sortedIndex” to ViewItem, wires in focus controller, tabIndex updates, and diff rendering updates.
packages/devextreme/js/__internal/scheduler/appointments_new/appointments.test.ts Updates test setup for new required AppointmentsProperties and container usage.
packages/devextreme/js/__internal/scheduler/appointments_new/appointments.focus_controller.ts Implements focus/tab navigation logic (including virtual scrolling scroll+restore hooks).
packages/devextreme/js/__internal/scheduler/appointments_new/appointment/grid_appointment.ts Updates resize signature and adds “has resource color” class when applying resource color.
packages/devextreme/js/__internal/scheduler/appointments_new/appointment/grid_appointment.test.ts Updates mocks import naming to match refactor.
packages/devextreme/js/__internal/scheduler/appointments_new/appointment/base_appointment.ts Migrates BaseAppointmentView to ViewItem, adds focused state class toggling and click→focus behavior.
packages/devextreme/js/__internal/scheduler/appointments_new/appointment/base_appointment.test.ts Refactors test to use shared mock factory helpers.
packages/devextreme/js/__internal/scheduler/appointments_new/appointment/agenda_appointment.ts Updates resize signature and applies “has resource color” class when color is present.
packages/devextreme/js/__internal/scheduler/appointments_new/appointment/agenda_appointment.test.ts Updates mocks import naming to match refactor.
packages/devextreme/js/__internal/scheduler/appointments_new/appointment_collector.ts Migrates collector to ViewItem, adds focus/keyboard handling and click→focus wiring.
packages/devextreme/js/__internal/scheduler/appointments_new/appointment_collector.test.ts Refactors test to use shared collector mock factory.
packages/devextreme/js/__internal/scheduler/appointments_new/mock/appointment_properties.ts Renames/extends base appointment view mock props and adds createBaseAppointment helper.
packages/devextreme/js/__internal/scheduler/appointments_new/mock/appointment_collector.ts Adds reusable collector mock property builder + factory.
packages/devextreme/js/__internal/scheduler/tests/appointments_new.test.ts Adds integration test coverage for default template rendering.
packages/devextreme-scss/scss/widgets/base/scheduler/appointment/regular/_index.scss Disables outline on regular appointment element (relying on focused-state styling).

Comment thread packages/devextreme/js/__internal/scheduler/appointments_new/view_item.test.ts Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants