ProgressNS / nativescript-ui-feedback

This repository is used for customer feedback regarding Telerik UI for NativeScript. The issues system here is used by customers who want to submit their feature requests or vote for existing ones.
Other
115 stars 21 forks source link

NS7 Calender bug broken style on IOS, example project attached #1477

Open cjohn001 opened 3 years ago

cjohn001 commented 3 years ago

Please, provide the details below:

Tell us about the problem

The 7.0.2 version of the nativescript-ui-calendar is broken on IOS. The bug exists when used with the new V8 runtime and also with the old tns-ios runtime. The attached example shows the bug and can be used for testing with both runtimes. I mentioned both runtimes here, as in my project I could work around the bug by using the tns-ios runtime. However, the work around seems to not work systematically, as the attached example also breaks with the old runtime.

calling
const calendar = args.object as RadCalendar; calendar.ios.presenter.style.dayNameCellHeight = 20;

in loaded() event results in the following error message as style is undefined:

TypeError: Cannot set property 'dayNameCellHeight' of undefined

Which platform(s) does your issue occur on?

iOS

Please provide the following version numbers that your issue occurs with:

"nativescript-ui-calendar": "^7.0.2", tns --version 7.0.8 "@nativescript/core": "~7.0.0", you can also use "tns-ios": "6.5.2"

Please tell us how to recreate the issue in as much detail as possible.

run the attached example application and look at console output. You can also observe that style of calender in mainscreen is broken

Is there code involved? If so, please share the minimal amount of code needed to recreate the problem.

calendarbug.zip

Please consider this bug as urgent as it quite likely stops a lot of people from migrating to NS7!

NathanWalker commented 3 years ago

@cjohn001 I investigated this for a bit today and appreciate you sharing that repro. Indeed style is undefined and currently looking into the presenter setup as well as alternate ways things like day cell height could be adjusted.

cjohn001 commented 3 years ago

Hello @NathanWalker, thanks for the info. So you are going to implement a different interface for configuration of the style? Great.

cjohn001 commented 3 years ago

Hello @NathanWalker I just had a look regarding the workaround you sketched in todays community meeting, i.e. setting of the height on the calendar explicitly like you proposed. Well, this does not fix the problem. But I just realized that the source of the issue is interrelated with another observation. The error message on the console is only a follow up error resulting from the true source of the problem

CONSOLE ERROR: ERROR TypeError: Cannot set property 'dayNameCellHeight' of undefined

Please look at the images below: The first calendar images (like I need to use the calendar) does not display the title "Dezember 2020". I am therefore setting

this._weekViewStyle = new CalendarWeekViewStyle(); this._weekViewStyle.showTitle = false;

This works with the old runtime. If you look at the demo sources I provided, you will find the relevant code section in week-calendar.component.ts line 71

It seems that with the new runtime the showTitle value is completely ignored. The title always shows up, it does not matter if I set showTitle to true or false. Is there another way how I could disable the title? via native code? At least this is one problem I have. Maybe setting dayNameCellHeight than does also work. If I set this._weekViewStyle.showTitle = true I do not observe the dayNameCellHeight error on the console. But this does not help as I do not want the title to appear.

Bildschirmfoto 2020-12-02 um 22 21 31 Bildschirmfoto 2020-12-02 um 22 23 34