nativescript-vue icon indicating copy to clipboard operation
nativescript-vue copied to clipboard

GridLayout children props colSpan and rowSpan shoulb either accept all lowercase or sneak-case variant

Open sombriks opened this issue 6 years ago • 2 comments

Version

2.0.2

Reproduction link

https://play.nativescript.org/?template=play-vue&id=itm30R&v=2

Platform and OS info

Android 8.1 / NativeScript 5.1 / Fedora 28

Steps to reproduce

1- choose a child of a GridLayout and give him colSpan="2" 2- use the formatter of your IDE (visual studio code prettier for example) 3- see the camel case property be transformed in all lower case

What is expected?

colSpan and rowSpan values respected aside any linter change the attribute either to kebab or lowercase

What is actually happening?

since only camelCase is recognized the colSpan and rowSpan get lost and layout does not render correctly


This issue is pretty common, see https://github.com/vuejs/eslint-plugin-vue/issues/550 just one of dozens of examples

sombriks avatar Feb 18 '19 21:02 sombriks

The camelCase properties are coming from tns-core-modules. The workaround that I can think of would involve checking all properties of the target element, and that would likely introduce computational overhead.

rigor789 avatar Feb 18 '19 23:02 rigor789

@rigor789 so those could be introduced in tns-core or a warning session should be added whenever camel case properties are used. i think that not only prettier but other linters and formatters might transform camel case into all down or sneak.

Should i open PR on docs repo to warn people about that?

sombriks avatar Feb 19 '19 01:02 sombriks