Skip to content

Scheduler: delete Appointment enhancements#32402

Draft
sjbur wants to merge 13 commits intoDevExpress:26_1from
sjbur:issue-308_26_1
Draft

Scheduler: delete Appointment enhancements#32402
sjbur wants to merge 13 commits intoDevExpress:26_1from
sjbur:issue-308_26_1

Conversation

@sjbur
Copy link
Contributor

@sjbur sjbur commented Feb 4, 2026

No description provided.

@sjbur sjbur self-assigned this Feb 4, 2026
@sjbur sjbur added the 26_1 label Feb 4, 2026
@sjbur sjbur closed this Feb 5, 2026
@sjbur sjbur reopened this Feb 5, 2026
@sjbur sjbur marked this pull request as ready for review February 6, 2026 11:35
@sjbur sjbur requested review from a team as code owners February 6, 2026 11:35
$list-item-selected-hover-bg: color.change($base-accent, $alpha: 0.3) !default;
$list-item-focused-selected-bg: color.change($base-focus-bg, $alpha: 0.7) !default;
$list-focused-bg: $base-focus-bg !default;
$list-focused-bg: $list-item-hover-bg !default;
Copy link
Contributor

Choose a reason for hiding this comment

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

I see that color is changed for the dxList. Were these changes discussed with designer and Navigation squad?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

As part of this task we needed to fix contrast within background and foreground in appointment item collector. Appointment collector item is a list item. I agree that maybe we should not change this, but in this case I am not sure that can fix contrast issue on our side

Copy link
Contributor

Choose a reason for hiding this comment

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

If the contrast issue can reproduced only with dxList, then, yeah, it should be fixed here. But it's still strange that $list-focused-bg variable is assigned a value of $list-item-hover-bg. These two variables should used for different scenarios.

If the contrast issue doesn't reproduce on dxList and only on scheduler's side, then we should override some of the styles on Scheduler's side.

If you have some questions, let's discuss them :)

this._list.registerKeyHandler?.('del', (e) => {
const { focusedElement } = this._list.option();

if (!focusedElement || !this._options.allowDelete) {
Copy link
Contributor

Choose a reason for hiding this comment

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

If I have an appt with 'disabled' field, e.g:

{
    disabled: true,
    text: 'Website Re-Design Plan',
    startDate: new Date('2021-04-26T16:30:00.000Z'),
    endDate: new Date('2021-04-26T18:30:00.000Z'),
  }

Then this appointment can be deleted using KBN, even though it shouldn't because delete icon isn't displayed.

Copy link
Contributor

Choose a reason for hiding this comment

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

Take a look at this line of code.

Instead of passing _options.allowDelete from m_scheduler, it would be better to use the existing logic. I would suggest to move that line of code into a separate function and use it in both places

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will take a look

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Implemented same logic as in that line

Copy link
Contributor

@Tucchhaa Tucchhaa Feb 10, 2026

Choose a reason for hiding this comment

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

Ok, but can we move this condition to a separate function? I think, it's better to keep such logic in one place. Or if you have objections, let's discuss it

Copy link
Contributor

@Tucchhaa Tucchhaa Feb 10, 2026

Choose a reason for hiding this comment

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

Also, please, add a test for the case of not allowing deletion of disabled appointment by keyboard

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Extracted to separate method

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added test


if (appointment) {
e.preventDefault();
this.hide();
Copy link
Contributor

@Tucchhaa Tucchhaa Feb 9, 2026

Choose a reason for hiding this comment

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

Was hiding a tooltip after appt is deleted using KBN discussed with the designer?
For me it feels like it shouldn't, so I would like to know what the designer thinks

Copy link
Contributor Author

@sjbur sjbur Feb 9, 2026

Choose a reason for hiding this comment

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

I will ask designer

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The designer suggested not to hide the collector neither by keyboard deletion neither by mouse. Hide collector only if it does not have any appointments left

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok, can you please add tests for scenarios when tooltip should/shouldn't close?

@sjbur sjbur marked this pull request as draft February 11, 2026 08:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants