Override style specification documentation in runtime styling API#6107
Conversation
719c227 to
d6ac418
Compare
| ${property.docs[property.values.indexOf(value)]} | ||
| */`; | ||
| } else { | ||
| return "#warning documentation missing."; |
There was a problem hiding this comment.
These warnings might be easier to track if they included the names of the enum values that are missing documentation.
2b690a5 to
32c93dd
Compare
|
Rebased and cleaned. |
| } | ||
|
|
||
| global.override = function(base, overrides) { | ||
| Object.keys(overrides).forEach(function(key) { |
There was a problem hiding this comment.
This can be expressed as a for-of loop:
for (var key of overrides) { … }| return (typeof object === 'object' && !Array.isArray(object)); | ||
| } | ||
|
|
||
| global.override = function(base, overrides) { |
There was a problem hiding this comment.
Instead of rolling our own function, import lodash and use _.assign() or _.assignIn().
| { | ||
| "layout_symbol": { | ||
| "icon-text-fit-padding": { | ||
| "doc": "Size of the additional area added to dimensions determined by `icon-text-fit`, in counterclockwise order: top, left, bottom, right." |
There was a problem hiding this comment.
How about:
Padding added to the dimensions determined by the
iconTextFitproperty.
We already mention in the generated documentation that the NSValue contains an NSEdgeInsets or UIEdgeInsets. The developer can look up what the expected order is for those types.
|
Some additional properties that we should fix:
It may be possible to fix these properties without an override, similar to how we replace “pixels” with “points”. |
cfb587e to
7c768b6
Compare
7c768b6 to
b70babe
Compare
b70babe to
792d75b
Compare
Fixes #5954 - Override some gl-style-spec documentation to make it more idiomatic.
👀 @1ec5 @friedbunny