telerik / kendo-angular

Issue tracker - Kendo UI for Angular
http://www.telerik.com/kendo-angular-ui/
Other
468 stars 217 forks source link

Views selection disapear in scheduler with custom toolbar #4031

Open ZenSide opened 1 year ago

ZenSide commented 1 year ago

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

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).

dtopalov commented 1 year ago

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.

cheng93 commented 1 year ago

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

stnikolova commented 1 year ago

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.

cheng93 commented 1 year ago

@stnikolova

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

In the demo above

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

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

cheng93 commented 1 year ago

In the ToolbarViewSelectorComponent

You have two ngIfs which contain the following respective

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

stnikolova commented 1 year ago

@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.