You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by Jeff Turner <je...@apache.org> on 2003/01/07 15:26:54 UTC

Too-wide menu text

.. couldn't we just rely on the browser's line-breaking algorithm?  Eg,
look at:

http://xml.apache.org/cocoon/userdocs/concepts/index.html

The 'Matchers and Selectors' entry has been automatically wrapped.

The Cocoon page uses a table for the menu.  Wouldn't it be possible to
get the same wrapping effect with CSS and a fixed-width menu?

If there is a too-long entry without whitespace to break on, then I'd
prefer to just let it overflow the box than to clip it.  Content over
presentation and all that..


--Jeff


Re: Too-wide menu text

Posted by Konstantin Piroumian <kp...@apache.org>.
From: "David Crossley" <cr...@indexgeo.com.au>
> Konstantin Piroumian wrote:
> <snip/>
> > BTW, Nicola, are you already using something different from book.xml? I
see
> > 3-level menus, but AFAIR, book.xml doesn't support that.
>
> Welcome back Konstantin.

Thanks!
I am not completely back, but I am trying to track the progress in Forrest
as time allows.

>
> See the mods to Forrest just a couple of days ago.
> Jeff added the excellent site.xml as a replacement
> for book.xml

And it seems that site.xml conceptualy is very close to my first
proposal/mockup:
http://marc.theaimsgroup.com/?l=forrest-dev&m=101664205804135&w=2 (the
actual code is in the attached archive).

>
> I was going to point you to
> http://forrestbot.cocoondev.org/
> so that you could see for yourself, but the build seems
> to be busted there.

Looks Ok now. Thanks again.

--
  Konstantin

>
> --David
>
>
>
>


Re: Too-wide menu text

Posted by Jeff Turner <je...@apache.org>.
On Thu, Jan 09, 2003 at 06:54:38PM +1100, David Crossley wrote:
...
> I was going to point you to
> http://forrestbot.cocoondev.org/
> so that you could see for yourself, but the build seems
> to be busted there.

Fixed.

--Jeff

> --David
> 
> 
> 

Re: Too-wide menu text

Posted by David Crossley <cr...@indexgeo.com.au>.
Konstantin Piroumian wrote:
<snip/>
> BTW, Nicola, are you already using something different from book.xml? I see
> 3-level menus, but AFAIR, book.xml doesn't support that.

Welcome back Konstantin.

See the mods to Forrest just a couple of days ago.
Jeff added the excellent site.xml as a replacement
for book.xml

I was going to point you to
http://forrestbot.cocoondev.org/
so that you could see for yourself, but the build seems
to be busted there.

--David




Re: Too-wide menu text

Posted by Nicola Ken Barozzi <ni...@apache.org>.

Konstantin Piroumian wrote:
> From: "Nicola Ken Barozzi" <ni...@apache.org>
[...]
> BTW, Nicola, are you already using something different from book.xml? I see
> 3-level menus, but AFAIR, book.xml doesn't support that.

Nope, they are the sections of the document. I embed the page navigation 
in the site nav as per original Stefano's design mockup.

-- 
Nicola Ken Barozzi                   nicolaken@apache.org
             - verba volant, scripta manent -
    (discussions get forgotten, just code remains)
---------------------------------------------------------------------


Re: Too-wide menu text

