Previously there was a strict rule about keeping every attribute a string format. This has confused a lot of people when getting started because for example you would expect something like this to work right out of the box:
{
"type": "label", "text": 42
}
But it didn't because you had to EXPLICITLY set every attribute value to string, so the 42 had to be wrapped with double quotes like this:
{
"type": "label", "text": "42"
}
This PR fixes this problem so all types automatically get typecasted to string when printing to the view. Numbers become strings and booleans become strings too (true becomes "1" and false becomes "0")
Here are the features that have been updated to reflect this:
View
header
basic title
advanced title
menu
text
badge
text
footer
tabs
items
text
badge
input
textfield
name
placeholder
right
text
layers
type:label
text
components
type:label
text
type:button
text
type:textfield
name
value
placeholder
type:textarea
name
value
placeholder
type:slider
name
value
type:switch
name
value
type:map
pins
title
description
type: Html
text
Action
$util actions
Styling
all styles with number metrics (size, width, height, etc.)
Previously there was a strict rule about keeping every attribute a string format. This has confused a lot of people when getting started because for example you would expect something like this to work right out of the box:
But it didn't because you had to EXPLICITLY set every attribute value to string, so the
42
had to be wrapped with double quotes like this:This PR fixes this problem so all types automatically get typecasted to string when printing to the view. Numbers become strings and booleans become strings too (
true
becomes"1"
andfalse
becomes"0"
)Here are the features that have been updated to reflect this:
View
header
footer
layers
components
Action
$util actions
Styling
all styles with number metrics (size, width, height, etc.)