You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Pursuant to #71, the current data structure is problematic. Currently, the data array is an array of arrays with the following configuration:
constdata=[['Zerg',400,'#9ee79d'],];
This array can be extended in a number of ways to support block-level formatting, background colors, and label colors. This design makes it increasingly difficult to support additional block options, as they would be additional elements to the array, and the user would be forced to stuff null into the configuration options that are not desired.
For example, to set a label color, but keep the default background, the user would have to do the following:
constdata=[['Protoss',100,null,'#56b1ff'],];
Instead, it would be better to support an array of objects, and eventually deprecate the array of arrays format:
We would need to translate the legacy block arrays into key/value objects. This should require minimal effort, and allow the library to offer even greater individual block-level configurations.
The text was updated successfully, but these errors were encountered:
Pursuant to #71, the current data structure is problematic. Currently, the
data
array is an array of arrays with the following configuration:This array can be extended in a number of ways to support block-level formatting, background colors, and label colors. This design makes it increasingly difficult to support additional block options, as they would be additional elements to the array, and the user would be forced to stuff
null
into the configuration options that are not desired.For example, to set a label color, but keep the default background, the user would have to do the following:
Instead, it would be better to support an array of objects, and eventually deprecate the array of arrays format:
We would need to translate the legacy block arrays into key/value objects. This should require minimal effort, and allow the library to offer even greater individual block-level configurations.
The text was updated successfully, but these errors were encountered: