Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
6a7fb5d
css: fix paddings
sjbur Mar 11, 2026
7cbc547
css: fix icon height and padding
sjbur Mar 11, 2026
81d046f
css: small refactor
sjbur Mar 11, 2026
a878728
feat: update screenshots
sjbur Mar 11, 2026
abcfc78
test: add test for static label mode
sjbur Mar 11, 2026
819e011
feat: update screenshots
sjbur Mar 11, 2026
c327505
fix: try not to create icons if they not needed
sjbur Mar 11, 2026
899a57a
Merge branch '26_1' into issue-3609_26_1
sjbur Mar 11, 2026
fd28978
feat: update screenshots
sjbur Mar 11, 2026
6a7e7f4
feat: update screenshots
sjbur Mar 11, 2026
8d39503
feat: try to hide icons using visible and colSpan
sjbur Mar 12, 2026
0bc2283
feat: update masks
sjbur Mar 13, 2026
37f2254
feat: update masks
sjbur Mar 13, 2026
fad4c02
fix: revert changes in jquery.html
sjbur Mar 16, 2026
e175347
refactor: undo naming
sjbur Mar 16, 2026
fb1e061
fix: revert changes in jquery.html
sjbur Mar 16, 2026
ca225a8
feat: update masks
sjbur Mar 16, 2026
be7b7eb
feat: update masks
sjbur Mar 16, 2026
0b3d93e
Merge branch '26_1' into issue-3609_26_1
sjbur Mar 17, 2026
85c6b28
feat: update masks
sjbur Mar 17, 2026
6fb0d16
css: update styles
sjbur Mar 18, 2026
2b689ff
css: update styles
sjbur Mar 18, 2026
3202178
feat: try to remove screenshot
sjbur Mar 18, 2026
c605cd8
Merge branch '26_1' into issue-3609_26_1
sjbur Mar 18, 2026
6cc7304
feat: update screenshot
sjbur Mar 18, 2026
73e220b
feat: add changes to showicon logic
sjbur Mar 18, 2026
3d63876
feat: update screenshot
sjbur Mar 18, 2026
9e6d517
feat: add test for main form without icons
sjbur Mar 18, 2026
31cf255
feat: add test for main form without icons
sjbur Mar 18, 2026
ee87797
feat: update screenshot
sjbur Mar 18, 2026
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import Scheduler from 'devextreme-testcafe-models/scheduler';
import { createScreenshotsComparer } from 'devextreme-screenshot-comparer';
import { createWidget } from '../../../../helpers/createWidget';
import url from '../../../../helpers/getPageUrl';
import { Themes } from '../../../../helpers/themes';
import { testScreenshot } from '../../../../helpers/themeUtils';

fixture.disablePageReloads`Appointment Form: Main Form`
Expand Down Expand Up @@ -226,6 +227,35 @@ test.meta({ browserSize: [450, 1000] })('main form on mobile screen', async (t)
},
}));

test.meta({ browserSize: [1500, 1500] })('main form without icons', async (t) => {
const { takeScreenshot, compareResults } = createScreenshotsComparer(t);

const scheduler = new Scheduler(SCHEDULER_SELECTOR);
const appointmentPopup = await scheduler.openAppointmentPopup(t, undefined, false);

await testScreenshot(
t,
takeScreenshot,
'scheduler__appointment__main-form__icons-mode-none.png',
{ element: appointmentPopup.contentElement },
);

await t
.expect(compareResults.isValid())
.ok(compareResults.errorMessages());
}).before(async () => createWidget('dxScheduler', {
dataSource: [],
views: ['week'],
currentView: 'week',
currentDate: new Date(2021, 2, 25),
resources: getResources(true),
editing: {
form: {
iconsShowMode: 'none',
},
},
}));

test.meta({ browserSize: [1500, 1500] })('appointment form resource with multiple selection', async (t) => {
const { takeScreenshot, compareResults } = createScreenshotsComparer(t);

Expand Down Expand Up @@ -338,7 +368,10 @@ test.meta({ browserSize: [1500, 1500] })('Recurrence settings button should have
});
});

test.meta({ browserSize: [1500, 1500] })('appointment form with labelMode=static', async (t) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

pls add a test for a case when main group doesn't have icons. Since we made icons invisible when they are disabled, some paddings will not appear, so the main group visual is changed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK. Will write them soon

test.meta({
browserSize: [1500, 1500],
themes: [Themes.genericLight, Themes.materialBlue, Themes.fluentBlue],
})('appointment form with labelMode=static', async (t) => {
const { takeScreenshot, compareResults } = createScreenshotsComparer(t);

const scheduler = new Scheduler(SCHEDULER_SELECTOR);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -503,6 +503,10 @@ $scheduler-appointment-form-label-padding: 20px;
}
}

.dx-scheduler-form-recurrence-group.dx-field-item {
padding: 0;
}

/* Icons alignment */
.dx-scheduler-form-group-with-icon .dx-item-content > .dx-box-item:has(.dx-scheduler-form-icon) {
flex: 0 1 auto !important; // stylelint-disable-line declaration-no-important
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ $generic-scheduler-group-header-agenda-font-size: 14px !default;
$generic-scheduler-appointment-popup-icon-container-height: 36px !default;
$generic-scheduler-appointment-popup-icon-padding-right: 5px !default;
$generic-scheduler-appointment-popup-icon-margin-top: 22px !default;
$generic-scheduler-appointment-popup-icon-inner-label-margin-top: null !default;
$generic-scheduler-appointment-popup-icon-inner-label-margin-top: 7px !default;
$generic-scheduler-appointment-popup-item-padding-horizontal: 5px !default;
$generic-scheduler-appointment-popup-item-padding-top: 20px !default;
$generic-scheduler-appointment-popup-all-day-item-height: 36px !default;
Expand Down Expand Up @@ -169,7 +169,7 @@ $generic-scheduler-group-header-agenda-font-size: 14px !default;
$generic-scheduler-appointment-popup-icon-container-height: 26px !default;
$generic-scheduler-appointment-popup-icon-padding-right: 5px !default;
$generic-scheduler-appointment-popup-icon-margin-top: 18px !default;
$generic-scheduler-appointment-popup-icon-inner-label-margin-top: 4.5px !default;
$generic-scheduler-appointment-popup-icon-inner-label-margin-top: 6px !default;
$generic-scheduler-appointment-popup-item-padding-horizontal: 5px !default;
$generic-scheduler-appointment-popup-item-padding-top: 10px !default;
$generic-scheduler-appointment-popup-all-day-item-height: 24px !default;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1722,21 +1722,8 @@ describe('Appointment Form', () => {
const mainFormIcons = POM.popup.mainGroup.querySelectorAll(`.${CLASSES.icon}`);
const recurrenceFormIcons = POM.popup.recurrenceGroup.querySelectorAll(`.${CLASSES.icon}`);

expect(mainFormIcons.length).toBe(4);
expect(recurrenceFormIcons.length).toBe(3);

const mainIconsCorrect = Array.from(mainFormIcons).every((icon) => {
const isVisible = !icon.classList.contains(CLASSES.hidden);
return isVisible === visibleMain;
});

const recurrenceIconsCorrect = Array.from(recurrenceFormIcons).every((icon) => {
const isVisible = !icon.classList.contains(CLASSES.hidden);
return isVisible === visibleRecurrence;
});

expect(mainIconsCorrect).toBe(true);
expect(recurrenceIconsCorrect).toBe(true);
expect(mainFormIcons.length).toBe(visibleMain ? 4 : 0);
expect(recurrenceFormIcons.length).toBe(visibleRecurrence ? 3 : 0);
});
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,17 +219,18 @@ export class AppointmentForm {
create(popup: any): void {
this._popup = popup;

const iconsShowMode = this.getIconsShowMode();
const showMainGroupIcons = ['main', 'both'].includes(iconsShowMode);
const showRecurrenceGroupIcons = ['recurrence', 'both'].includes(iconsShowMode);

const mainGroup = this.createMainFormGroup();

this._recurrenceForm = new RecurrenceForm(this.scheduler);
const recurrenceGroup = this._recurrenceForm.createRecurrenceFormGroup();
const recurrenceGroup = this._recurrenceForm
.createRecurrenceFormGroup();

const items = [mainGroup, recurrenceGroup];

const iconsShowMode = this.getIconsShowMode();
const showMainGroupIcons = ['main', 'both'].includes(iconsShowMode);
const showRecurrenceGroupIcons = ['recurrence', 'both'].includes(iconsShowMode);
Comment on lines -229 to -231
Copy link
Contributor

@Tucchhaa Tucchhaa Mar 17, 2026

Choose a reason for hiding this comment

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

I understand your solution: propagate showIcon parameter through each function and duplicate logic of selecting colSpan:
colSpan: showIcon ? 1 : 2

While this works, the problem is that the logic is duplicated and we can easily forget to update some item's colSpan.

Here's the alternative approach by using setStylingModeToEditors:

  private setStylingModeToEditors(item: FormItem, showIcon: boolean): void {
    const itemClasses = (item.cssClass ?? '').split(' ');
    const isIconItem = itemClasses.includes(CLASSES.formIcon);

    if (isIconItem) {
      return;
    }

    if (item.itemType === 'simple') {
      // ...
      return;
    }

    if (item.itemType === 'group') {
      const groupItem = item as GroupItem;
      const colCount = showIcon ? 2 : 1;
      groupItem.colCount = colCount;
      groupItem.colCountByScreen = { xs: colCount };
      groupItem.items?.forEach((child) => {
        this.setStylingModeToEditors(child, showIcon);
      });
    }
  }

This way we can remove:

  • showIcon parameter propagation
  • duplication of showIcon ? 1 : 2 logic
  • groupItems' colCount duplicated option

What do you think?

P.S. the codesnippet is for ref only, I haven't tested it

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated the solution based on your suggestion


this.setStylingModeToEditors(mainGroup, showMainGroupIcons);
this.setStylingModeToEditors(recurrenceGroup, showRecurrenceGroupIcons);

Expand Down Expand Up @@ -348,9 +349,7 @@ export class AppointmentForm {
itemType: 'group',
cssClass: `${CLASSES.subjectGroup} ${CLASSES.groupWithIcon}`,
colCount: 2,
colCountByScreen: {
xs: 2,
},
colCountByScreen: { xs: 2 },
items: [
{
name: SUBJECT_ICON_NAME,
Expand Down Expand Up @@ -379,9 +378,7 @@ export class AppointmentForm {
itemType: 'group',
cssClass: `${CLASSES.dateRangeGroup} ${CLASSES.groupWithIcon}`,
colCount: 2,
colCountByScreen: {
xs: 2,
},
colCountByScreen: { xs: 2 },
items: [
{
name: DATE_ICON_NAME,
Expand Down Expand Up @@ -660,9 +657,7 @@ export class AppointmentForm {
name: REPEAT_GROUP_NAME,
itemType: 'group',
colCount: 2,
colCountByScreen: {
xs: 2,
},
colCountByScreen: { xs: 2 },
cssClass: `${CLASSES.repeatGroup} ${CLASSES.groupWithIcon}`,
items: [
{
Expand Down Expand Up @@ -716,9 +711,7 @@ export class AppointmentForm {
name: DESCRIPTION_GROUP_NAME,
itemType: 'group',
colCount: 2,
colCountByScreen: {
xs: 2,
},
colCountByScreen: { xs: 2 },
cssClass: `${CLASSES.descriptionGroup} ${CLASSES.groupWithIcon}`,
items: [
{
Expand Down Expand Up @@ -778,9 +771,7 @@ export class AppointmentForm {
itemType: 'group',
visible: resourcesItems.length > 0,
colCount: 2,
colCountByScreen: {
xs: 2,
},
colCountByScreen: { xs: 2 },
cssClass: `${CLASSES.resourcesGroup} ${CLASSES.groupWithIcon}`,
items: [
{
Expand All @@ -807,9 +798,7 @@ export class AppointmentForm {
itemType: 'group',
name: `${dataField}Group`,
colCount: 2,
colCountByScreen: {
xs: 2,
},
colCountByScreen: { xs: 2 },
cssClass: CLASSES.groupWithIcon,
items: [
{
Expand All @@ -818,7 +807,7 @@ export class AppointmentForm {
cssClass: CLASSES.formIcon,
template: createFormIconTemplate(icon),
},
item,
{ ...item },
],
} as GroupItem;
});
Expand All @@ -840,12 +829,6 @@ export class AppointmentForm {
const isIconItem = itemClasses.includes(CLASSES.formIcon);

if (isIconItem) {
const isHidden = itemClasses.includes(CLASSES.hidden);

if (!showIcon && !isHidden) {
item.cssClass += ` ${CLASSES.hidden}`;
}

return;
}

Expand All @@ -862,6 +845,19 @@ export class AppointmentForm {

if (item.itemType === 'group') {
const groupItem = item as GroupItem;

if (itemClasses.includes(CLASSES.groupWithIcon)) {
groupItem.items?.forEach((child) => {
const childClasses = (child.cssClass ?? '').split(' ');

if (childClasses.includes(CLASSES.formIcon)) {
(child as SimpleItem).visible = showIcon;
} else {
(child as SimpleItem).colSpan = showIcon ? 1 : 2;
}
});
}

groupItem.items?.forEach((child) => {
this.setStylingModeToEditors(child, showIcon);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,9 +201,7 @@ export class RecurrenceForm {
name: GROUP_NAMES.recurrenceStartDateGroup,
itemType: 'group',
colCount: 2,
colCountByScreen: {
xs: 2,
},
colCountByScreen: { xs: 2 },
cssClass: CLASSES.groupWithIcon,
items: [
{
Expand All @@ -217,6 +215,7 @@ export class RecurrenceForm {
getStartDateCommonConfig(this.scheduler.getFirstDayOfWeek()),
{
name: EDITOR_NAMES.recurrenceStartDateEditor,
colSpan: 1,
cssClass: CLASSES.recurrenceStartDateEditor,
label: {
text: messageLocalization.format('dxScheduler-editorLabelStartDate'),
Expand All @@ -241,9 +240,7 @@ export class RecurrenceForm {
name: GROUP_NAMES.recurrenceRuleGroup,
cssClass: `${CLASSES.recurrenceSettingsGroup} ${CLASSES.groupWithIcon}`,
colCount: 2,
colCountByScreen: {
xs: 2,
},
colCountByScreen: { xs: 2 },
items: [
{
name: ICON_NAMES.recurrenceRuleIcon,
Expand All @@ -256,9 +253,7 @@ export class RecurrenceForm {
name: GROUP_NAMES.recurrencePatternGroup,
colSpan: 1,
colCount: 1,
colCountByScreen: {
xs: 1,
},
colCountByScreen: { xs: 1 },
items: [
this.createRecurrenceRuleGroup(),
this.createDaysOfWeekGroup(),
Expand Down Expand Up @@ -445,9 +440,7 @@ export class RecurrenceForm {
name: GROUP_NAMES.recurrenceEndGroup,
itemType: 'group',
colCount: 2,
colCountByScreen: {
xs: 2,
},
colCountByScreen: { xs: 2 },
cssClass: `${CLASSES.groupWithIcon} ${CLASSES.recurrenceEndGroup}`,
items: [
{
Expand Down
Loading