Posted by Konstantin Piroumian <kp...@apache.org>.
From: "Nicola Ken Barozzi" <ni...@apache.org>
> Stefano Mazzocchi wrote:
> > Miles Elam wrote:
> >
> >> Jeff Turner wrote:
> >>
> >>> I think, because it's CSS's job to clip the string, and AFAIK CSS
can't
> >>> do the ...'s.  I would like to be proven wrong though.
> >>>
> >> Unfortunately you are correct.  CSS has the ability to put elipses
> >> after nav items, but it would put them after EVERY entry -- not
> >> exactly what you're looking for.  It currently has no style directive
> >> that could put a conditional by string length -- or better, string
width.
> >>
> >> It can clip by width but then no elipses.  :(
> >>
> >> The only client, web-based markup I've seen do something like this are
> >> elements in Mozilla's XUL...and that's not an option for a
> >> general-purpose web resource.
> >
> >
> > I don't get it.
> >
> > Why can't we have an XSLT stylesheet cut characters and replace them
> > with "..." if they are exceeding a predefined (and configurable, of
> > course) number?
>
> It's already done on the krysalis skin for some time now. Oh and on that
> skin the page navigation is embedded in the dir navigation on the left.
> Example:
> http://www.krysalis.org/centipede/quickstart.html

Looks good, but not much useful, especially, if you don't provide the
original label as a hint (using 'title' attribute on links).

>
> For us skins are not only CSS, so I don't see the problem about
> truncating. If someone wants to truncate later, he makes his skin. Skins
> do have xslt.

And I am agree with this. Someone likes trancated label the others can tweak
the stylesheet to display wrapped text the thirds can tweak the CSS to make
the menu wider to display all the labels as one line.

BTW, Nicola, are you already using something different from book.xml? I see
3-level menus, but AFAIR, book.xml doesn't support that.

Konstantin

>
> --
> Nicola Ken Barozzi                   nicolaken@apache.org
>              - verba volant, scripta manent -
>     (discussions get forgotten, just code remains)
> ---------------------------------------------------------------------
>
>


Re: Too-wide menu text

Posted by Nicola Ken Barozzi <ni...@apache.org>.

Stefano Mazzocchi wrote:
> Miles Elam wrote:
> 
>> Jeff Turner wrote:
>>
>>> I think, because it's CSS's job to clip the string, and AFAIK CSS can't
>>> do the ...'s.  I would like to be proven wrong though.
>>>
>> Unfortunately you are correct.  CSS has the ability to put elipses 
>> after nav items, but it would put them after EVERY entry -- not 
>> exactly what you're looking for.  It currently has no style directive 
>> that could put a conditional by string length -- or better, string width.
>>
>> It can clip by width but then no elipses.  :(
>>
>> The only client, web-based markup I've seen do something like this are 
>> elements in Mozilla's XUL...and that's not an option for a 
>> general-purpose web resource.
> 
> 
> I don't get it.
> 
> Why can't we have an XSLT stylesheet cut characters and replace them 
> with "..." if they are exceeding a predefined (and configurable, of 
> course) number?

It's already done on the krysalis skin for some time now. Oh and on that 
skin the page navigation is embedded in the dir navigation on the left.
Example:
http://www.krysalis.org/centipede/quickstart.html

For us skins are not only CSS, so I don't see the problem about 
truncating. If someone wants to truncate later, he makes his skin. Skins 
do have xslt.

-- 
Nicola Ken Barozzi                   nicolaken@apache.org
             - verba volant, scripta manent -
    (discussions get forgotten, just code remains)
---------------------------------------------------------------------


Re: Too-wide menu text

Posted by Miles Elam <mi...@geekspeak.org>.
Stefano Mazzocchi wrote:

> I don't get it.
>
> Why can't we have an XSLT stylesheet cut characters and replace them 
> with "..." if they are exceeding a predefined (and configurable, of 
> course) number? 

We can, but that intimately ties the content to the current skin.  
Assuming that the XHTML+CSS formulations are used, almost all aspects of 
layout are handled by CSS including but not limited to the fact that the 
nav is on the left and a given size (no tables).  If an all-CSS solution 
to the clipping/ellipses issue were available, only the client would 
have to worry about this ostensibly display-only issue.

If someone views the new mockups without any CSS (like older browsers 
and text/braille readers), there is no left nav;  The navigation 
information resides below the main page content.

But an all-CSS solution isn't sufficient for all of the requirements, so 
Nikola's solution indeed looks like the best solution -- to me at least.

- Miles



Re: Too-wide menu text

Posted by Stefano Mazzocchi <st...@apache.org>.
Miles Elam wrote:
> Jeff Turner wrote:
> 
>> I think, because it's CSS's job to clip the string, and AFAIK CSS can't
>> do the ...'s.  I would like to be proven wrong though.
>>
> Unfortunately you are correct.  CSS has the ability to put elipses after 
> nav items, but it would put them after EVERY entry -- not exactly what 
> you're looking for.  It currently has no style directive that could put 
> a conditional by string length -- or better, string width.
> 
> It can clip by width but then no elipses.  :(
> 
> The only client, web-based markup I've seen do something like this are 
> elements in Mozilla's XUL...and that's not an option for a 
> general-purpose web resource.

I don't get it.

Why can't we have an XSLT stylesheet cut characters and replace them 
with "..." if they are exceeding a predefined (and configurable, of 
course) number?

-- 
Stefano Mazzocchi                               <st...@apache.org>
--------------------------------------------------------------------



Re: Too-wide menu text

Posted by Miles Elam <mi...@geekspeak.org>.
Jeff Turner wrote:

>I think, because it's CSS's job to clip the string, and AFAIK CSS can't
>do the ...'s.  I would like to be proven wrong though.
>
Unfortunately you are correct.  CSS has the ability to put elipses after 
nav items, but it would put them after EVERY entry -- not exactly what 
you're looking for.  It currently has no style directive that could put 
a conditional by string length -- or better, string width.

It can clip by width but then no elipses.  :(

The only client, web-based markup I've seen do something like this are 
elements in Mozilla's XUL...and that's not an option for a 
general-purpose web resource.

- Miles



Re: Too-wide menu text

Posted by Jeff Turner <je...@apache.org>.
On Tue, Jan 07, 2003 at 02:05:48PM -0800, Stefano Mazzocchi wrote:
> Jeff Turner wrote:
> >.. couldn't we just rely on the browser's line-breaking algorithm?  Eg,
> >look at:
> >
> >http://xml.apache.org/cocoon/userdocs/concepts/index.html
> >
> >The 'Matchers and Selectors' entry has been automatically wrapped.
> 
> I think that's very ugly. I would love to see something better.
> 
> >The Cocoon page uses a table for the menu.  Wouldn't it be possible to
> >get the same wrapping effect with CSS and a fixed-width menu?
> >
> >If there is a too-long entry without whitespace to break on, then I'd
> >prefer to just let it overflow the box than to clip it.  Content over
> >presentation and all that..
> 
> Why can't we implement Nicola's concept of cutting with "..." and 
> tooltipping with the full name?

I think, because it's CSS's job to clip the string, and AFAIK CSS can't
do the ...'s.  I would like to be proven wrong though.

--Jeff


Re: Too-wide menu text

Posted by Stefano Mazzocchi <st...@apache.org>.
Jeff Turner wrote:
> .. couldn't we just rely on the browser's line-breaking algorithm?  Eg,
> look at:
> 
> http://xml.apache.org/cocoon/userdocs/concepts/index.html
> 
> The 'Matchers and Selectors' entry has been automatically wrapped.

I think that's very ugly. I would love to see something better.

> The Cocoon page uses a table for the menu.  Wouldn't it be possible to
> get the same wrapping effect with CSS and a fixed-width menu?
 >
> If there is a too-long entry without whitespace to break on, then I'd
> prefer to just let it overflow the box than to clip it.  Content over
> presentation and all that..

Why can't we implement Nicola's concept of cutting with "..." and 
tooltipping with the full name? That concept has been used extensively 
in both Windows and Mozilla and people are used to mouseover to get more 
data.

What do you think?

-- 
Stefano Mazzocchi                               <st...@apache.org>
--------------------------------------------------------------------