Skip to content

Scheduler — Fix slide animation overlapping items outside mainGroup#32955

Merged
aleksei-semikozov merged 5 commits intoDevExpress:25_2from
aleksei-semikozov:fix/scheduler-form-animation-overlap
Mar 19, 2026
Merged

Scheduler — Fix slide animation overlapping items outside mainGroup#32955
aleksei-semikozov merged 5 commits intoDevExpress:25_2from
aleksei-semikozov:fix/scheduler-form-animation-overlap

Conversation

@aleksei-semikozov
Copy link
Contributor

No description provided.

@aleksei-semikozov aleksei-semikozov self-assigned this Mar 18, 2026
@aleksei-semikozov aleksei-semikozov changed the title Scheduler New Form — Fix slide animation overlapping items outside mainGroup Scheduler — Fix slide animation overlapping items outside mainGroup Mar 18, 2026
@aleksei-semikozov aleksei-semikozov marked this pull request as ready for review March 18, 2026 15:14
@aleksei-semikozov aleksei-semikozov requested a review from a team as a code owner March 18, 2026 15:14
@aleksei-semikozov aleksei-semikozov force-pushed the fix/scheduler-form-animation-overlap branch from 92517e1 to f2adfd3 Compare March 18, 2026 15:32

const formElement = POM.popup.dxForm.$element()[0];
const animationTop = formElement.style.getPropertyValue('--dx-scheduler-animation-top');
expect(animationTop).toBe('50px');
Copy link
Contributor

Choose a reason for hiding this comment

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

It wasn't clear to me why animationTop should be 50px if there's no form customization, until I saw that getBoundingClientRect is mocked with some special values.

I suggest to write a functional testcafe test with form customization, so that we wouldn't need to mock getBoundingClient rect and the test would become more clear.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Prefer Jest here — CSS animation timing makes TestCafe tests flaky + any changed css or fonts break TestCafe test.
The test verifies the --dx-scheduler-animation-top value is calculated correctly, which is the actual behavior we care about.
The mock makes the expected value deterministic. If you feel the mock setup needs more clarity, happy to add a comment explaining the mocked rect values.

I suggest extending setupSchedulerTestEnvironment with classRects option so the rect values are explicit right in the test:

it('should set animation offset when custom item is placed before mainGroup', async () => {
  setupSchedulerTestEnvironment({
    height: 600,
    classRects: {
      'dx-scheduler-form-main-group': { top: 50, height: 50, bottom: 100 },
    },
  });

  const { scheduler, POM } = await createScheduler(getDefaultConfig());

  scheduler.showAppointmentPopup();
  POM.popup.selectRepeatValue('weekly');

  const animationTop = POM.popup.dxForm.element().style.getPropertyValue('--dx-scheduler-animation-top');
  expect(animationTop).toBe('50px'); // mainGroup starts 50px from form top
});

Tucchhaa
Tucchhaa previously approved these changes Mar 19, 2026
@aleksei-semikozov aleksei-semikozov force-pushed the fix/scheduler-form-animation-overlap branch from 06df432 to 40643b0 Compare March 19, 2026 13:24
@aleksei-semikozov aleksei-semikozov merged commit 6e473f4 into DevExpress:25_2 Mar 19, 2026
115 of 117 checks passed
@aleksei-semikozov aleksei-semikozov deleted the fix/scheduler-form-animation-overlap branch March 20, 2026 17:13
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