Skip to content

Scheduler: Form customization#31399

Merged
aleksei-semikozov merged 2 commits into
DevExpress:25_2from
aleksei-semikozov:form-customization
Nov 6, 2025
Merged

Scheduler: Form customization#31399
aleksei-semikozov merged 2 commits into
DevExpress:25_2from
aleksei-semikozov:form-customization

Conversation

@aleksei-semikozov
Copy link
Copy Markdown
Contributor

No description provided.

@aleksei-semikozov aleksei-semikozov self-assigned this Oct 20, 2025
@aleksei-semikozov aleksei-semikozov requested a review from a team as a code owner October 20, 2025 07:22
@aleksei-semikozov aleksei-semikozov force-pushed the form-customization branch 2 times, most recently from 728480d to 1488f76 Compare October 27, 2025 02:15
Copilot AI review requested due to automatic review settings October 27, 2025 02:15
Copy link
Copy Markdown
Contributor

Copilot AI left a 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 adds form customization capabilities to the Scheduler's appointment popup by introducing an editing.items configuration option. This allows developers to control which form groups are displayed and customize their visibility and child items.

Key Changes:

  • Implemented handleCustomizeFormItems method to process custom form item configurations
  • Added name properties to all form groups (subjectGroup, dateRangeGroup, repeatGroup, descriptionGroup, resourcesGroup) to enable identification
  • Added comprehensive test coverage for form customization scenarios

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.

File Description
packages/devextreme/js/__internal/scheduler/appointment_popup/m_form.ts Implements form customization logic and adds name properties to form groups
packages/devextreme/js/__internal/scheduler/appointment_popup/appointment_popup.test.ts Adds test suite for form customization feature and skips two existing tests

Comment thread packages/devextreme/js/__internal/scheduler/appointment_popup/m_form.ts Outdated
Comment thread packages/devextreme/js/__internal/scheduler/appointment_popup/m_form.ts Outdated
@aleksei-semikozov aleksei-semikozov force-pushed the form-customization branch 2 times, most recently from 0411637 to 3a535de Compare October 29, 2025 21:54
Copilot AI review requested due to automatic review settings October 29, 2025 21:54
Copy link
Copy Markdown
Contributor

Copilot AI left a 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 2 out of 2 changed files in this pull request and generated 1 comment.

Comment thread packages/devextreme/js/__internal/scheduler/appointment_popup/m_form.ts Outdated
@aleksei-semikozov aleksei-semikozov force-pushed the form-customization branch 2 times, most recently from 02d4a1b to a4b6259 Compare November 1, 2025 22:45
Copilot AI review requested due to automatic review settings November 1, 2025 22:45
Copy link
Copy Markdown
Contributor

Copilot AI left a 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 2 out of 2 changed files in this pull request and generated 2 comments.

Copilot AI review requested due to automatic review settings November 3, 2025 05:15
Copy link
Copy Markdown
Contributor

Copilot AI left a 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 2 comments.

Comment thread packages/devextreme/js/__internal/scheduler/appointment_popup/m_form.ts Outdated
Comment thread packages/devextreme/js/__internal/scheduler/appointment_popup/m_form.ts Outdated
Comment thread packages/devextreme/js/__internal/scheduler/appointment_popup/m_form.ts Outdated
Comment thread packages/devextreme/js/__internal/scheduler/appointment_popup/m_form.ts Outdated
Copilot AI review requested due to automatic review settings November 3, 2025 21:32
Copy link
Copy Markdown
Contributor

Copilot AI left a 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 2 comments.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

buildFormItemsMap is called only for defaultItems, which means that we will never have tab items here.

So I suggest:

if(isGroupItem(item)) {
  return buildFormItemsMap(item.items ?? [], accumulator)
}

return accumulator;

Copy link
Copy Markdown
Contributor

@Tucchhaa Tucchhaa Nov 5, 2025

Choose a reason for hiding this comment

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

By the way this will not work if user has tabItem that uses a default item inside. But I suggest to postpone implementing this

Copy link
Copy Markdown
Contributor

@Tucchhaa Tucchhaa Nov 5, 2025

Choose a reason for hiding this comment

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

I suggest to use a consistent naming in this file (yes, not only this function), because the same entities may have different names throughout the file which may be very confusing. For example, currently we have:

userConfig, config, configure which represent a custom item from user.

or variable name map doesn't tell anything about the variable except it's type, which I can already see by typescript.

So my suggestion is to rename entities like this:
map -> defaultItemsMap
configure -> customItems or userItems
existingItem -> defaultItem
config -> customItem or userItem
userConfig -> customItemsRoot or userItemsRoot

Copilot AI review requested due to automatic review settings November 5, 2025 15:01
Copy link
Copy Markdown
Contributor

Copilot AI left a 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 no new comments.

Comments suppressed due to low confidence (1)

packages/devextreme/js/__internal/scheduler/appointment_popup/m_form.ts:355

  • This intermediate group lacks a name property, which breaks the hierarchical item path resolution used in updateDateTimeEditorsVisibility() at lines 918-921. The paths like mainGroup.dateGroup.startDateGroup.startDate won't work because DevExtreme Form's itemOption method can't traverse unnamed groups. Add a name property (e.g., name: 'dateGroupContent') and update the paths in updateDateTimeEditorsVisibility() to include this intermediate group name.
        {
          colSpan: 1,
          itemType: 'group',
          items: [
            this.createAllDaySwitch(),
            this.createStartDateGroup(),
            this.createEndDateGroup(),
          ],
        },

@aleksei-semikozov aleksei-semikozov merged commit 78baf11 into DevExpress:25_2 Nov 6, 2025
162 of 164 checks passed
@aleksei-semikozov aleksei-semikozov deleted the form-customization branch March 20, 2026 17:12
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.

3 participants