-
Notifications
You must be signed in to change notification settings - Fork 657
Scheduler: update react storybook for legacy popup layout #31911
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR updates the Scheduler component to better support legacy popup layouts with custom form configurations, particularly for React Storybook demonstrations. The changes ensure that the recurrence rule state is properly synchronized between the form and the recurrence form component, especially when toggling between "never" and recurring appointments.
Key Changes
- Made
recurrenceRuleproperty public inRecurrenceFormclass to allow direct external access and manipulation - Modified recurrence value saving logic to always save (removed conditional guard), ensuring state consistency
- Updated React Storybook with a comprehensive legacy popup example using a custom switch-based recurrence toggle
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
packages/devextreme/js/__internal/scheduler/appointment_popup/m_recurrence_form.ts |
Changed recurrenceRule from private property with getter/setter to public property, enabling external components to directly access and modify the recurrence rule state |
packages/devextreme/js/__internal/scheduler/appointment_popup/m_form.ts |
Added explicit recurrence rule resets when "never" is selected, removed conditional check in saveRecurrenceValue() to ensure rule is always saved, and added call to updateRecurrenceFormValues() for proper state synchronization |
apps/react-storybook/stories/scheduler/SchedulerFormCustomization.stories.tsx |
Enhanced LegacyPopup story with React Scheduler component, custom popup toolbar, and switch-based recurrence editor that demonstrates legacy popup layout with manual form control |
apps/react-storybook/stories/scheduler/SchedulerFormCustomization.stories.tsx
Show resolved
Hide resolved
apps/react-storybook/stories/scheduler/SchedulerFormCustomization.stories.tsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 7 comments.
packages/devextreme/js/__internal/scheduler/appointment_popup/m_recurrence_form.ts
Outdated
Show resolved
Hide resolved
apps/react-storybook/stories/scheduler/SchedulerFormCustomization.stories.tsx
Show resolved
Hide resolved
apps/react-storybook/stories/scheduler/SchedulerFormCustomization.stories.tsx
Outdated
Show resolved
Hide resolved
packages/devextreme/js/__internal/scheduler/appointment_popup/m_recurrence_form.ts
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
apps/react-storybook/stories/scheduler/SchedulerFormCustomization.stories.tsx
Outdated
Show resolved
Hide resolved
apps/react-storybook/stories/scheduler/SchedulerFormCustomization.stories.tsx
Outdated
Show resolved
Hide resolved
apps/react-storybook/stories/scheduler/SchedulerFormCustomization.stories.tsx
Outdated
Show resolved
Hide resolved
apps/react-storybook/stories/scheduler/SchedulerFormCustomization.stories.tsx
Outdated
Show resolved
Hide resolved
packages/devextreme/js/__internal/scheduler/appointment_popup/m_recurrence_form.ts
Show resolved
Hide resolved
| const buttonInstance = $(firstButton).dxButton('instance'); | ||
| expect(buttonInstance?.option('disabled')).toBe(true); | ||
| }); | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest to add more tests:
- We have added code to preserve values in recurrence form for repeat end editors. So we need to test case when:
- User opens recurrence form
- Changes value for repeat end editors (both count and until)
- User goes back to main form
- User selects different frequency in repeat editor (not 'never')
- User open recurrence form again
- Check that values in count, until and repeat end values are preserved
- We added code to set 'disabled' to repeat end editors on content ready. We need to cover it with tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.
apps/react-storybook/stories/scheduler/SchedulerFormCustomization.stories.tsx
Outdated
Show resolved
Hide resolved
packages/devextreme/js/__internal/scheduler/appointment_popup/m_recurrence_form.ts
Outdated
Show resolved
Hide resolved
packages/devextreme/js/__internal/scheduler/appointment_popup/m_recurrence_form.ts
Outdated
Show resolved
Hide resolved
packages/devextreme/js/__internal/scheduler/appointment_popup/m_recurrence_form.ts
Outdated
Show resolved
Hide resolved
apps/react-storybook/stories/scheduler/SchedulerFormCustomization.stories.tsx
Outdated
Show resolved
Hide resolved
packages/devextreme/js/__internal/scheduler/appointment_popup/m_recurrence_form.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
apps/react-storybook/stories/scheduler/SchedulerFormCustomization.stories.tsx
Show resolved
Hide resolved
apps/react-storybook/stories/scheduler/SchedulerFormCustomization.stories.tsx
Outdated
Show resolved
Hide resolved
apps/react-storybook/stories/scheduler/SchedulerFormCustomization.stories.tsx
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.
No description provided.