History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: LPP-5207
Type: Sub-task Sub-task
Status: Closed Closed
Resolution: Fixed
Priority: P1 P1
Assignee: Unassigned
Reporter: Lou Iorio
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
OpenLaszlo
LPP-5160

change height of example code window from 200 to 400 pixels

Created: 06/Dec/07 03:33 AM   Updated: 12/Jun/08 04:09 PM
Component/s: Documentation
Affects Version/s: RingDingDoc (4.1 DevGuide)
Fix Version/s: RingDingTools (4.1 Ref Guide + Tools), RingDingDoc (4.1 DevGuide)

Time Tracking:
Not Specified

File Attachments: None
Image Attachments:

1. Picture 63.png
(43 kb)

2. Picture 64.png
(249 kb)

Severity: Minor
Fixed in Change#: 7,645
Runtime: N/A
Fix in hand: False


 Description  « Hide
The example code window height was changed from 3.4; many code examples are now clipped

 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Benjamin Shine - 17/Dec/07 01:02 PM
A fix for this is in review; it is 20071217-ben-0.tar.gz

Benjamin Shine - 17/Dec/07 07:00 PM
r7580 | ben | 2007-12-17 18:58:58 -0800 (Mon, 17 Dec 2007) | 28 lines
Changed paths:
   M /openlaszlo/trunk/docs/src/developers/tutorials/comp-intro.dbk
   M /openlaszlo/trunk/docs/src/xsl/common-html.xsl

Change 20071217-ben-0 by ben@slim.local on 2007-12-17 12:45:57 PST
    in /Users/ben/src/svn/openlaszlo/trunk
    for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: Improve canvas sizing in embedded examples in docs

Bugs Fixed: LPP-5207 (partial) change height of example code window from 200 to 400 pixels

Technical Reviewer: iorio (pending)

Documentation:
This change makes the default canvas height for a live example be 400 pixels.

This change also includes an example of the best way to specify the
canvas height, by adding a parameter element to the programlisting element:
       <parameter role="canvas">height: 200</parameter>
     
Examples of this usage are in docs/src/developers/tutorials/comp-intro.dbk


Release Notes:

Details:
    

Tests:

Lou Iorio - 18/Dec/07 01:53 PM
The default canvas height still appears to be 200 pixels.

Benjamin Shine - 19/Dec/07 02:51 PM
r7624 | ben | 2007-12-19 14:50:14 -0800 (Wed, 19 Dec 2007) | 33 lines
Changed paths:
   M /openlaszlo/trunk/docs/src/xsl/common-html.xsl

Change 20071219-ben-Q by ben@slim.local on 2007-12-19 14:42:49 PST
    in /Users/ben/src/svn/openlaszlo/trunk
    for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: Doc tools improvements -- don't load DHTML lfc, specify history: false

New Features:

Bugs Fixed: LPP-5270 $3.startExec is not a function firebug error in embed-compressed.js
    LPP-5298 Generated documentation should not include LFCdhtml.js
    LPP-5207 change height of example code window from 200 to 400 pixels

Technical Reviewer: none
QA reviewer: liorio

Documentation:
Discussion with Max revealed that we should pass in "history: false" when we call
Lz.swfEmbed( ... ) for a live example, so that we don't irritate the history
mechanism. This makes hundreds of firebug errors go away on every page of the
developer's guide.

Also, it is just not necessary to include LFCdhtml.js when we're not planning to
include any dhtml live examples at this point!

This change also finally makes it so that the default height of embedded examples is
400. I'm not sure why this change does that, but it did, so, rejoice.

Tests:
ant clean developers
visit http://localhost:8080/trunk/docs/developers/color.html note that there are no firebug errors
same with http://localhost:8080/trunk/docs/developers/tutorials/laszlo_basics.html

Benjamin Shine - 20/Dec/07 12:31 PM
I am so in progress on this! It is not fixed yet in the currently checked in stuff.

Benjamin Shine - 20/Dec/07 12:33 PM
This is an example from the developer's guide which is indicated in the code itself to be 260 pixels tall. The on-screen ruler indicates that this example is indeed 260 pixels tall.
(This is in a local development version.)

Benjamin Shine - 20/Dec/07 12:34 PM
Check out these cool live examples from the button reference page. The canvas is exactly the height specified in the examples themselves -- 30 pixels! (This is in a local development build.)

Benjamin Shine - 20/Dec/07 01:19 PM
r7645 | ben | 2007-12-20 13:18:24 -0800 (Thu, 20 Dec 2007) | 52 lines

Change 20071220-ben-8 by ben@slim.local on 2007-12-20 12:42:09 PST
    in /Users/ben/src/svn/openlaszlo/trunk
    for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: Make example canvases get their height from the example code

New Features:

Bugs Fixed: LPP-5207 (really, this time) change height of example code window from 200 to 400 pixels

Technical Reviewer: iorio (pending)
QA Reviewer: brynn (pending)

Documentation:

Two crucial changes here! First, our build file was set up wrong when it
generated the intermediate developers/index.dbk. It has to put this file into
docs/src/build/developers/index.dbk; it used to put it into
docs/developers/index.dbk -- effectively losing all the delicious processing that
had been done to it by the dbkpreprocessexamles.xsl worksheet. That delicious
processing includes a step that determines the canvas width and height from the
program listing itself.

Second! The part of common-html.xsl that actually sends canvas parameters to
Lz.swfEmbed(...) was only sending the first canvas parameter it found! This
code...

<xsl:variable name="canvas-parameters">
   <xsl:if
test="parameter[@role='canvas']">
        <xsl:value-of select="parameter[@role='canvas']"/>
    </xsl:if> ...
</xsl:variable>

...actually only puts the first answer to the xpath query
parameter[@role='canvas'] into the variable $canvas-parameters. This is an xsl
subtlety that I don't understand, but it has something to do with how node-sets
are coerced into strings when their value is taken. To fix this, I have added a
for-each which explicitly concatenates the value of each canvas parameter, with a
comma between them. This (thank goodness) inserts the correct canvas width and
height parameters into the call to Lz.swfEmbed.

Tests:
Note the canvas height for example 34.1, basecomponent, is 260 pixels,
as specified in the program listing:
http://localhost:8080/trunk/docs/developers/custom-components.html

Note that the canvas height of the first two examples is 30 pixels,
as specified in the program listing:
http://localhost:8080/trunk/docs/reference/lz.button.html

Matt Wilde - 12/Jun/08 03:56 PM
Canvas height is now derived from the sample code, but some examples are still broken. Those examples are noted in separate bug reports.