Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions packages/devextreme/js/__internal/scheduler/m_scheduler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -519,9 +519,6 @@ class Scheduler extends SchedulerOptionsBaseWidget {
this.updateAppointmentDataSource();
this._updateOption('workSpace', args.fullName, value);
break;
case 'renovateRender':
this._updateOption('workSpace', name, value);
break;
case '_draggingMode':
this._updateOption('workSpace', 'draggingMode', value);
break;
Expand Down Expand Up @@ -1365,9 +1362,6 @@ class Scheduler extends SchedulerOptionsBaseWidget {
onShowAllDayPanel: (value) => this.option('showAllDayPanel', value),
getHeaderHeight: () => utils.DOM.getHeaderHeight(this._header),
onScrollEnd: () => this._appointments.updateResizableArea(),

// TODO: SSR does not work correctly with renovated render
renovateRender: this._isRenovatedRender(isVirtualScrolling),
}, currentViewOptions);

result.notifyScheduler = this._notifyScheduler;
Expand All @@ -1385,10 +1379,6 @@ class Scheduler extends SchedulerOptionsBaseWidget {
return result;
}

_isRenovatedRender(isVirtualScrolling) {
return (this.option('renovateRender') && hasWindow()) || isVirtualScrolling;
}

_waitAsyncTemplate(callback) {
if (this._options.silent('templatesRenderAsynchronously')) {
const timer = setTimeout(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ const DEFAULT_DROP_DOWN_APPOINTMENT_TEMPLATE_NAME = 'dropDownAppointment';

export const DEFAULT_SCHEDULER_INTERNAL_OPTIONS: SchedulerInternalOptions = {
indicatorTime: undefined,
renovateRender: true,
_draggingMode: 'outlook',
_appointmentTooltipOffset: { x: 0, y: 0 },
_appointmentCountPerCell: 2,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ export type NormalizedView = View | AgendaView;

export interface SchedulerInternalOptions {
indicatorTime?: Date;
renovateRender: boolean;
_draggingMode: 'outlook' | 'default';
_appointmentTooltipOffset: { x: number; y: number };
_appointmentCountPerCell: number;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -349,28 +349,19 @@ class SchedulerTimeline extends SchedulerWorkSpace {
}

_renderView() {
let groupCellTemplates;
if (!this.isRenovatedRender()) {
groupCellTemplates = this._renderGroupHeader();
}

this.renderWorkSpace();

if (this.isRenovatedRender()) {
this.virtualScrollingDispatcher.updateDimensions();
}
this.virtualScrollingDispatcher.updateDimensions();

this._shader = new HorizontalShader(this);

this._$sidebarTable.appendTo(this._sidebarScrollable.$content());

if (this.isRenovatedRender() && this._isVerticalGroupedWorkSpace()) {
if (this._isVerticalGroupedWorkSpace()) {
this.renderRGroupPanel();
}

this.updateHeaderEmptyCellWidth();

this._applyCellTemplates(groupCellTemplates);
}

_setHorizontalGroupHeaderCellsHeight() { return noop(); }
Expand Down Expand Up @@ -506,18 +497,6 @@ class SchedulerTimeline extends SchedulerWorkSpace {
);
}

// Old render methods.
// TODO Old render: delete these methods with the old render.

_setCurrentTimeCells(): void {
const timePanelCells = this._getTimePanelCells();
const currentTimeCellIndices = this._getCurrentTimePanelCellIndices();
currentTimeCellIndices.forEach((timePanelCellIndex) => {
timePanelCells.eq(timePanelCellIndex)
.addClass(HEADER_CURRENT_TIME_CELL_CLASS);
});
}

_cleanCurrentTimeCells(): void {
(this.$element() as any)
.find(`.${HEADER_CURRENT_TIME_CELL_CLASS}`)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -816,16 +816,12 @@ class SchedulerWorkSpace extends Widget<WorkspaceOptionsInternal> {
});
}

isRenovatedRender() {
return this.renovatedRenderSupported() && this.option('renovateRender');
}

_isVirtualModeOn() {
return this.option('scrolling.mode') === 'virtual';
}

isVirtualScrolling() {
return this.isRenovatedRender() && this._isVirtualModeOn();
return this._isVirtualModeOn();
}

_initVirtualScrolling() {
Expand Down Expand Up @@ -2282,7 +2278,6 @@ class SchedulerWorkSpace extends Widget<WorkspaceOptionsInternal> {
mode: 'standard',
},
allDayPanelMode: 'all',
renovateRender: true,
height: undefined,
draggingMode: 'outlook',
onScrollEnd: () => {},
Expand Down Expand Up @@ -2330,9 +2325,6 @@ class SchedulerWorkSpace extends Widget<WorkspaceOptionsInternal> {
this._removeAllDayElements();
this._initGrouping();
this.repaint();
} else if (!this.isRenovatedRender()) {
this._updateAllDayVisibility();
this._updateScrollable();
} else {
this.renderWorkSpace();
}
Expand Down Expand Up @@ -2377,7 +2369,6 @@ class SchedulerWorkSpace extends Widget<WorkspaceOptionsInternal> {
break;
case 'selectedCellData':
break;
case 'renovateRender':
case 'scrolling':
this.repaint();
break;
Expand Down Expand Up @@ -2545,11 +2536,7 @@ class SchedulerWorkSpace extends Widget<WorkspaceOptionsInternal> {

this._initAllDayPanelElements();

if (this.isRenovatedRender()) {
this.createRAllDayPanelElements();
} else {
this._createAllDayPanelElements();
}
this.createRAllDayPanelElements();

this._$timePanel = $('<table>').addClass(TIME_PANEL_CLASS).attr('aria-hidden', true);
this._$dateTable = $('<table>').attr('aria-hidden', true);
Expand Down Expand Up @@ -2691,8 +2678,6 @@ class SchedulerWorkSpace extends Widget<WorkspaceOptionsInternal> {
for (let i = 0; i < groupCount; i++) {
this._addTableClass(this._allDayTables[i], ALL_DAY_TABLE_CLASS);
}
} else if (!this.isRenovatedRender()) {
this._addTableClass(this._$allDayTable, ALL_DAY_TABLE_CLASS);
}
}

Expand Down Expand Up @@ -2741,20 +2726,12 @@ class SchedulerWorkSpace extends Widget<WorkspaceOptionsInternal> {
}

_renderView() {
if (this.isRenovatedRender()) {
if (this._isVerticalGroupedWorkSpace()) {
this.renderRGroupPanel();
}
} else {
this._applyCellTemplates(
this._renderGroupHeader(),
);
if (this._isVerticalGroupedWorkSpace()) {
this.renderRGroupPanel();
}

this.renderWorkSpace();
if (this.isRenovatedRender()) {
this.virtualScrollingDispatcher.updateDimensions();
}
this.virtualScrollingDispatcher.updateDimensions();

this._updateGroupTableHeight();
this.updateHeaderEmptyCellWidth();
Expand Down Expand Up @@ -2825,15 +2802,6 @@ class SchedulerWorkSpace extends Widget<WorkspaceOptionsInternal> {
this.cache.clear();
this._cleanTableWidths();
this.cellsSelectionState.clearSelectedAndFocusedCells();
if (!this.isRenovatedRender()) {
this._$thead.empty();
this._$dateTable.empty();
this._$timePanel.empty();
this._$groupTable.empty();

this._$allDayTable?.empty();
this._$sidebarTable?.empty();
}

this._shader?.clean();

Expand Down Expand Up @@ -2942,16 +2910,7 @@ class SchedulerWorkSpace extends Widget<WorkspaceOptionsInternal> {

this.viewDataProvider.update(this.generateRenderOptions(), generateNewData);

if (this.isRenovatedRender()) {
this.renderRWorkSpace(renderComponents);
} else {
// TODO Old render: Delete this old render block after the SSR tests check.
this._renderDateHeader();
this._renderTimePanel();
this._renderGroupAllDayPanel();
this._renderDateTable();
this._renderAllDayPanel();
}
this.renderRWorkSpace(renderComponents);

this._initPositionHelper();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,15 +160,13 @@ class SchedulerWorkSpaceIndicator extends SchedulerWorkSpace {
renderCurrentDateTimeIndication(): void {
this.renderCurrentDateTimeLineAndShader();

if (this.isRenovatedRender()) {
this.renderWorkSpace({
generateNewData: true,
renderComponents: {
header: true,
timePanel: true,
},
});
}
this.renderWorkSpace({
generateNewData: true,
renderComponents: {
header: true,
timePanel: true,
},
});
}

renderCurrentDateTimeLineAndShader(): void {
Expand Down Expand Up @@ -302,22 +300,6 @@ class SchedulerWorkSpaceIndicator extends SchedulerWorkSpace {
const rtlOffset = this._getRtlOffset(this.getCellWidth());

this._renderIndicator(height, rtlOffset, $container, groupCount);

// TODO Old render: delete this code with the old render.
if (!this.isRenovatedRender()) {
this._setCurrentTimeCells();
}
}

// Temporary new render methods.
// TODO Old render: replace base call methods by these after the deleting of the old render.
protected _setCurrentTimeCells(): void {
const timePanelCells = this._getTimePanelCells();
const currentTimeCellIndices = this._getCurrentTimePanelCellIndices();
currentTimeCellIndices.forEach((timePanelCellIndex) => {
timePanelCells.eq(timePanelCellIndex)
.addClass(TIME_PANEL_CURRENT_TIME_CELL_CLASS);
});
}

protected _cleanCurrentTimeCells(): void {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,6 @@ QUnit.testStart(() => {

QUnit.module('View switcher server markup');

QUnit.test('RenovateRender in workspace should be false on server', async function(assert) {
const scheduler = await createWrapper({
renovateRender: true,
});

const workSpace = scheduler.instance.getWorkSpace();

assert.notOk(workSpace.option('renovateRender', false));
});

import '../DevExpress.ui.widgets.scheduler/workSpace.markup-0.tests.js';
import '../DevExpress.ui.widgets.scheduler/workSpace.markup-1.tests.js';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,7 @@ module('Integration: Appointment Day, Week views', {

const cell = scheduler.workSpace.getCell(2, 0).get(0);

const relatedCellData = !scheduler.instance.option('renovateRender')
? dataUtils.data(cell, 'dxCellData').startDate
: scheduler.instance.getWorkSpace().getCellData($(cell)).startDate;
const relatedCellData = scheduler.instance.getWorkSpace().getCellData($(cell)).startDate;

assert.equal(relatedCellData.getTime(), new Date(2015, 1, 9, 1).getTime(), 'Cell start date is OK');
} finally {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -763,32 +763,29 @@ QUnit.module('View with configuration', () => {
assert.roughEqual(scrollable.scrollHeight(), dateTableHeight, 1.01, 'Scroll height > minWorspaceHeight');
});

[true, false].forEach((renovateRender) => {
QUnit.test(`Workspace vertical scroll should be equal to the dataTable height if grouping, view: '${viewName}', view.intervalCount=${intervalCount}, height: ${height}, renovateRender: ${renovateRender}`, async function(assert) {
const scheduler = await createWrapper({
height: height,
views: [{
type: viewName,
name: viewName,
intervalCount: intervalCount
}],
currentView: viewName,
groups: ['any'],
resources: [{
fieldExpr: 'any',
dataSource: [
{ text: 'Group_1', id: 1 },
{ text: 'Group_2', id: 2 },
{ text: 'Group_3', id: 3 }
],
}],
renovateRender,
});

const dateTableHeight = scheduler.workSpace.getDateTableHeight();
const scrollable = scheduler.workSpace.getScrollable();
assert.roughEqual(scrollable.scrollHeight(), dateTableHeight, 1.01, 'Scroll height > minWorspaceHeight');
QUnit.test(`Workspace vertical scroll should be equal to the dataTable height if grouping, view: '${viewName}', view.intervalCount=${intervalCount}, height: ${height}`, async function(assert) {
const scheduler = await createWrapper({
height: height,
views: [{
type: viewName,
name: viewName,
intervalCount: intervalCount
}],
currentView: viewName,
groups: ['any'],
resources: [{
fieldExpr: 'any',
dataSource: [
{ text: 'Group_1', id: 1 },
{ text: 'Group_2', id: 2 },
{ text: 'Group_3', id: 3 }
],
}],
});

const dateTableHeight = scheduler.workSpace.getDateTableHeight();
const scrollable = scheduler.workSpace.getScrollable();
assert.roughEqual(scrollable.scrollHeight(), dateTableHeight, 1.01, 'Scroll height > minWorspaceHeight');
});
});
});
Expand Down
Loading
Loading