Closed NaifAlrashed closed 1 month ago
Looking at the other properties we have so far and their documentation, all expressions are optional, but so far we have been adding the underlying variable as non optional, this appears to be the first one we are adding as optional. Not saying this is wrong, but trying to understand in which case this needs to be optional and in which cases it doesn't. Whats the criteria here?
That's a good question... I didn't notice that; thanks for catching it!
Can anyone think of a (non-contrived) use case for building a symbol style layer (reminder: this is currently always from scratch; not loading from JSON or something) and needing to set a property to null? I can't (which is why they are non-optional elsewhere).
I cannot think of a use case to pass nil. In fact, our internal solution was [String]
. I just did it to expose the whole functionality because I thought this is library code. Would you like me to make it [String]
?
I'll wait to hear if @hactar or @Archdoog have any arguments otherwise, but yeah I'm leaning toward making it [String]
.
I can't think of a useful use case either...
Ok; I'll fix this up ;)
Consumers of SwiftUI dsl are now able to customize the font family for the
text
attribute forSymbolLayer
. It provides a solution to this problem. According to the docs, the font family can be set to nil to reset to default value, so the exposed type is[String]?