-
Notifications
You must be signed in to change notification settings - Fork 222
[[ Docs ]] Add to the LCB documentation for measuring text #2915
base: develop
Are you sure you want to change the base?
Conversation
…OperationTextImageBoundsOnCanvas`
@@ -3729,6 +3729,10 @@ Description: | |||
|
|||
>*Note:* The layout bounds is used to position blocks of text relative to each other, so the text may overlap these bounds. | |||
|
|||
The `layout` is optional and has no effect on the return value, but may be used to emphasize the difference between `the layout bounds` and `the image bounds`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure this is the right way to explain this. The syntax is 'the [layout] bounds' which indicates that the layout token is optional in this context - this is a standard formalism from LCS and if we were to mention this kind of thing in every single place where there is an optional token there would be way too much verbiage in docs which add no value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The point here is not that it's optional, but that it has no affect on the result. If this isn't said then the developer (or me yesterday!) is left wondering what it does and whether they need it or not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think my intention had always been that LCB syntax should be explicitly one piece of syntax per action - so this does break that for backwards-compatibility reasons.
The 'layout' token was added after we overloaded 'the bounds' to add 'the image bounds'. Perhaps 'the layout bounds' should actually be the syntax, and 'the bounds' should be deprecated?
We can do that easily enough by adding a deprecated syntax definition for 'the bounds' and removing the optionality from 'layout'.
@livecodestephen @runrevmark So do the docs need to be tweaked here or is this a decision to be deferred until dp 7? |
I think we decided to fix the problem of the odd 'optional' keyword which doesn't do anything rather than document it. i.e. We'll deprecate 'the bounds' and document 'the layout bounds' and 'the image bounds'. |
@runrevmark, @livecodestephen: What needs to be done to progress this pull request? |
No description provided.