Conversation
There was a problem hiding this comment.
Pull request overview
This PR removes the "m_" prefix from several DateBox-related files as part of a naming convention cleanup effort. The refactoring includes renaming the main DateBox implementation files, utility files, and updating all corresponding import statements. Additionally, the PR includes some code quality improvements such as modernizing code with optional chaining operators and removing obsolete ESLint disable comments.
Changes:
- Renamed core DateBox files from
m_date_box.*todate_box.*(base, mask, mask.parts) - Renamed utility files:
m_date_utils→date_utils,m_date_view_roller→date_view_roller - Updated all import paths across strategy files and related modules to reference the renamed files
- Improved code quality by replacing
&&checks with optional chaining (?.) operators - Removed unnecessary
/* eslint-disable class-methods-use-this */comments
Reviewed changes
Copilot reviewed 11 out of 13 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| packages/devextreme/js/ui/date_box.js | Updated import path from m_date_box to date_box |
| packages/devextreme/js/__internal/ui/date_box/time_view.ts | Updated import path for date_utils |
| packages/devextreme/js/__internal/ui/date_box/m_date_box.strategy.native.ts | Updated import path for date_utils |
| packages/devextreme/js/__internal/ui/date_box/m_date_box.strategy.list.ts | Updated import path for date_utils |
| packages/devextreme/js/__internal/ui/date_box/m_date_box.strategy.date_view.ts | Updated import paths for date_utils and date_view |
| packages/devextreme/js/__internal/ui/date_box/m_date_box.strategy.calendar_with_time.ts | Updated import paths for date_box.base and date_utils |
| packages/devextreme/js/__internal/ui/date_box/date_view_roller.ts | Renamed file, removed ESLint disable comment |
| packages/devextreme/js/__internal/ui/date_box/date_view.ts | Renamed file, updated imports for date_utils and date_view_roller |
| packages/devextreme/js/__internal/ui/date_box/date_utils.ts | Renamed file with complete date utility functions implementation |
| packages/devextreme/js/__internal/ui/date_box/date_box.ts | Renamed file, updated import for date_box.mask |
| packages/devextreme/js/__internal/ui/date_box/date_box.mask.ts | Renamed file, improved code with optional chaining, removed ESLint disable comment, updated imports |
| packages/devextreme/js/__internal/ui/date_box/date_box.mask.parts.ts | Renamed file with mask part rendering and parsing logic |
| packages/devextreme/js/__internal/ui/date_box/date_box.base.ts | Renamed file, improved code with optional chaining, removed ESLint disable comment, updated imports |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 16 out of 18 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (1)
packages/devextreme/js/__internal/ui/date_box/date_view_roller.ts:1
- The file has been renamed from
m_date_view_roller.tstodate_view_roller.ts, but there is a remaining import reference inpackages/devextreme/testing/tests/DevExpress.ui.widgets.editors/dateView.tests.jsline 9 that still uses the old path'__internal/ui/date_box/m_date_view_roller'. This import should be updated to'__internal/ui/date_box/date_view_roller'to match the new file name.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 17 out of 19 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (1)
packages/devextreme/js/__internal/ui/date_box/date_box.base.ts:33
- These imports still reference files with the "m_" prefix (m_date_box.strategy.*), which is inconsistent with the PR's goal of removing the "m_" prefix. The following strategy files should be renamed and these import paths should be updated:
- m_date_box.strategy.ts → date_box.strategy.ts
- m_date_box.strategy.calendar.ts → date_box.strategy.calendar.ts
- m_date_box.strategy.calendar_with_time.ts → date_box.strategy.calendar_with_time.ts
- m_date_box.strategy.date_view.ts → date_box.strategy.date_view.ts
- m_date_box.strategy.list.ts → date_box.strategy.list.ts
- m_date_box.strategy.native.ts → date_box.strategy.native.ts
Additionally, packages/devextreme/js/__internal/ui/date_range_box/strategy/m_rangeCalendar.ts line 7 also imports m_date_box.strategy.calendar and will need to be updated.
No description provided.