Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

[[ Docs ]] Add to the LCB documentation for measuring text #2915

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

livecodestephen
Copy link
Contributor

No description provided.

@peter-b peter-b added the bug label Sep 23, 2015
@@ -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`.
Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link
Contributor

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'.

@peter-b peter-b modified the milestone: 8.0.0-dp-6 Sep 24, 2015
@livecodeali
Copy link
Member

@livecodestephen @runrevmark So do the docs need to be tweaked here or is this a decision to be deferred until dp 7?

@runrevmark runrevmark modified the milestones: 8.0.0-dp-7, 8.0.0-dp-6 Sep 30, 2015
@runrevmark
Copy link
Contributor

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'.

@peter-b
Copy link
Contributor

peter-b commented Oct 14, 2015

@runrevmark, @livecodestephen: What needs to be done to progress this pull request?

@livecodefraser livecodefraser removed this from the 8.0.0-dp-8 milestone Oct 28, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants