Scheduler — Replace underscore-prefixed: Remaining workspaces (strategies, view_model, cells)#32985
Conversation
7881bcc to
3dcb0cd
Compare
There was a problem hiding this comment.
Pull request overview
This PR continues the Scheduler internal refactor to eliminate underscore-prefixed members across workspace strategies, view model providers/generators, and cell selection state, aligning internal APIs with standard naming and encapsulation.
Changes:
- Replaced underscore-prefixed fields/methods with non-underscored equivalents and tightened visibility (private/protected) across scheduler workspaces and view model classes.
- Updated scheduler cell selection tests to use the new member names.
- Refactored several helper methods into
privatemethods and updated call sites accordingly.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/cells_selection_state.tests.js | Updates tests to use non-underscored state fields. |
| packages/devextreme/js/__internal/scheduler/workspaces/view_model/m_view_data_provider.ts | Renames internal provider members and helper; updates grouped map provider wiring. |
| packages/devextreme/js/__internal/scheduler/workspaces/view_model/m_view_data_generator_month.ts | Renames month generator visibility date fields. |
| packages/devextreme/js/__internal/scheduler/workspaces/view_model/m_view_data_generator.ts | Renames internal/protected generator helpers and updates internal usage. |
| packages/devextreme/js/__internal/scheduler/workspaces/view_model/m_time_panel_data_generator.ts | Renames generator dependency field and makes map reducer helper private. |
| packages/devextreme/js/__internal/scheduler/workspaces/view_model/m_grouped_data_map_provider.ts | Renames view options storage and makes index check helper private. |
| packages/devextreme/js/__internal/scheduler/workspaces/view_model/m_date_header_data_generator.ts | Renames generator dependency field and makes row-building helpers private. |
| packages/devextreme/js/__internal/scheduler/workspaces/m_work_space_grouped_strategy_vertical.ts | Renames internal fields/helpers for vertical grouping strategy (introduces an initialization issue). |
| packages/devextreme/js/__internal/scheduler/workspaces/m_work_space_grouped_strategy_horizontal.ts | Renames internal helpers for horizontal grouping strategy and makes them private. |
| packages/devextreme/js/__internal/scheduler/workspaces/m_virtual_scrolling.ts | Renames internal virtual scrolling fields/helpers and tightens visibility. |
| packages/devextreme/js/__internal/scheduler/workspaces/m_cells_selection_state.ts | Renames selection state fields and adjusts methods accordingly. |
| packages/devextreme/js/__internal/scheduler/workspaces/m_cells_selection_controller.ts | Renames controller helper methods and makes them private. |
| isVerticalGrouping: this._options.isVerticalGrouping, | ||
| viewType: this._options.viewType, | ||
| isVerticalGrouping: this.options.isVerticalGrouping, | ||
| viewType: this.options.viewType, |
There was a problem hiding this comment.
createGroupedDataMapProvider passes viewOptions without viewOffset, but GroupedDataMapProvider.findCellPositionInMap always reads viewOffset to adjust dates when isAppointmentRender is true. If this factory method is used, date offsets can become NaN and cell lookup will break. Include viewOffset: this.options.viewOffset in the viewOptions object to match the update() path.
| viewType: this.options.viewType, | |
| viewType: this.options.viewType, | |
| viewOffset: this.options.viewOffset, |
| getShaderOffset(i, width) { | ||
| const offset = this._workSpace.option('crossScrollingEnabled') ? 0 : this._workSpace.getGroupTableWidth(); | ||
| return this._workSpace.option('rtlEnabled') ? getBoundingRect(this._$container.get(0)).width - offset - this._workSpace.getWorkSpaceLeftOffset() - width : offset; | ||
| return this._workSpace.option('rtlEnabled') ? getBoundingRect(this.$container.get(0)).width - offset - this._workSpace.getWorkSpaceLeftOffset() - width : offset; | ||
| } |
There was a problem hiding this comment.
getShaderOffset uses this.$container, but $container is declared and never initialized anywhere in this class. This will throw at runtime (Cannot read properties of undefined (reading 'get')) when the shader offset is calculated. Initialize $container (e.g., in the constructor from the workspace’s date table scrollable content) or avoid storing it and reference the workspace container directly.
No description provided.