kendo-angular icon indicating copy to clipboard operation
kendo-angular copied to clipboard

Views selection disapear in scheduler with custom toolbar

Open ZenSide opened this issue 2 years ago • 6 comments

Describe the bug In Kendo Angular scheduler, if a custom toolbar template is defined with kendoSchedulerToolbarTemplate, the views selector component is not visible anymore, even if directive kendoSchedulerToolbarViewSelector is included as described in the documentation

To Reproduce To reproduce, just launch the example of the kendoSchedulerToolbarViewSelector directive in the documentation. In this example, the scheduler view cannot be changed because the views selector component is not displayed at the right side of the scheduler toolbar.

Expected behavior The views selector component should be visible when a custom toolbar template is present including the kendoSchedulerToolbarViewSelector directive

Browser

  • OS: Windows
  • Browser : Chrome
  • Version 114.0.5735.110

Additional context I got the feeling that this issue is linked to the new presentation of the views selector (it was previously a button group and is not a dropdown).

ZenSide avatar Jun 12 '23 10:06 ZenSide

This is an issue with the documentation demo, the Scheduler resize event is "schedulerResize", not "resizeScheduler":

Here is an working example:

https://stackblitz.com/edit/angular-gcb7k6-pjc3yf?file=src%2Fapp%2Fapp.component.ts

We will update the documentation accordingly as soon as possible.

dtopalov avatar Jun 29 '23 06:06 dtopalov

This looks to be a breaking change.

I can't find any mention of this in the changelogs

toolbarWidth is now mandatory in order to use kendoSchedulerToolbarTemplate and kendoSchedulerToolbarViewSelector

cheng93 avatar Jul 12 '23 16:07 cheng93

This looks to be a breaking change. I can't find any mention of this in the changelogs

The event name was incorrect and it needs to be fixed only in the documentation demo. It was never changed in the API of the Kendo UI for Angular Scheduler component from how it was initially introduced. Changing it in the demo only does not constitute as a breaking change.

toolbarWidth is now mandatory in order to use kendoSchedulerToolbarTemplate and kendoSchedulerToolbarViewSelector

toolbarWidth is not required in order to use any of the templates. This repository is for bug reports only. If you need any further assistance with a specific scenario implementation or setup, please use our support system.

stnikolova avatar Jul 13 '23 09:07 stnikolova

@stnikolova

https://stackblitz.com/edit/stackblitz-starters-m1mog7?file=src%2Fmain.ts

In the demo above

  • @progress/[email protected]
  • the top scheduler does show day selector - has toolbarWidth
  • the bottom scheduler does not show day selector - does not have toolbarWidth

https://stackblitz.com/edit/stackblitz-starters-ybipuh?file=src%2Fmain.ts

  • @progress/[email protected]
  • the scheduler does show day selector - does not have toolbarWidth

is this not breaking? well it's a bug regardless

cheng93 avatar Jul 13 '23 16:07 cheng93

In the ToolbarViewSelectorComponent

You have two ngIfs which contain the following respective

  • toolbarWidth <= responsesiveBreakpoint
  • toolbarWidth > responsesiveBreakpoint

which will evaluate to false when toolbarWidth is not supplied as it's undefined, thus the view selector never shows up

cheng93 avatar Jul 13 '23 18:07 cheng93

@cheng93 Thank you for the additional information. You do have a point that this newly introduced configuration changes the component's behavior when not provided. The team is going to discuss what would be the best course of action in this case and we'll update the issue in a timely manner.

stnikolova avatar Jul 19 '23 08:07 stnikolova